diff options
8 files changed, 161 insertions, 120 deletions
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml index e47eed9ea04a..d27fa192e741 100644 --- a/packages/SystemUI/res/layout/keyguard_status_bar.xml +++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml @@ -60,9 +60,8 @@ </com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer> <FrameLayout android:id="@+id/system_icons_container" - android:layout_width="0dp" + android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_weight="1" android:layout_marginEnd="@dimen/status_bar_padding_end" android:gravity="center_vertical|end"> <include layout="@layout/system_icons" /> diff --git a/packages/SystemUI/res/layout/notification_icon_area.xml b/packages/SystemUI/res/layout/notification_icon_area.xml index fa696cc1f54c..aadfae8c5aed 100644 --- a/packages/SystemUI/res/layout/notification_icon_area.xml +++ b/packages/SystemUI/res/layout/notification_icon_area.xml @@ -14,18 +14,9 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License --> -<com.android.keyguard.AlphaOptimizedLinearLayout +<com.android.systemui.statusbar.phone.NotificationIconContainer xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/notification_icon_area_inner" - android:layout_width="match_parent" + android:id="@+id/notificationIcons" + android:layout_width="wrap_content" android:layout_height="match_parent" - android:clipChildren="false"> - <com.android.systemui.statusbar.phone.NotificationIconContainer - android:id="@+id/notificationIcons" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignParentStart="true" - android:gravity="center_vertical" - android:orientation="horizontal" - android:clipChildren="false"/> -</com.android.keyguard.AlphaOptimizedLinearLayout>
\ No newline at end of file + android:clipChildren="false"/>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml index deab1ebd6507..e281511140c7 100644 --- a/packages/SystemUI/res/layout/status_bar.xml +++ b/packages/SystemUI/res/layout/status_bar.xml @@ -47,52 +47,63 @@ android:paddingStart="@dimen/status_bar_padding_start" android:paddingEnd="@dimen/status_bar_padding_end" android:paddingTop="@dimen/status_bar_padding_top" - android:orientation="horizontal" - > + android:orientation="horizontal"> + + <!-- Container for the entire start half of the status bar. It will always use the same + width, independent of the number of visible children and sub-children. --> <FrameLayout + android:id="@+id/status_bar_start_side_container" android:layout_height="match_parent" android:layout_width="0dp" android:layout_weight="1"> - <include layout="@layout/heads_up_status_bar_layout" /> + <!-- Container that is wrapped around the views on the start half of the status bar. + Its width will change with the number of visible children and sub-children. + It is useful when we want to know the visible bounds of the content. --> + <FrameLayout + android:id="@+id/status_bar_start_side_content" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:clipChildren="false"> - <!-- The alpha of the left side is controlled by PhoneStatusBarTransitions, and the - individual views are controlled by StatusBarManager disable flags DISABLE_CLOCK and - DISABLE_NOTIFICATION_ICONS, respectively --> - <LinearLayout - android:id="@+id/status_bar_left_side" - android:layout_height="match_parent" - android:layout_width="match_parent" - android:clipChildren="false" - > - <ViewStub - android:id="@+id/operator_name" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout="@layout/operator_name" /> + <include layout="@layout/heads_up_status_bar_layout" /> - <com.android.systemui.statusbar.policy.Clock - android:id="@+id/clock" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:textAppearance="@style/TextAppearance.StatusBar.Clock" - android:singleLine="true" - android:paddingStart="@dimen/status_bar_left_clock_starting_padding" - android:paddingEnd="@dimen/status_bar_left_clock_end_padding" - android:gravity="center_vertical|start" - /> - - <include layout="@layout/ongoing_call_chip" /> - - <com.android.systemui.statusbar.AlphaOptimizedFrameLayout - android:id="@+id/notification_icon_area" - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="horizontal" - android:clipChildren="false"/> + <!-- The alpha of the start side is controlled by PhoneStatusBarTransitions, and the + individual views are controlled by StatusBarManager disable flags DISABLE_CLOCK + and DISABLE_NOTIFICATION_ICONS, respectively --> + <LinearLayout + android:id="@+id/status_bar_start_side_except_heads_up" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:clipChildren="false"> + <ViewStub + android:id="@+id/operator_name" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout="@layout/operator_name" /> + + <com.android.systemui.statusbar.policy.Clock + android:id="@+id/clock" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:textAppearance="@style/TextAppearance.StatusBar.Clock" + android:singleLine="true" + android:paddingStart="@dimen/status_bar_left_clock_starting_padding" + android:paddingEnd="@dimen/status_bar_left_clock_end_padding" + android:gravity="center_vertical|start" + /> + + <include layout="@layout/ongoing_call_chip" /> - </LinearLayout> + <com.android.systemui.statusbar.AlphaOptimizedFrameLayout + android:id="@+id/notification_icon_area" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:orientation="horizontal" + android:clipChildren="false"/> + + </LinearLayout> + </FrameLayout> </FrameLayout> <!-- Space should cover the notch (if it exists) and let other views lay out around it --> @@ -103,42 +114,57 @@ android:gravity="center_horizontal|center_vertical" /> - <com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/system_icon_area" + <!-- Container for the entire end half of the status bar. It will always use the same + width, independent of the number of visible children and sub-children. --> + <FrameLayout + android:id="@+id/status_bar_end_side_container" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" - android:orientation="horizontal" - android:gravity="center_vertical|end" - > - - <com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer - android:id="@+id/user_switcher_container" + android:clipChildren="false"> + + <!-- Container that is wrapped around the views on the end half of the + status bar. Its width will change with the number of visible children and + sub-children. + It is useful when we want know the visible bounds of the content.--> + <com.android.keyguard.AlphaOptimizedLinearLayout + android:id="@+id/status_bar_end_side_content" android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" + android:layout_height="match_parent" + android:layout_gravity="end" android:orientation="horizontal" - android:paddingTop="4dp" - android:paddingBottom="4dp" - android:paddingStart="8dp" - android:paddingEnd="8dp" - android:layout_marginEnd="16dp" - android:background="@drawable/status_bar_user_chip_bg" - android:visibility="visible" > - <ImageView android:id="@+id/current_user_avatar" - android:layout_width="@dimen/multi_user_avatar_keyguard_size" - android:layout_height="@dimen/multi_user_avatar_keyguard_size" - android:scaleType="centerInside" - android:paddingEnd="4dp" /> - - <TextView android:id="@+id/current_user_name" + android:gravity="center_vertical|end" + android:clipChildren="false"> + + <com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer + android:id="@+id/user_switcher_container" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textAppearance="@style/TextAppearance.StatusBar.Clock" - /> - </com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer> - - <include layout="@layout/system_icons" /> - </com.android.keyguard.AlphaOptimizedLinearLayout> + android:gravity="center" + android:orientation="horizontal" + android:paddingTop="4dp" + android:paddingBottom="4dp" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:layout_marginEnd="16dp" + android:background="@drawable/status_bar_user_chip_bg" + android:visibility="visible" > + <ImageView android:id="@+id/current_user_avatar" + android:layout_width="@dimen/multi_user_avatar_keyguard_size" + android:layout_height="@dimen/multi_user_avatar_keyguard_size" + android:scaleType="centerInside" + android:paddingEnd="4dp" /> + + <TextView android:id="@+id/current_user_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.StatusBar.Clock" + /> + </com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer> + + <include layout="@layout/system_icons" /> + </com.android.keyguard.AlphaOptimizedLinearLayout> + </FrameLayout> </LinearLayout> <ViewStub diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java index 2dc3261eb886..a2140c6ab6b7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License */ - package com.android.systemui.statusbar.phone; import static com.android.systemui.statusbar.phone.HeadsUpAppearanceController.CONTENT_FADE_DELAY; @@ -31,6 +30,7 @@ import android.util.MathUtils; import android.util.Property; import android.view.ContextThemeWrapper; import android.view.View; +import android.view.ViewGroup; import android.view.animation.Interpolator; import androidx.annotation.VisibleForTesting; @@ -40,7 +40,6 @@ import com.android.internal.statusbar.StatusBarIcon; import com.android.settingslib.Utils; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; -import com.android.systemui.statusbar.AlphaOptimizedFrameLayout; import com.android.systemui.statusbar.StatusBarIconView; import com.android.systemui.statusbar.notification.stack.AnimationFilter; import com.android.systemui.statusbar.notification.stack.AnimationProperties; @@ -54,7 +53,7 @@ import java.util.function.Consumer; * A container for notification icons. It handles overflowing icons properly and positions them * correctly on the screen. */ -public class NotificationIconContainer extends AlphaOptimizedFrameLayout { +public class NotificationIconContainer extends ViewGroup { /** * A float value indicating how much before the overflow start the icons should transform into * a dot. A value of 0 means that they are exactly at the end and a value of 1 means it starts @@ -232,6 +231,31 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { } @Override + public boolean hasOverlappingRendering() { + // Does the same as "AlphaOptimizedFrameLayout". + return false; + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + final int childCount = getChildCount(); + final int maxVisibleIcons = getMaxVisibleIcons(childCount); + final int width = MeasureSpec.getSize(widthMeasureSpec); + final int childWidthSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.UNSPECIFIED); + int totalWidth = (int) (getActualPaddingStart() + getActualPaddingEnd()); + for (int i = 0; i < childCount; i++) { + View child = getChildAt(i); + measureChild(child, childWidthSpec, heightMeasureSpec); + if (i <= maxVisibleIcons) { + totalWidth += child.getMeasuredWidth(); + } + } + final int measuredWidth = resolveSize(totalWidth, widthMeasureSpec); + final int measuredHeight = MeasureSpec.getSize(heightMeasureSpec); + setMeasuredDimension(measuredWidth, measuredHeight); + } + + @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { float centerY = getHeight() / 2.0f; // we layout all our children on the left at the top @@ -408,8 +432,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { float translationX = getActualPaddingStart(); int firstOverflowIndex = -1; int childCount = getChildCount(); - int maxVisibleIcons = mOnLockScreen ? MAX_ICONS_ON_AOD : - mIsStaticLayout ? MAX_STATIC_ICONS : childCount; + int maxVisibleIcons = getMaxVisibleIcons(childCount); float layoutEnd = getLayoutEnd(); mVisualOverflowStart = 0; mFirstVisibleIconState = null; @@ -493,6 +516,11 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { } } + private int getMaxVisibleIcons(int childCount) { + return mOnLockScreen ? MAX_ICONS_ON_AOD : + mIsStaticLayout ? MAX_STATIC_ICONS : childCount; + } + private float getLayoutEnd() { return getActualWidth() - getActualPaddingEnd(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java index 2052ee6cdac5..15c6dcfd7889 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java @@ -31,7 +31,7 @@ public final class PhoneStatusBarTransitions extends BarTransitions { private final float mIconAlphaWhenOpaque; - private View mLeftSide, mStatusIcons, mBattery; + private View mStartSide, mStatusIcons, mBattery; private Animator mCurrentAnimation; /** @@ -41,7 +41,7 @@ public final class PhoneStatusBarTransitions extends BarTransitions { super(backgroundView, R.drawable.status_background); final Resources res = statusBarView.getContext().getResources(); mIconAlphaWhenOpaque = res.getFraction(R.dimen.status_bar_icon_drawing_alpha, 1, 1); - mLeftSide = statusBarView.findViewById(R.id.status_bar_left_side); + mStartSide = statusBarView.findViewById(R.id.status_bar_start_side_except_heads_up); mStatusIcons = statusBarView.findViewById(R.id.statusIcons); mBattery = statusBarView.findViewById(R.id.battery); applyModeBackground(-1, getMode(), false /*animate*/); @@ -75,7 +75,7 @@ public final class PhoneStatusBarTransitions extends BarTransitions { } private void applyMode(int mode, boolean animate) { - if (mLeftSide == null) return; // pre-init + if (mStartSide == null) return; // pre-init float newAlpha = getNonBatteryClockAlphaFor(mode); float newAlphaBC = getBatteryClockAlpha(mode); if (mCurrentAnimation != null) { @@ -84,7 +84,7 @@ public final class PhoneStatusBarTransitions extends BarTransitions { if (animate) { AnimatorSet anims = new AnimatorSet(); anims.playTogether( - animateTransitionTo(mLeftSide, newAlpha), + animateTransitionTo(mStartSide, newAlpha), animateTransitionTo(mStatusIcons, newAlpha), animateTransitionTo(mBattery, newAlphaBC) ); @@ -94,7 +94,7 @@ public final class PhoneStatusBarTransitions extends BarTransitions { anims.start(); mCurrentAnimation = anims; } else { - mLeftSide.setAlpha(newAlpha); + mStartSide.setAlpha(newAlpha); mStatusIcons.setAlpha(newAlpha); mBattery.setAlpha(newAlphaBC); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt index 9da2ef734be8..f9c4c8f3b4fe 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt @@ -21,7 +21,6 @@ import android.view.MotionEvent import android.view.View import android.view.ViewGroup import android.view.ViewTreeObserver - import com.android.systemui.R import com.android.systemui.shared.animation.UnfoldMoveFromCenterAnimator import com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherController @@ -32,9 +31,7 @@ import com.android.systemui.unfold.util.ScopedUnfoldTransitionProgressProvider import com.android.systemui.util.ViewController import com.android.systemui.util.kotlin.getOrNull import com.android.systemui.util.view.ViewUtil - import java.util.Optional - import javax.inject.Inject import javax.inject.Named @@ -58,8 +55,8 @@ class PhoneStatusBarViewController private constructor( override fun onViewAttached() { if (moveFromCenterAnimationController == null) return - val statusBarLeftSide: View = mView.findViewById(R.id.status_bar_left_side) - val systemIconArea: ViewGroup = mView.findViewById(R.id.system_icon_area) + val statusBarLeftSide: View = mView.findViewById(R.id.status_bar_start_side_except_heads_up) + val systemIconArea: ViewGroup = mView.findViewById(R.id.status_bar_end_side_content) val viewsToAnimate = arrayOf( statusBarLeftSide, @@ -126,11 +123,11 @@ class PhoneStatusBarViewController private constructor( class StatusBarViewsCenterProvider : UnfoldMoveFromCenterAnimator.ViewCenterProvider { override fun getViewCenter(view: View, outPoint: Point) = when (view.id) { - R.id.status_bar_left_side -> { + R.id.status_bar_start_side_except_heads_up -> { // items aligned to the start, return start center point getViewEdgeCenter(view, outPoint, isStart = true) } - R.id.system_icon_area -> { + R.id.status_bar_end_side_content -> { // items aligned to the end, return end center point getViewEdgeCenter(view, outPoint, isStart = false) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java index 0e7da81f3b27..39bf92a4dcbb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java @@ -102,7 +102,7 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue private final KeyguardStateController mKeyguardStateController; private final NotificationPanelViewController mNotificationPanelViewController; private final NetworkController mNetworkController; - private LinearLayout mSystemIconArea; + private LinearLayout mEndSideContent; private View mClockView; private View mOngoingCallChip; private View mNotificationIconAreaInner; @@ -232,16 +232,16 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue mDarkIconManager.setShouldLog(true); updateBlockedIcons(); mStatusBarIconController.addIconGroup(mDarkIconManager); - mSystemIconArea = mStatusBar.findViewById(R.id.system_icon_area); + mEndSideContent = mStatusBar.findViewById(R.id.status_bar_end_side_content); mClockView = mStatusBar.findViewById(R.id.clock); mOngoingCallChip = mStatusBar.findViewById(R.id.ongoing_call_chip); - showSystemIconArea(false); + showEndSideContent(false); showClock(false); initEmergencyCryptkeeperText(); initOperatorName(); initNotificationIconArea(); mSystemEventAnimator = - new StatusBarSystemEventAnimator(mSystemIconArea, getResources()); + new StatusBarSystemEventAnimator(mEndSideContent, getResources()); mCarrierConfigTracker.addCallback(mCarrierConfigCallback); mCarrierConfigTracker.addDefaultDataSubscriptionChangedListener(mDefaultDataListener); } @@ -370,10 +370,10 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue mDisabled2 = state2; if ((diff1 & DISABLE_SYSTEM_INFO) != 0 || ((diff2 & DISABLE2_SYSTEM_ICONS) != 0)) { if ((state1 & DISABLE_SYSTEM_INFO) != 0 || ((state2 & DISABLE2_SYSTEM_ICONS) != 0)) { - hideSystemIconArea(animate); + hideEndSideContent(animate); hideOperatorName(animate); } else { - showSystemIconArea(animate); + showEndSideContent(animate); showOperatorName(animate); } } @@ -474,15 +474,15 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue return mStatusBarHideIconsForBouncerManager.getShouldHideStatusBarIconsForBouncer(); } - private void hideSystemIconArea(boolean animate) { - animateHide(mSystemIconArea, animate); + private void hideEndSideContent(boolean animate) { + animateHide(mEndSideContent, animate); } - private void showSystemIconArea(boolean animate) { + private void showEndSideContent(boolean animate) { // Only show the system icon area if we are not currently animating int state = mAnimationScheduler.getAnimationState(); if (state == IDLE || state == SHOWING_PERSISTENT_DOT) { - animateShow(mSystemIconArea, animate); + animateShow(mEndSideContent, animate); } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java index 3f14494322e3..681e998ac9e3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java @@ -124,7 +124,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest { fragment.disable(DEFAULT_DISPLAY, 0, 0, false); - assertEquals(View.VISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.VISIBLE, getEndSideContentView().getVisibility()); assertEquals(View.VISIBLE, getClockView().getVisibility()); } @@ -134,11 +134,11 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest { fragment.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_SYSTEM_INFO, 0, false); - assertEquals(View.INVISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.INVISIBLE, getEndSideContentView().getVisibility()); fragment.disable(DEFAULT_DISPLAY, 0, 0, false); - assertEquals(View.VISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.VISIBLE, getEndSideContentView().getVisibility()); } @Test @@ -234,7 +234,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest { fragment.disable(DEFAULT_DISPLAY, 0, 0, false); - assertEquals(View.VISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.VISIBLE, getEndSideContentView().getVisibility()); assertEquals(View.VISIBLE, getClockView().getVisibility()); } @@ -246,7 +246,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest { fragment.disable(DEFAULT_DISPLAY, 0, 0, false); - assertEquals(View.VISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.VISIBLE, getEndSideContentView().getVisibility()); assertEquals(View.VISIBLE, getClockView().getVisibility()); } @@ -257,12 +257,12 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest { when(mNotificationPanelViewController.hasCustomClock()).thenReturn(true); // Make sure they start out as visible - assertEquals(View.VISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.VISIBLE, getEndSideContentView().getVisibility()); assertEquals(View.VISIBLE, getClockView().getVisibility()); fragment.disable(DEFAULT_DISPLAY, 0, 0, false); - assertEquals(View.INVISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.INVISIBLE, getEndSideContentView().getVisibility()); assertEquals(View.GONE, getClockView().getVisibility()); } @@ -273,14 +273,14 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest { when(mNotificationPanelViewController.hasCustomClock()).thenReturn(true); // Make sure they start out as visible - assertEquals(View.VISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.VISIBLE, getEndSideContentView().getVisibility()); assertEquals(View.VISIBLE, getClockView().getVisibility()); fragment.onDozingChanged(true); // When this callback is triggered, we want to make sure the clock and system info // visibilities are recalculated. Since dozing=true, they shouldn't be visible. - assertEquals(View.INVISIBLE, getSystemIconAreaView().getVisibility()); + assertEquals(View.INVISIBLE, getEndSideContentView().getVisibility()); assertEquals(View.GONE, getClockView().getVisibility()); } @@ -419,7 +419,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest { return mFragment.getView().findViewById(R.id.clock); } - private View getSystemIconAreaView() { - return mFragment.getView().findViewById(R.id.system_icon_area); + private View getEndSideContentView() { + return mFragment.getView().findViewById(R.id.status_bar_end_side_content); } } |