Search in sources :

Example 11 with DevicePolicyManagerWrapperImpl

use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project platform_packages_apps_Settings by BlissRoms.

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();
}
Also used : DevicePolicyManager(android.app.admin.DevicePolicyManager) DevicePolicyManagerWrapperImpl(com.android.settings.enterprise.DevicePolicyManagerWrapperImpl) IBinder(android.os.IBinder) SettingsActivity(com.android.settings.SettingsActivity) Activity(android.app.Activity)

Aggregations

DevicePolicyManager (android.app.admin.DevicePolicyManager)11 DevicePolicyManagerWrapperImpl (com.android.settings.enterprise.DevicePolicyManagerWrapperImpl)11 Activity (android.app.Activity)5 IBinder (android.os.IBinder)5 SettingsActivity (com.android.settings.SettingsActivity)5