use of android.net.INetworkStatsService in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class InstalledAppDetails method onCreate.
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
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);
}
mBatteryHelper = new BatteryStatsHelper(getActivity(), true);
}
use of android.net.INetworkStatsService in project android_packages_apps_Settings by omnirom.
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 crdroidandroid.
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 SudaMod.
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 platform_packages_apps_Settings by BlissRoms.
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