Loading policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java +1 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback { public boolean stop() { if (DEBUG) Log.d(TAG, "stop()"); if (mHandler.getLooper() != Looper.myLooper()) { Log.e(TAG, "stop() called off of the UI thread"); Log.e(TAG, "stop() called from non-UI thread"); } boolean mWasRunning = mIsRunning; Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +10 −10 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ public class KeyguardHostView extends KeyguardViewBase { private static final String TAG = "KeyguardViewHost"; // Use this to debug all of keyguard public static boolean DEBUG; public static boolean DEBUG = KeyguardViewMediator.DEBUG; // also referenced in SecuritySettings.java static final int APPWIDGET_HOST_ID = 0x4B455947; Loading Loading @@ -618,8 +618,6 @@ public class KeyguardHostView extends KeyguardViewBase { break; } } boolean simPukFullScreen = getResources().getBoolean( com.android.internal.R.bool.kg_sim_puk_account_full_screen); int layoutId = getLayoutIdFor(securityMode); if (view == null && layoutId != 0) { final LayoutInflater inflater = LayoutInflater.from(mContext); Loading @@ -642,13 +640,6 @@ public class KeyguardHostView extends KeyguardViewBase { } } if (securityMode == SecurityMode.SimPin || securityMode == SecurityMode.SimPuk || securityMode == SecurityMode.Account) { if (simPukFullScreen) { mAppWidgetContainer.setVisibility(View.GONE); } } if (view instanceof KeyguardSelectorView) { KeyguardSelectorView selectorView = (KeyguardSelectorView) view; View carrierText = selectorView.findViewById(R.id.keyguard_selector_fade_container); Loading @@ -672,6 +663,15 @@ public class KeyguardHostView extends KeyguardViewBase { KeyguardSecurityView oldView = getSecurityView(mCurrentSecuritySelection); KeyguardSecurityView newView = getSecurityView(securityMode); // Enter full screen mode if we're in SIM or Account screen boolean fullScreenEnabled = getResources().getBoolean( com.android.internal.R.bool.kg_sim_puk_account_full_screen); boolean isSimOrAccount = securityMode == SecurityMode.SimPin || securityMode == SecurityMode.SimPuk || securityMode == SecurityMode.Account; mAppWidgetContainer.setVisibility( isSimOrAccount && fullScreenEnabled ? View.GONE : View.VISIBLE); // Emulate Activity life cycle if (oldView != null) { oldView.onPause(); Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +15 −14 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ import com.android.internal.widget.LockPatternUtils; * reported to this class by the current {@link KeyguardViewBase}. */ public class KeyguardViewManager { private final static boolean DEBUG = false; private final static boolean DEBUG = KeyguardViewMediator.DEBUG; private static String TAG = "KeyguardViewManager"; public static boolean USE_UPPER_CASE = true; Loading @@ -65,7 +65,6 @@ public class KeyguardViewManager { private FrameLayout mKeyguardHost; private KeyguardHostView mKeyguardView; private boolean mScreenOn = false; private LockPatternUtils mLockPatternUtils; public interface ShowListener { Loading Loading @@ -96,7 +95,7 @@ public class KeyguardViewManager { boolean enableScreenRotation = shouldEnableScreenRotation(); maybeCreateKeyguardLocked(enableScreenRotation, options); maybeCreateKeyguardLocked(enableScreenRotation, false, options); maybeEnableScreenRotation(enableScreenRotation); // Disable common aspects of the system/status/navigation bars that are not appropriate or Loading @@ -104,7 +103,7 @@ public class KeyguardViewManager { // activities. Other disabled bits are handled by the KeyguardViewMediator talking // directly to the status bar service. final int visFlags = View.STATUS_BAR_DISABLE_HOME; if (DEBUG) Log.v(TAG, "KGVM: Set visibility on " + mKeyguardHost + " to " + visFlags); if (DEBUG) Log.v(TAG, "show:setSystemUiVisibility(" + Integer.toHexString(visFlags)+")"); mKeyguardHost.setSystemUiVisibility(visFlags); mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); Loading @@ -127,7 +126,12 @@ public class KeyguardViewManager { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); maybeCreateKeyguardLocked(shouldEnableScreenRotation(), null); if (mKeyguardHost.getVisibility() == View.VISIBLE) { // only propagate configuration messages if we're currently showing maybeCreateKeyguardLocked(shouldEnableScreenRotation(), true, null); } else { if (DEBUG) Log.v(TAG, "onConfigurationChanged: view not visible"); } } @Override Loading @@ -145,7 +149,8 @@ public class KeyguardViewManager { SparseArray<Parcelable> mStateContainer = new SparseArray<Parcelable>(); private void maybeCreateKeyguardLocked(boolean enableScreenRotation, Bundle options) { private void maybeCreateKeyguardLocked(boolean enableScreenRotation, boolean force, Bundle options) { final boolean isActivity = (mContext instanceof Activity); // for test activity if (mKeyguardHost != null) { Loading Loading @@ -189,7 +194,9 @@ public class KeyguardViewManager { mViewManager.addView(mKeyguardHost, lp); } if (force || mKeyguardView == null) { inflateKeyguardView(options); } updateUserActivityTimeoutInWindowLayoutParams(); mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); Loading Loading @@ -230,10 +237,6 @@ public class KeyguardViewManager { mKeyguardView.showNextSecurityScreenIfPresent(); } } if (mScreenOn) { mKeyguardView.show(); } } public void updateUserActivityTimeout() { Loading Loading @@ -294,12 +297,11 @@ public class KeyguardViewManager { if (DEBUG) Log.d(TAG, "reset()"); // User might have switched, check if we need to go back to keyguard // TODO: It's preferable to stay and show the correct lockscreen or unlock if none maybeCreateKeyguardLocked(shouldEnableScreenRotation(), options); maybeCreateKeyguardLocked(shouldEnableScreenRotation(), true, options); } public synchronized void onScreenTurnedOff() { if (DEBUG) Log.d(TAG, "onScreenTurnedOff()"); mScreenOn = false; if (mKeyguardView != null) { mKeyguardView.onScreenTurnedOff(); } Loading @@ -308,7 +310,6 @@ public class KeyguardViewManager { public synchronized void onScreenTurnedOn( final KeyguardViewManager.ShowListener showListener) { if (DEBUG) Log.d(TAG, "onScreenTurnedOn()"); mScreenOn = true; if (mKeyguardView != null) { mKeyguardView.onScreenTurnedOn(); Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ import com.android.internal.widget.LockPatternUtils; */ public class KeyguardViewMediator { private static final int KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT = 30000; private final static boolean DEBUG = false; final static boolean DEBUG = true; private final static boolean DBG_WAKE = false; private final static String TAG = "KeyguardViewMediator"; Loading Loading
policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java +1 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback { public boolean stop() { if (DEBUG) Log.d(TAG, "stop()"); if (mHandler.getLooper() != Looper.myLooper()) { Log.e(TAG, "stop() called off of the UI thread"); Log.e(TAG, "stop() called from non-UI thread"); } boolean mWasRunning = mIsRunning; Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +10 −10 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ public class KeyguardHostView extends KeyguardViewBase { private static final String TAG = "KeyguardViewHost"; // Use this to debug all of keyguard public static boolean DEBUG; public static boolean DEBUG = KeyguardViewMediator.DEBUG; // also referenced in SecuritySettings.java static final int APPWIDGET_HOST_ID = 0x4B455947; Loading Loading @@ -618,8 +618,6 @@ public class KeyguardHostView extends KeyguardViewBase { break; } } boolean simPukFullScreen = getResources().getBoolean( com.android.internal.R.bool.kg_sim_puk_account_full_screen); int layoutId = getLayoutIdFor(securityMode); if (view == null && layoutId != 0) { final LayoutInflater inflater = LayoutInflater.from(mContext); Loading @@ -642,13 +640,6 @@ public class KeyguardHostView extends KeyguardViewBase { } } if (securityMode == SecurityMode.SimPin || securityMode == SecurityMode.SimPuk || securityMode == SecurityMode.Account) { if (simPukFullScreen) { mAppWidgetContainer.setVisibility(View.GONE); } } if (view instanceof KeyguardSelectorView) { KeyguardSelectorView selectorView = (KeyguardSelectorView) view; View carrierText = selectorView.findViewById(R.id.keyguard_selector_fade_container); Loading @@ -672,6 +663,15 @@ public class KeyguardHostView extends KeyguardViewBase { KeyguardSecurityView oldView = getSecurityView(mCurrentSecuritySelection); KeyguardSecurityView newView = getSecurityView(securityMode); // Enter full screen mode if we're in SIM or Account screen boolean fullScreenEnabled = getResources().getBoolean( com.android.internal.R.bool.kg_sim_puk_account_full_screen); boolean isSimOrAccount = securityMode == SecurityMode.SimPin || securityMode == SecurityMode.SimPuk || securityMode == SecurityMode.Account; mAppWidgetContainer.setVisibility( isSimOrAccount && fullScreenEnabled ? View.GONE : View.VISIBLE); // Emulate Activity life cycle if (oldView != null) { oldView.onPause(); Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +15 −14 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ import com.android.internal.widget.LockPatternUtils; * reported to this class by the current {@link KeyguardViewBase}. */ public class KeyguardViewManager { private final static boolean DEBUG = false; private final static boolean DEBUG = KeyguardViewMediator.DEBUG; private static String TAG = "KeyguardViewManager"; public static boolean USE_UPPER_CASE = true; Loading @@ -65,7 +65,6 @@ public class KeyguardViewManager { private FrameLayout mKeyguardHost; private KeyguardHostView mKeyguardView; private boolean mScreenOn = false; private LockPatternUtils mLockPatternUtils; public interface ShowListener { Loading Loading @@ -96,7 +95,7 @@ public class KeyguardViewManager { boolean enableScreenRotation = shouldEnableScreenRotation(); maybeCreateKeyguardLocked(enableScreenRotation, options); maybeCreateKeyguardLocked(enableScreenRotation, false, options); maybeEnableScreenRotation(enableScreenRotation); // Disable common aspects of the system/status/navigation bars that are not appropriate or Loading @@ -104,7 +103,7 @@ public class KeyguardViewManager { // activities. Other disabled bits are handled by the KeyguardViewMediator talking // directly to the status bar service. final int visFlags = View.STATUS_BAR_DISABLE_HOME; if (DEBUG) Log.v(TAG, "KGVM: Set visibility on " + mKeyguardHost + " to " + visFlags); if (DEBUG) Log.v(TAG, "show:setSystemUiVisibility(" + Integer.toHexString(visFlags)+")"); mKeyguardHost.setSystemUiVisibility(visFlags); mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); Loading @@ -127,7 +126,12 @@ public class KeyguardViewManager { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); maybeCreateKeyguardLocked(shouldEnableScreenRotation(), null); if (mKeyguardHost.getVisibility() == View.VISIBLE) { // only propagate configuration messages if we're currently showing maybeCreateKeyguardLocked(shouldEnableScreenRotation(), true, null); } else { if (DEBUG) Log.v(TAG, "onConfigurationChanged: view not visible"); } } @Override Loading @@ -145,7 +149,8 @@ public class KeyguardViewManager { SparseArray<Parcelable> mStateContainer = new SparseArray<Parcelable>(); private void maybeCreateKeyguardLocked(boolean enableScreenRotation, Bundle options) { private void maybeCreateKeyguardLocked(boolean enableScreenRotation, boolean force, Bundle options) { final boolean isActivity = (mContext instanceof Activity); // for test activity if (mKeyguardHost != null) { Loading Loading @@ -189,7 +194,9 @@ public class KeyguardViewManager { mViewManager.addView(mKeyguardHost, lp); } if (force || mKeyguardView == null) { inflateKeyguardView(options); } updateUserActivityTimeoutInWindowLayoutParams(); mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); Loading Loading @@ -230,10 +237,6 @@ public class KeyguardViewManager { mKeyguardView.showNextSecurityScreenIfPresent(); } } if (mScreenOn) { mKeyguardView.show(); } } public void updateUserActivityTimeout() { Loading Loading @@ -294,12 +297,11 @@ public class KeyguardViewManager { if (DEBUG) Log.d(TAG, "reset()"); // User might have switched, check if we need to go back to keyguard // TODO: It's preferable to stay and show the correct lockscreen or unlock if none maybeCreateKeyguardLocked(shouldEnableScreenRotation(), options); maybeCreateKeyguardLocked(shouldEnableScreenRotation(), true, options); } public synchronized void onScreenTurnedOff() { if (DEBUG) Log.d(TAG, "onScreenTurnedOff()"); mScreenOn = false; if (mKeyguardView != null) { mKeyguardView.onScreenTurnedOff(); } Loading @@ -308,7 +310,6 @@ public class KeyguardViewManager { public synchronized void onScreenTurnedOn( final KeyguardViewManager.ShowListener showListener) { if (DEBUG) Log.d(TAG, "onScreenTurnedOn()"); mScreenOn = true; if (mKeyguardView != null) { mKeyguardView.onScreenTurnedOn(); Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ import com.android.internal.widget.LockPatternUtils; */ public class KeyguardViewMediator { private static final int KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT = 30000; private final static boolean DEBUG = false; final static boolean DEBUG = true; private final static boolean DBG_WAKE = false; private final static String TAG = "KeyguardViewMediator"; Loading