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

Commit d84154af authored by Danesh Mondegarian's avatar Danesh Mondegarian
Browse files

AccountUnlockScreen: Explicitly register themeChange receiver

Make sure that we explicitly register the receiver and don't attempt to
unregister otherwise.

Replicated from commit : f7ca5108

To reproduce crash :

- Use a secure lockscreen
- Do failed attempts till timeout
- Click account unlock, then cycle screen power

Change-Id: Idbfb7969b657086e31600ee2cb52b9d1f42bf70a
parent 834f7050
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -155,7 +155,10 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree

    /** {@inheritDoc} */
    public void onPause() {
        if (mUiContext != null) {
            mContext.unregisterReceiver(mThemeChangeReceiver);
            mUiContext = null;
        }
        mKeyguardStatusViewManager.onPause();
    }

@@ -165,7 +168,6 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree
        mLogin.setText("");
        mPassword.setText("");
        mLogin.requestFocus();
        ThemeUtils.registerThemeChangeReceiver(mContext, mThemeChangeReceiver);
        mKeyguardStatusViewManager.onResume();
    }

@@ -328,7 +330,7 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree

        if (mCheckingDialog == null) {
            mUiContext = ThemeUtils.createUiContext(mContext);

            ThemeUtils.registerThemeChangeReceiver(mContext, mThemeChangeReceiver);
            final Context context = mUiContext != null ? mUiContext : mContext;

            mCheckingDialog = new ProgressDialog(context);