summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java24
1 files changed, 19 insertions, 5 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
index aa43711..7e4e56c 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
@@ -127,6 +127,8 @@ public class KeyguardHostView extends KeyguardViewBase {
protected boolean mShowSecurityWhenReturn;
+ private final Rect mInsets = new Rect();
+
/*package*/ interface UserSwitcherCallback {
void hideSecurityView(int duration);
void showSecurityView();
@@ -402,11 +404,6 @@ public class KeyguardHostView extends KeyguardViewBase {
updateSecurityViews();
}
- public void setScrimView(View scrim) {
- if (mSlidingChallengeLayout != null) mSlidingChallengeLayout.setScrimView(scrim);
- if (mMultiPaneChallengeLayout != null) mMultiPaneChallengeLayout.setScrimView(scrim);
- }
-
private void setBackButtonEnabled(boolean enabled) {
if (mContext instanceof Activity) return; // always enabled in activity mode
setSystemUiVisibility(enabled ?
@@ -1348,6 +1345,7 @@ public class KeyguardHostView extends KeyguardViewBase {
static class SavedState extends BaseSavedState {
int transportState;
int appWidgetToShow = AppWidgetManager.INVALID_APPWIDGET_ID;
+ Rect insets = new Rect();
SavedState(Parcelable superState) {
super(superState);
@@ -1357,6 +1355,7 @@ public class KeyguardHostView extends KeyguardViewBase {
super(in);
this.transportState = in.readInt();
this.appWidgetToShow = in.readInt();
+ this.insets = in.readParcelable(null);
}
@Override
@@ -1364,6 +1363,7 @@ public class KeyguardHostView extends KeyguardViewBase {
super.writeToParcel(out, flags);
out.writeInt(this.transportState);
out.writeInt(this.appWidgetToShow);
+ out.writeParcelable(insets, 0);
}
public static final Parcelable.Creator<SavedState> CREATOR
@@ -1388,6 +1388,7 @@ public class KeyguardHostView extends KeyguardViewBase {
&& mAppWidgetContainer.getWidgetPageIndex(mTransportControl) >= 0;
ss.transportState = showing ? TRANSPORT_VISIBLE : mTransportState;
ss.appWidgetToShow = mAppWidgetToShow;
+ ss.insets.set(mInsets);
return ss;
}
@@ -1401,11 +1402,24 @@ public class KeyguardHostView extends KeyguardViewBase {
super.onRestoreInstanceState(ss.getSuperState());
mTransportState = (ss.transportState);
mAppWidgetToShow = ss.appWidgetToShow;
+ setInsets(ss.insets);
if (DEBUG) Log.d(TAG, "onRestoreInstanceState, transport=" + mTransportState);
post(mSwitchPageRunnable);
}
@Override
+ protected boolean fitSystemWindows(Rect insets) {
+ setInsets(insets);
+ return true;
+ }
+
+ private void setInsets(Rect insets) {
+ mInsets.set(insets);
+ if (mSlidingChallengeLayout != null) mSlidingChallengeLayout.setInsets(mInsets);
+ if (mMultiPaneChallengeLayout != null) mMultiPaneChallengeLayout.setInsets(mInsets);
+ }
+
+ @Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
if (DEBUG) Log.d(TAG, "Window is " + (hasWindowFocus ? "focused" : "unfocused"));