diff options
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 1 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 8234dcd..e79453e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -3698,6 +3698,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mIconController.updateResources(); mScreenPinningRequest.onConfigurationChanged(); mNetworkController.onConfigurationChanged(); + mStatusBarWindowManager.onConfigurationChanged(newConfig); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java index 96a4960..d0d56c7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.content.res.Resources; import android.database.ContentObserver; import android.graphics.Point; @@ -65,6 +66,7 @@ public class StatusBarWindowManager implements KeyguardMonitor.Callback { private final SurfaceSession mFxSession; private final KeyguardMonitor mKeyguardMonitor; + private int mCurrentOrientation; private static final int TYPE_LAYER_MULTIPLIER = 10000; // refer to WindowManagerService.TYPE_LAYER_MULTIPLIER private static final int TYPE_LAYER_OFFSET = 1000; // refer to WindowManagerService.TYPE_LAYER_OFFSET @@ -137,6 +139,7 @@ public class StatusBarWindowManager implements KeyguardMonitor.Callback { Display display = mWindowManager.getDefaultDisplay(); Point xy = new Point(); display.getRealSize(xy); + mCurrentOrientation = mContext.getResources().getConfiguration().orientation; mKeyguardBlur = new BlurLayer(mFxSession, xy.x, xy.y, "KeyGuard"); if (mKeyguardBlur != null) { mKeyguardBlur.setLayer(STATUS_BAR_LAYER - 2); @@ -360,6 +363,16 @@ public class StatusBarWindowManager implements KeyguardMonitor.Callback { setKeyguardOccluded(hasFocus); } + public void onConfigurationChanged(Configuration newConfig) { + if (mKeyguardBlur != null && newConfig.orientation != mCurrentOrientation) { + Display display = mWindowManager.getDefaultDisplay(); + Point xy = new Point(); + display.getRealSize(xy); + mKeyguardBlur.setSize(xy.x, xy.y); + mCurrentOrientation = newConfig.orientation; + } + } + /** * @param state The {@link StatusBarState} of the status bar. */ |