use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by LineageOS.
the class AppInfoBase method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mFinishing = false;
final Activity activity = getActivity();
mApplicationFeatureProvider = FeatureFactory.getFactory(activity).getApplicationFeatureProvider(activity);
mState = ApplicationsState.getInstance(activity.getApplication());
mSession = mState.newSession(this);
mDpm = new DevicePolicyManagerWrapperImpl((DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
mPm = activity.getPackageManager();
IBinder b = ServiceManager.getService(Context.USB_SERVICE);
mUsbManager = IUsbManager.Stub.asInterface(b);
retrieveAppEntry();
startListeningToPackageRemove();
}
use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by LineageOS.
the class AdvancedPowerUsageDetail method onAttach.
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
mState = ApplicationsState.getInstance(getActivity().getApplication());
mDpm = new DevicePolicyManagerWrapperImpl((DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
mPackageManager = activity.getPackageManager();
mBatteryUtils = BatteryUtils.getInstance(getContext());
}
use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by crdroidandroid.
the class AdvancedPowerUsageDetail method onAttach.
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
mState = ApplicationsState.getInstance(getActivity().getApplication());
mDpm = new DevicePolicyManagerWrapperImpl((DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
mPackageManager = activity.getPackageManager();
mBatteryUtils = BatteryUtils.getInstance(getContext());
}
use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by SudaMod.
the class AppInfoBase method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mFinishing = false;
final Activity activity = getActivity();
mApplicationFeatureProvider = FeatureFactory.getFactory(activity).getApplicationFeatureProvider(activity);
mState = ApplicationsState.getInstance(activity.getApplication());
mSession = mState.newSession(this);
mDpm = new DevicePolicyManagerWrapperImpl((DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
mPm = activity.getPackageManager();
IBinder b = ServiceManager.getService(Context.USB_SERVICE);
mUsbManager = IUsbManager.Stub.asInterface(b);
retrieveAppEntry();
startListeningToPackageRemove();
}
use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by DirtyUnicorns.
the class AdvancedPowerUsageDetail method onAttach.
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
mState = ApplicationsState.getInstance(getActivity().getApplication());
mDpm = new DevicePolicyManagerWrapperImpl((DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE));
mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
mPackageManager = activity.getPackageManager();
mBatteryUtils = BatteryUtils.getInstance(getContext());
}
Aggregations