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

Commit aaee139c authored by Jim Miller's avatar Jim Miller Committed by Android Git Automerger
Browse files

am 1ae85153: Merge "Fix missing transport in keyguard" into klp-dev

* commit '1ae85153':
  Fix missing transport in keyguard
parents a192253b 1ae85153
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -249,11 +249,11 @@ public class KeyguardUpdateMonitor {
            if (Intent.ACTION_TIME_TICK.equals(action)
                    || Intent.ACTION_TIME_CHANGED.equals(action)
                    || Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_TIME_UPDATE));
                mHandler.sendEmptyMessage(MSG_TIME_UPDATE);
            } else if (TelephonyIntents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
                mTelephonyPlmn = getTelephonyPlmnFrom(intent);
                mTelephonySpn = getTelephonySpnFrom(intent);
                mHandler.sendMessage(mHandler.obtainMessage(MSG_CARRIER_INFO_UPDATE));
                mHandler.sendEmptyMessage(MSG_CARRIER_INFO_UPDATE);
            } else if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
                final int status = intent.getIntExtra(EXTRA_STATUS, BATTERY_STATUS_UNKNOWN);
                final int plugged = intent.getIntExtra(EXTRA_PLUGGED, 0);
@@ -277,12 +277,12 @@ public class KeyguardUpdateMonitor {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_PHONE_STATE_CHANGED, state));
            } else if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED
                    .equals(action)) {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_DPM_STATE_CHANGED));
                mHandler.sendEmptyMessage(MSG_DPM_STATE_CHANGED);
            } else if (Intent.ACTION_USER_REMOVED.equals(action)) {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_REMOVED,
                       intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0), 0));
            } else if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_BOOT_COMPLETED));
                dispatchBootCompleted();
            }
        }
    };
@@ -520,7 +520,7 @@ public class KeyguardUpdateMonitor {
                super.onChange(selfChange);
                mDeviceProvisioned = isDeviceProvisionedInSettingsDb();
                if (mDeviceProvisioned) {
                    mHandler.sendMessage(mHandler.obtainMessage(MSG_DEVICE_PROVISIONED));
                    mHandler.sendEmptyMessage(MSG_DEVICE_PROVISIONED);
                }
                if (DEBUG) Log.d(TAG, "DEVICE_PROVISIONED state = " + mDeviceProvisioned);
            }
@@ -536,7 +536,7 @@ public class KeyguardUpdateMonitor {
        if (provisioned != mDeviceProvisioned) {
            mDeviceProvisioned = provisioned;
            if (mDeviceProvisioned) {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_DEVICE_PROVISIONED));
                mHandler.sendEmptyMessage(MSG_DEVICE_PROVISIONED);
            }
        }
    }
@@ -581,6 +581,18 @@ public class KeyguardUpdateMonitor {
        }
    }

    /**
     * This is exposed since {@link Intent#ACTION_BOOT_COMPLETED} is not sticky. If
     * keyguard crashes sometime after boot, then it will never receive this
     * broadcast and hence not handle the event. This method is ultimately called by
     * PhoneWindowManager in this case.
     */
    protected void dispatchBootCompleted() {
        if (!mBootCompleted) {
            mHandler.sendEmptyMessage(MSG_BOOT_COMPLETED);
        }
    }

    /**
     * Handle {@link #MSG_BOOT_COMPLETED}
     */
+3 −0
Original line number Diff line number Diff line
@@ -528,6 +528,9 @@ public class KeyguardViewMediator {
            mSystemReady = true;
            mUpdateMonitor.registerCallback(mUpdateCallback);

            // Send boot completed message if it hasn't already been sent.
            mUpdateMonitor.dispatchBootCompleted();

            // Suppress biometric unlock right after boot until things have settled if it is the
            // selected security method, otherwise unsuppress it.  It must be unsuppressed if it is
            // not the selected security method for the following reason:  if the user starts