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

Commit 426da339 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix bad merge in KeyguardHostView" into jb-mr2-dev

parents f7dfc05f c81a5d63
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);