Loading policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -609,6 +609,10 @@ class KeyguardStatusViewManager implements OnClickListener { public void onClockVisibilityChanged() { public void onClockVisibilityChanged() { // ignored // ignored } } public void onDeviceProvisioned() { // ignored } }; }; private SimStateCallback mSimStateCallback = new SimStateCallback() { private SimStateCallback mSimStateCallback = new SimStateCallback() { Loading policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java +28 −5 Original line number Original line Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class KeyguardUpdateMonitor { private static final int MSG_RINGER_MODE_CHANGED = 305; private static final int MSG_RINGER_MODE_CHANGED = 305; private static final int MSG_PHONE_STATE_CHANGED = 306; private static final int MSG_PHONE_STATE_CHANGED = 306; private static final int MSG_CLOCK_VISIBILITY_CHANGED = 307; private static final int MSG_CLOCK_VISIBILITY_CHANGED = 307; private static final int MSG_DEVICE_PROVISIONED = 308; /** /** * When we receive a * When we receive a Loading Loading @@ -178,6 +179,9 @@ public class KeyguardUpdateMonitor { case MSG_CLOCK_VISIBILITY_CHANGED: case MSG_CLOCK_VISIBILITY_CHANGED: handleClockVisibilityChanged(); handleClockVisibilityChanged(); break; break; case MSG_DEVICE_PROVISIONED: handleDeviceProvisioned(); break; } } } } }; }; Loading @@ -197,10 +201,8 @@ public class KeyguardUpdateMonitor { super.onChange(selfChange); super.onChange(selfChange); mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(), mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.DEVICE_PROVISIONED, 0) != 0; Settings.Secure.DEVICE_PROVISIONED, 0) != 0; if (mDeviceProvisioned && mContentObserver != null) { if (mDeviceProvisioned) { // We don't need the observer anymore... mHandler.sendMessage(mHandler.obtainMessage(MSG_DEVICE_PROVISIONED)); mContext.getContentResolver().unregisterContentObserver(mContentObserver); mContentObserver = null; } } if (DEBUG) Log.d(TAG, "DEVICE_PROVISIONED state = " + mDeviceProvisioned); if (DEBUG) Log.d(TAG, "DEVICE_PROVISIONED state = " + mDeviceProvisioned); } } Loading @@ -212,8 +214,14 @@ public class KeyguardUpdateMonitor { // prevent a race condition between where we check the flag and where we register the // prevent a race condition between where we check the flag and where we register the // observer by grabbing the value once again... // observer by grabbing the value once again... mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(), boolean provisioned = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.DEVICE_PROVISIONED, 0) != 0; Settings.Secure.DEVICE_PROVISIONED, 0) != 0; if (provisioned != mDeviceProvisioned) { mDeviceProvisioned = provisioned; if (mDeviceProvisioned) { mHandler.sendMessage(mHandler.obtainMessage(MSG_DEVICE_PROVISIONED)); } } } } // take a guess to start // take a guess to start Loading Loading @@ -271,6 +279,17 @@ public class KeyguardUpdateMonitor { }, filter); }, filter); } } protected void handleDeviceProvisioned() { for (int i = 0; i < mInfoCallbacks.size(); i++) { mInfoCallbacks.get(i).onDeviceProvisioned(); } if (mContentObserver != null) { // We don't need the observer anymore... mContext.getContentResolver().unregisterContentObserver(mContentObserver); mContentObserver = null; } } protected void handlePhoneStateChanged(String newState) { protected void handlePhoneStateChanged(String newState) { if (DEBUG) Log.d(TAG, "handlePhoneStateChanged(" + newState + ")"); if (DEBUG) Log.d(TAG, "handlePhoneStateChanged(" + newState + ")"); if (TelephonyManager.EXTRA_STATE_IDLE.equals(newState)) { if (TelephonyManager.EXTRA_STATE_IDLE.equals(newState)) { Loading Loading @@ -477,6 +496,10 @@ public class KeyguardUpdateMonitor { */ */ void onClockVisibilityChanged(); void onClockVisibilityChanged(); /** * Called when the device becomes provisioned */ void onDeviceProvisioned(); } } /** /** Loading policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1316,4 +1316,9 @@ public class KeyguardViewMediator implements KeyguardViewCallback, public void onTimeChanged() { public void onTimeChanged() { // ignored // ignored } } /** {@inheritDoc} */ public void onDeviceProvisioned() { mContext.sendBroadcast(mUserPresentIntent); } } } policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -649,6 +649,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler public void onRingerModeChanged(int state) {} public void onRingerModeChanged(int state) {} @Override @Override public void onClockVisibilityChanged() {} public void onClockVisibilityChanged() {} @Override public void onDeviceProvisioned() {} //We need to stop faceunlock when a phonecall comes in //We need to stop faceunlock when a phonecall comes in @Override @Override Loading Loading
policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -609,6 +609,10 @@ class KeyguardStatusViewManager implements OnClickListener { public void onClockVisibilityChanged() { public void onClockVisibilityChanged() { // ignored // ignored } } public void onDeviceProvisioned() { // ignored } }; }; private SimStateCallback mSimStateCallback = new SimStateCallback() { private SimStateCallback mSimStateCallback = new SimStateCallback() { Loading
policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java +28 −5 Original line number Original line Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class KeyguardUpdateMonitor { private static final int MSG_RINGER_MODE_CHANGED = 305; private static final int MSG_RINGER_MODE_CHANGED = 305; private static final int MSG_PHONE_STATE_CHANGED = 306; private static final int MSG_PHONE_STATE_CHANGED = 306; private static final int MSG_CLOCK_VISIBILITY_CHANGED = 307; private static final int MSG_CLOCK_VISIBILITY_CHANGED = 307; private static final int MSG_DEVICE_PROVISIONED = 308; /** /** * When we receive a * When we receive a Loading Loading @@ -178,6 +179,9 @@ public class KeyguardUpdateMonitor { case MSG_CLOCK_VISIBILITY_CHANGED: case MSG_CLOCK_VISIBILITY_CHANGED: handleClockVisibilityChanged(); handleClockVisibilityChanged(); break; break; case MSG_DEVICE_PROVISIONED: handleDeviceProvisioned(); break; } } } } }; }; Loading @@ -197,10 +201,8 @@ public class KeyguardUpdateMonitor { super.onChange(selfChange); super.onChange(selfChange); mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(), mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.DEVICE_PROVISIONED, 0) != 0; Settings.Secure.DEVICE_PROVISIONED, 0) != 0; if (mDeviceProvisioned && mContentObserver != null) { if (mDeviceProvisioned) { // We don't need the observer anymore... mHandler.sendMessage(mHandler.obtainMessage(MSG_DEVICE_PROVISIONED)); mContext.getContentResolver().unregisterContentObserver(mContentObserver); mContentObserver = null; } } if (DEBUG) Log.d(TAG, "DEVICE_PROVISIONED state = " + mDeviceProvisioned); if (DEBUG) Log.d(TAG, "DEVICE_PROVISIONED state = " + mDeviceProvisioned); } } Loading @@ -212,8 +214,14 @@ public class KeyguardUpdateMonitor { // prevent a race condition between where we check the flag and where we register the // prevent a race condition between where we check the flag and where we register the // observer by grabbing the value once again... // observer by grabbing the value once again... mDeviceProvisioned = Settings.Secure.getInt(mContext.getContentResolver(), boolean provisioned = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.DEVICE_PROVISIONED, 0) != 0; Settings.Secure.DEVICE_PROVISIONED, 0) != 0; if (provisioned != mDeviceProvisioned) { mDeviceProvisioned = provisioned; if (mDeviceProvisioned) { mHandler.sendMessage(mHandler.obtainMessage(MSG_DEVICE_PROVISIONED)); } } } } // take a guess to start // take a guess to start Loading Loading @@ -271,6 +279,17 @@ public class KeyguardUpdateMonitor { }, filter); }, filter); } } protected void handleDeviceProvisioned() { for (int i = 0; i < mInfoCallbacks.size(); i++) { mInfoCallbacks.get(i).onDeviceProvisioned(); } if (mContentObserver != null) { // We don't need the observer anymore... mContext.getContentResolver().unregisterContentObserver(mContentObserver); mContentObserver = null; } } protected void handlePhoneStateChanged(String newState) { protected void handlePhoneStateChanged(String newState) { if (DEBUG) Log.d(TAG, "handlePhoneStateChanged(" + newState + ")"); if (DEBUG) Log.d(TAG, "handlePhoneStateChanged(" + newState + ")"); if (TelephonyManager.EXTRA_STATE_IDLE.equals(newState)) { if (TelephonyManager.EXTRA_STATE_IDLE.equals(newState)) { Loading Loading @@ -477,6 +496,10 @@ public class KeyguardUpdateMonitor { */ */ void onClockVisibilityChanged(); void onClockVisibilityChanged(); /** * Called when the device becomes provisioned */ void onDeviceProvisioned(); } } /** /** Loading
policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1316,4 +1316,9 @@ public class KeyguardViewMediator implements KeyguardViewCallback, public void onTimeChanged() { public void onTimeChanged() { // ignored // ignored } } /** {@inheritDoc} */ public void onDeviceProvisioned() { mContext.sendBroadcast(mUserPresentIntent); } } }
policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -649,6 +649,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler public void onRingerModeChanged(int state) {} public void onRingerModeChanged(int state) {} @Override @Override public void onClockVisibilityChanged() {} public void onClockVisibilityChanged() {} @Override public void onDeviceProvisioned() {} //We need to stop faceunlock when a phonecall comes in //We need to stop faceunlock when a phonecall comes in @Override @Override Loading