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

Commit c81a5d63 authored by Jim Miller's avatar Jim Miller
Browse files

Fix bad merge in KeyguardHostView

This restores the fix detailed in Change-Id: I866d4b42493df3a6449d8eabc3ea140dc39dac57

Change-Id: Ibe75afd7a612cf96a56e5815a198c2047c7ff5bd
parent 3be79f32
Loading
Loading
Loading
Loading
+11 −17
Original line number Diff line number Diff line
@@ -147,6 +147,16 @@ public class KeyguardHostView extends KeyguardViewBase {
        // In other words, mUserId should never change - hence it's marked final.
        mUserId = mLockPatternUtils.getCurrentUser();

        DevicePolicyManager dpm =
                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
        if (dpm != null) {
            mDisabledFeatures = getDisabledFeatures(dpm);
            mCameraDisabled = dpm.getCameraDisabled(null);
        }

        mSafeModeEnabled = LockPatternUtils.isSafeModeEnabled();

        // These need to be created with the user context...
        Context userContext = null;
        try {
            final String packageName = "system";
@@ -159,29 +169,13 @@ public class KeyguardHostView extends KeyguardViewBase {
            userContext = context;
        }

        // These need to be created with the user context...
        mAppWidgetHost = new AppWidgetHost(userContext, APPWIDGET_HOST_ID, mOnClickHandler,
                Looper.myLooper());
        mAppWidgetManager = AppWidgetManager.getInstance(userContext);

        cleanupAppWidgetIds();

        mSecurityModel = new KeyguardSecurityModel(context);

        mViewStateManager = new KeyguardViewStateManager(this);

        DevicePolicyManager dpm =
                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
        if (dpm != null) {
            mDisabledFeatures = getDisabledFeatures(dpm);
            mCameraDisabled = dpm.getCameraDisabled(null);
        }

        mSafeModeEnabled = LockPatternUtils.isSafeModeEnabled();

        cleanupAppWidgetIds();
        mAppWidgetManager = AppWidgetManager.getInstance(userContext);

        mAppWidgetManager = AppWidgetManager.getInstance(mContext);
        mSecurityModel = new KeyguardSecurityModel(context);

        mViewStateManager = new KeyguardViewStateManager(this);