Loading core/java/android/app/Notification.java +1 −1 Original line number Diff line number Diff line Loading @@ -3793,9 +3793,9 @@ public class Notification implements Parcelable // Ambient view does not have these bindHeaderText(contentView); bindHeaderChronometerAndTime(contentView); bindExpandButton(contentView); bindProfileBadge(contentView); } bindExpandButton(contentView); } private void bindExpandButton(RemoteViews contentView) { Loading core/res/res/layout/notification_template_material_ambient.xml +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:tag="ambient" android:paddingStart="@dimen/notification_extra_margin_ambient" android:paddingEnd="@dimen/notification_extra_margin_ambient" > <include layout="@layout/notification_template_header" /> Loading Loading @@ -52,7 +54,7 @@ android:ellipsize="marquee" android:fadingEdge="horizontal" android:textSize="20sp" android:textColor="#e6fafafa" android:textColor="#ffffffff" /> <TextView android:id="@+id/text" android:layout_width="match_parent" Loading @@ -63,7 +65,7 @@ android:gravity="top" android:visibility="gone" android:textSize="16sp" android:textColor="#ccfafafa" android:textColor="#eeffffff" android:layout_marginTop="4dp" /> </LinearLayout> Loading core/res/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,9 @@ --> <dimen name="notification_content_plus_picture_margin_end">72dp</dimen> <!-- The additional margin on the sides of the ambient view. --> <dimen name="notification_extra_margin_ambient">16dp</dimen> <!-- The height of the notification action list --> <dimen name="notification_action_list_height">56dp</dimen> Loading packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +22 −1 Original line number Diff line number Diff line Loading @@ -34,9 +34,11 @@ import android.widget.GridLayout; import android.widget.TextClock; import android.widget.TextView; import com.android.internal.util.ArrayUtils; import com.android.internal.widget.LockPatternUtils; import com.android.systemui.ChargingView; import java.util.Arrays; import java.util.Locale; public class KeyguardStatusView extends GridLayout { Loading @@ -53,6 +55,10 @@ public class KeyguardStatusView extends GridLayout { private ViewGroup mClockContainer; private ChargingView mBatteryDoze; private View[] mVisibleInDoze; private boolean mPulsing; private boolean mDark; private KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -117,6 +123,7 @@ public class KeyguardStatusView extends GridLayout { mClockView.setShowCurrentUserTime(true); mOwnerInfo = (TextView) findViewById(R.id.owner_info); mBatteryDoze = (ChargingView) findViewById(R.id.battery_doze); mVisibleInDoze = new View[]{mBatteryDoze, mClockView}; boolean shouldMarquee = KeyguardUpdateMonitor.getInstance(mContext).isDeviceInteractive(); setEnableMarquee(shouldMarquee); Loading Loading @@ -273,14 +280,28 @@ public class KeyguardStatusView extends GridLayout { } public void setDark(boolean dark) { mDark = dark; final int N = mClockContainer.getChildCount(); for (int i = 0; i < N; i++) { View child = mClockContainer.getChildAt(i); if (child == mClockView || child == mBatteryDoze) { if (ArrayUtils.contains(mVisibleInDoze, child)) { continue; } child.setAlpha(dark ? 0 : 1); } updateDozeVisibleViews(); mBatteryDoze.setDark(dark); } public void setPulsing(boolean pulsing) { mPulsing = pulsing; updateDozeVisibleViews(); } private void updateDozeVisibleViews() { for (View child : mVisibleInDoze) { child.setAlpha(mDark && mPulsing ? 0.5f : 1); } } } packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +6 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class NotificationShelf extends ActivatableNotificationView implements openedAmount = Math.min(1.0f, openedAmount); mShelfState.openedAmount = openedAmount; mShelfState.clipTopAmount = 0; mShelfState.alpha = 1.0f; mShelfState.alpha = mAmbientState.isPulsing() ? 0 : 1; mShelfState.belowSpeedBump = mAmbientState.getSpeedBumpIndex() == 0; mShelfState.shadowAlpha = 1.0f; mShelfState.hideSensitive = false; Loading Loading @@ -601,6 +601,11 @@ public class NotificationShelf extends ActivatableNotificationView implements } } @Override public boolean hasOverlappingRendering() { return false; // Shelf only uses alpha for transitions where the difference can't be seen. } @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { Loading Loading
core/java/android/app/Notification.java +1 −1 Original line number Diff line number Diff line Loading @@ -3793,9 +3793,9 @@ public class Notification implements Parcelable // Ambient view does not have these bindHeaderText(contentView); bindHeaderChronometerAndTime(contentView); bindExpandButton(contentView); bindProfileBadge(contentView); } bindExpandButton(contentView); } private void bindExpandButton(RemoteViews contentView) { Loading
core/res/res/layout/notification_template_material_ambient.xml +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:tag="ambient" android:paddingStart="@dimen/notification_extra_margin_ambient" android:paddingEnd="@dimen/notification_extra_margin_ambient" > <include layout="@layout/notification_template_header" /> Loading Loading @@ -52,7 +54,7 @@ android:ellipsize="marquee" android:fadingEdge="horizontal" android:textSize="20sp" android:textColor="#e6fafafa" android:textColor="#ffffffff" /> <TextView android:id="@+id/text" android:layout_width="match_parent" Loading @@ -63,7 +65,7 @@ android:gravity="top" android:visibility="gone" android:textSize="16sp" android:textColor="#ccfafafa" android:textColor="#eeffffff" android:layout_marginTop="4dp" /> </LinearLayout> Loading
core/res/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,9 @@ --> <dimen name="notification_content_plus_picture_margin_end">72dp</dimen> <!-- The additional margin on the sides of the ambient view. --> <dimen name="notification_extra_margin_ambient">16dp</dimen> <!-- The height of the notification action list --> <dimen name="notification_action_list_height">56dp</dimen> Loading
packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +22 −1 Original line number Diff line number Diff line Loading @@ -34,9 +34,11 @@ import android.widget.GridLayout; import android.widget.TextClock; import android.widget.TextView; import com.android.internal.util.ArrayUtils; import com.android.internal.widget.LockPatternUtils; import com.android.systemui.ChargingView; import java.util.Arrays; import java.util.Locale; public class KeyguardStatusView extends GridLayout { Loading @@ -53,6 +55,10 @@ public class KeyguardStatusView extends GridLayout { private ViewGroup mClockContainer; private ChargingView mBatteryDoze; private View[] mVisibleInDoze; private boolean mPulsing; private boolean mDark; private KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -117,6 +123,7 @@ public class KeyguardStatusView extends GridLayout { mClockView.setShowCurrentUserTime(true); mOwnerInfo = (TextView) findViewById(R.id.owner_info); mBatteryDoze = (ChargingView) findViewById(R.id.battery_doze); mVisibleInDoze = new View[]{mBatteryDoze, mClockView}; boolean shouldMarquee = KeyguardUpdateMonitor.getInstance(mContext).isDeviceInteractive(); setEnableMarquee(shouldMarquee); Loading Loading @@ -273,14 +280,28 @@ public class KeyguardStatusView extends GridLayout { } public void setDark(boolean dark) { mDark = dark; final int N = mClockContainer.getChildCount(); for (int i = 0; i < N; i++) { View child = mClockContainer.getChildAt(i); if (child == mClockView || child == mBatteryDoze) { if (ArrayUtils.contains(mVisibleInDoze, child)) { continue; } child.setAlpha(dark ? 0 : 1); } updateDozeVisibleViews(); mBatteryDoze.setDark(dark); } public void setPulsing(boolean pulsing) { mPulsing = pulsing; updateDozeVisibleViews(); } private void updateDozeVisibleViews() { for (View child : mVisibleInDoze) { child.setAlpha(mDark && mPulsing ? 0.5f : 1); } } }
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +6 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class NotificationShelf extends ActivatableNotificationView implements openedAmount = Math.min(1.0f, openedAmount); mShelfState.openedAmount = openedAmount; mShelfState.clipTopAmount = 0; mShelfState.alpha = 1.0f; mShelfState.alpha = mAmbientState.isPulsing() ? 0 : 1; mShelfState.belowSpeedBump = mAmbientState.getSpeedBumpIndex() == 0; mShelfState.shadowAlpha = 1.0f; mShelfState.hideSensitive = false; Loading Loading @@ -601,6 +601,11 @@ public class NotificationShelf extends ActivatableNotificationView implements } } @Override public boolean hasOverlappingRendering() { return false; // Shelf only uses alpha for transitions where the difference can't be seen. } @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { Loading