Add method to dump Telecom analytics
Add dumpAnalytics in TelecomManager to allow the connectivity stats service to access Telecom analytics for uploading. Change-Id: I197d6af340fac7f38b28bb44a476b5e694db4dba
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
package android.telecom;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.ComponentName;
|
||||
@@ -1377,6 +1378,27 @@ public class TelecomManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps telecom analytics for uploading.
|
||||
*
|
||||
* @return
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.DUMP)
|
||||
public List<ParcelableCallAnalytics> dumpAnalytics() {
|
||||
ITelecomService service = getTelecomService();
|
||||
List<ParcelableCallAnalytics> result = null;
|
||||
if (service != null) {
|
||||
try {
|
||||
result = service.dumpCallAnalytics();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error dumping call analytics", e);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private ITelecomService getTelecomService() {
|
||||
if (mTelecomServiceOverride != null) {
|
||||
return mTelecomServiceOverride;
|
||||
|
||||
Reference in New Issue
Block a user