use of android.net.INetworkStatsService in project android_packages_apps_Settings by LineageOS.
the class InstalledAppDetails method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
final Activity activity = getActivity();
if (!ensurePackageInfoAvailable(activity)) {
return;
}
setHasOptionsMenu(true);
addPreferencesFromResource(R.xml.installed_app_details);
addDynamicPrefs();
if (Utils.isBandwidthControlEnabled()) {
INetworkStatsService statsService = INetworkStatsService.Stub.asInterface(ServiceManager.getService(Context.NETWORK_STATS_SERVICE));
try {
mStatsSession = statsService.openSession();
} catch (RemoteException e) {
throw new RuntimeException(e);
}
} else {
removePreference(KEY_DATA);
}
mBatteryUtils = BatteryUtils.getInstance(getContext());
mDevelopmentSettingsEnabler = new DevelopmentSettingsEnabler(activity, null);
}
use of android.net.INetworkStatsService in project android_packages_apps_Settings by DirtyUnicorns.
the class InstalledAppDetails method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
final Activity activity = getActivity();
if (!ensurePackageInfoAvailable(activity)) {
return;
}
setHasOptionsMenu(true);
addPreferencesFromResource(R.xml.installed_app_details);
addDynamicPrefs();
if (Utils.isBandwidthControlEnabled()) {
INetworkStatsService statsService = INetworkStatsService.Stub.asInterface(ServiceManager.getService(Context.NETWORK_STATS_SERVICE));
try {
mStatsSession = statsService.openSession();
} catch (RemoteException e) {
throw new RuntimeException(e);
}
} else {
removePreference(KEY_DATA);
}
mBatteryUtils = BatteryUtils.getInstance(getContext());
mDevelopmentSettingsEnabler = new DevelopmentSettingsEnabler(activity, null);
}
Aggregations