summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2016-04-05 10:39:46 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-04-05 13:28:52 -0700
commitb333640501d4410d858ed0850c3752edb817ed6f (patch)
tree6fcdb10b4bd6088e8b7fea28d6ed76f7ae2e4091 /packages/SystemUI
parent12a8ab90789bc3596e16313a15f03c102b5fda1f (diff)
downloadframeworks_base-b333640501d4410d858ed0850c3752edb817ed6f.zip
frameworks_base-b333640501d4410d858ed0850c3752edb817ed6f.tar.gz
frameworks_base-b333640501d4410d858ed0850c3752edb817ed6f.tar.bz2
Lockscreen : Fix bottom area visibility
NIGHTLIES-2754 CYNGNOS-2349 Change-Id: I93ebd95fb15effed83659fadb92f76bf37b39f37
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index 8ce84ba..5303377 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -129,6 +129,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
private boolean mBottomAreaAttached;
private final WindowManager.LayoutParams mWindowLayoutParams;
private OnInterceptTouchEventListener mInterceptTouchListener;
+ private BroadcastReceiver mDevicePolicyReceiver;
private final ServiceConnection mPrewarmConnection = new ServiceConnection() {
@@ -179,7 +180,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
private void removeKeyguardBottomArea() {
if (mBottomAreaAttached) {
try {
- mWindowManager.removeViewImmediate(this);
+ mWindowManager.removeView(this);
} catch (IllegalArgumentException e) {
Log.e(TAG, e.getMessage());
}
@@ -477,6 +478,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
private void watchForCameraPolicyChanges() {
final IntentFilter filter = new IntentFilter();
filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
+ mDevicePolicyReceiver = new DevicePolicyBroadcastReceiver();
getContext().registerReceiverAsUser(mDevicePolicyReceiver,
UserHandle.ALL, filter, null, null);
KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateMonitorCallback);
@@ -774,7 +776,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
.setDuration(DOZE_ANIMATION_ELEMENT_DURATION);
}
- private final BroadcastReceiver mDevicePolicyReceiver = new BroadcastReceiver() {
+ private final class DevicePolicyBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
post(new Runnable() {
@@ -898,7 +900,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
mAccessibilityController.removeStateChangedCallback(this);
- mContext.unregisterReceiver(mDevicePolicyReceiver);
+ if (mDevicePolicyReceiver != null) {
+ mContext.unregisterReceiver(mDevicePolicyReceiver);
+ mDevicePolicyReceiver = null;
+ }
mShortcutHelper.cleanup();
mUnlockMethodCache.removeListener(this);
}