Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6c69209 authored by Prabal Singh's avatar Prabal Singh
Browse files

Edit workPolicyUtil constructor

We only need to pass context in the constructor for workPolicyUtil.
The other dependencies can be derviced from the context.

Test: manual
Change-Id: If97ee93e7812d0768489f038d965212332df9e2c
parent d38f05b5
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
@@ -42,15 +42,13 @@ public class WorkPolicyUtils {
    private static final int USER_NULL = -10000;
    private static final int USER_NULL = -10000;


    public WorkPolicyUtils(
    public WorkPolicyUtils(
            Context applicationContext,
            Context context
            PackageManager mPm,
            UserManager mUm,
            DevicePolicyManager mDpm
    ) {
    ) {
        mContext = applicationContext;
        mContext = context;
        mPackageManager = mPm;
        mPackageManager = context.getPackageManager();
        mUserManager = mUm;
        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
        mDevicePolicyManager = mDpm;
        mDevicePolicyManager =
                (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
    }
    }


    /**
    /**