diff options
author | Matt Lee <matthewhlee@google.com> | 2022-06-12 23:19:47 +0000 |
---|---|---|
committer | Matt Lee <matthewhlee@google.com> | 2022-06-12 23:19:47 +0000 |
commit | 2ee3b28251c8f6864a6dbcd229b7a1641a4782e4 (patch) | |
tree | 3577b78cd7727ed3695b831753db86a62462ed7b /packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java | |
parent | 64c414abd49acc8d488837ab90b51d822c23e66d (diff) |
Revert "Merge s-mpr-2022-06"
Revert submission 732792
Reason for revert: build failure
Reverted Changes:
I3cbe7c924:Merge s-mpr-2022-06
I9881453ba:Don't set background color if TDA doesn't have a v...
I57fa88c6f:Use TDA for background color instead of new color ...
Ic2fa89b76:Dialing phone state should update active sub
Change-Id: I9709841558bfcb325f7e205f5f5ec89c620d14dd
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java index 87e853cf64d7..099dd5d82a10 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java @@ -18,7 +18,6 @@ package com.android.keyguard; import android.content.Context; import android.content.res.ColorStateList; -import android.content.res.Configuration; import android.content.res.TypedArray; import android.graphics.Color; import android.os.Handler; @@ -31,8 +30,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; -import androidx.annotation.Nullable; - import com.android.internal.policy.SystemBarUtils; import com.android.settingslib.Utils; import com.android.systemui.R; @@ -60,14 +57,8 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp private ColorStateList mNextMessageColorState = ColorStateList.valueOf(DEFAULT_COLOR); private boolean mBouncerVisible; private boolean mAltBouncerShowing; - /** - * Container that wraps the KeyguardMessageArea - may be null if current view hierarchy doesn't - * contain {@link R.id.keyguard_message_area_container}. - */ - @Nullable private ViewGroup mContainer; - private int mContainerTopMargin; - private int mLastOrientation = -1; + private int mTopMargin; public KeyguardMessageArea(Context context, AttributeSet attrs) { super(context, attrs); @@ -83,31 +74,16 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp mContainer = getRootView().findViewById(R.id.keyguard_message_area_container); } - void onConfigChanged(Configuration newConfig) { - if (mContainer == null) { + void onConfigChanged() { + final int newTopMargin = SystemBarUtils.getStatusBarHeight(getContext()); + if (mTopMargin == newTopMargin) { return; } - final int newTopMargin = SystemBarUtils.getStatusBarHeight(getContext()); - if (mContainerTopMargin != newTopMargin) { - mContainerTopMargin = newTopMargin; - ViewGroup.MarginLayoutParams lp = + mTopMargin = newTopMargin; + ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) mContainer.getLayoutParams(); - lp.topMargin = mContainerTopMargin; - mContainer.setLayoutParams(lp); - } - - if (mLastOrientation != newConfig.orientation) { - mLastOrientation = newConfig.orientation; - int messageAreaTopMargin = 0; - if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { - messageAreaTopMargin = mContext.getResources().getDimensionPixelSize( - R.dimen.keyguard_lock_padding); - } - - ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) getLayoutParams(); - lp.topMargin = messageAreaTopMargin; - setLayoutParams(lp); - } + lp.topMargin = mTopMargin; + mContainer.setLayoutParams(lp); } @Override |