Search in sources :

Example 6 with DevicePolicyManagerWrapperImpl

use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by DirtyUnicorns.

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)

Example 7 with DevicePolicyManagerWrapperImpl

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

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

Example 8 with DevicePolicyManagerWrapperImpl

use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by omnirom.

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

Example 9 with DevicePolicyManagerWrapperImpl

use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by crdroidandroid.

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)

Example 10 with DevicePolicyManagerWrapperImpl

use of com.android.settings.enterprise.DevicePolicyManagerWrapperImpl in project android_packages_apps_Settings by SudaMod.

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

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