Loading packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java +7 −1 Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ public class KeyguardViewManager { private static final int BACKGROUND_COLOR = 0x70000000; private Drawable mCustomBackground; private Configuration mLastConfiguration; // This is a faster way to draw the background on devices without hardware acceleration private final Drawable mBackgroundDrawable = new Drawable() { Loading Loading @@ -198,6 +199,7 @@ public class KeyguardViewManager { public ViewManagerHost(Context context) { super(context); setBackground(mBackgroundDrawable); mLastConfiguration = context.getResources().getConfiguration(); } public void drawToCanvas(Canvas canvas, Drawable drawable) { Loading Loading @@ -286,12 +288,16 @@ public class KeyguardViewManager { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (mKeyguardHost.getVisibility() == View.VISIBLE) { int diff = newConfig.diff(mLastConfiguration); if ((diff & ~(ActivityInfo.CONFIG_MCC | ActivityInfo.CONFIG_MNC)) == 0) { if (DEBUG) Log.v(TAG, "onConfigurationChanged: no relevant changes"); } else 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"); } mLastConfiguration = newConfig; } @Override Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java +7 −1 Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ public class KeyguardViewManager { private static final int BACKGROUND_COLOR = 0x70000000; private Drawable mCustomBackground; private Configuration mLastConfiguration; // This is a faster way to draw the background on devices without hardware acceleration private final Drawable mBackgroundDrawable = new Drawable() { Loading Loading @@ -198,6 +199,7 @@ public class KeyguardViewManager { public ViewManagerHost(Context context) { super(context); setBackground(mBackgroundDrawable); mLastConfiguration = context.getResources().getConfiguration(); } public void drawToCanvas(Canvas canvas, Drawable drawable) { Loading Loading @@ -286,12 +288,16 @@ public class KeyguardViewManager { @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (mKeyguardHost.getVisibility() == View.VISIBLE) { int diff = newConfig.diff(mLastConfiguration); if ((diff & ~(ActivityInfo.CONFIG_MCC | ActivityInfo.CONFIG_MNC)) == 0) { if (DEBUG) Log.v(TAG, "onConfigurationChanged: no relevant changes"); } else 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"); } mLastConfiguration = newConfig; } @Override Loading