Loading core/res/res/layout/notification_template_quantum_base.xml +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ android:layout_height="12dp" android:layout_marginStart="8dp" android:visibility="gone" style="@style/Widget.Quantum.Light.ProgressBar.Horizontal" style="@style/Widget.StatusBar.Quantum.ProgressBar" /> <LinearLayout android:id="@+id/line3" Loading core/res/res/values/styles.xml +4 −4 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ please see styles_device_defaults.xml. <style name="TextAppearance.StatusBar.Quantum"> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent"> <item name="android:textColor">#888888</item> <item name="android:textColor">#88000000</item> <item name="android:textSize">@dimen/notification_text_size</item> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Title"> Loading @@ -294,14 +294,14 @@ please see styles_device_defaults.xml. </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Info"> <item name="android:textSize">@dimen/notification_subtext_size</item> <item name="android:textColor">#888888</item> <item name="android:textColor">#88000000</item> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Time"> <item name="android:textSize">@dimen/notification_subtext_size</item> <item name="android:textColor">#888888</item> <item name="android:textColor">#88000000</item> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Emphasis"> <item name="android:textColor">#555555</item> <item name="android:textColor">#55000000</item> </style> <style name="TextAppearance.Small.CalendarViewWeekDayView"> Loading packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +27 −9 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Canvas; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.MotionEvent; Loading @@ -45,6 +46,9 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private int mBgResId = R.drawable.notification_quantum_bg; private int mDimmedBgResId = R.drawable.notification_quantum_bg_dim; private int mBgTint = 0; private int mDimmedBgTint = 0; /** * Flag to indicate that the notification has been touched once and the second touch will * click it. Loading Loading @@ -209,17 +213,23 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView * @param bgResId The background resource to use in normal state. * @param dimmedBgResId The background resource to use in dimmed state. */ public void setBackgroundResourceIds(int bgResId, int dimmedBgResId) { public void setBackgroundResourceIds(int bgResId, int bgTint, int dimmedBgResId, int dimmedTint) { mBgResId = bgResId; mBgTint = bgTint; mDimmedBgResId = dimmedBgResId; mDimmedBgTint = dimmedTint; updateBackgroundResource(); } public void setBackgroundResourceIds(int bgResId, int dimmedBgResId) { setBackgroundResourceIds(bgResId, 0, dimmedBgResId, 0); } private void fadeBackgroundResource() { if (mDimmed) { setBackgroundDimmed(mDimmedBgResId); setBackgroundDimmed(mDimmedBgResId, mDimmedBgTint); } else { setBackgroundNormal(mBgResId); setBackgroundNormal(mBgResId, mBgTint); } int startAlpha = mDimmed ? 255 : 0; int endAlpha = mDimmed ? 0 : 255; Loading Loading @@ -256,12 +266,12 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private void updateBackgroundResource() { if (mDimmed) { setBackgroundDimmed(mDimmedBgResId); setBackgroundDimmed(mDimmedBgResId, mDimmedBgTint); mBackgroundDimmed.setAlpha(255); setBackgroundNormal(null); } else { setBackgroundDimmed(null); setBackgroundNormal(mBgResId); setBackgroundNormal(mBgResId, mBgTint); mBackgroundNormal.setAlpha(255); } } Loading Loading @@ -295,12 +305,20 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView invalidate(); } private void setBackgroundNormal(int drawableResId) { setBackgroundNormal(getResources().getDrawable(drawableResId)); private void setBackgroundNormal(int drawableResId, int tintColor) { final Drawable d = getResources().getDrawable(drawableResId); if (tintColor != 0) { d.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP); } setBackgroundNormal(d); } private void setBackgroundDimmed(int drawableResId) { setBackgroundDimmed(getResources().getDrawable(drawableResId)); private void setBackgroundDimmed(int drawableResId, int tintColor) { final Drawable d = getResources().getDrawable(drawableResId); if (tintColor != 0) { d.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP); } setBackgroundDimmed(d); } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +9 −7 Original line number Diff line number Diff line Loading @@ -428,7 +428,6 @@ public abstract class BaseStatusBar extends SystemUI implements protected void applyLegacyRowBackground(StatusBarNotification sbn, NotificationData.Entry entry) { if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) { int version = 0; try { ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPackageName(), 0); Loading @@ -436,6 +435,9 @@ public abstract class BaseStatusBar extends SystemUI implements } catch (NameNotFoundException ex) { Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex); } if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) { // Using custom RemoteViews if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) { entry.row.setBackgroundResource(R.drawable.notification_row_legacy_bg); } else if (version < Build.VERSION_CODES.L) { Loading Loading
core/res/res/layout/notification_template_quantum_base.xml +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ android:layout_height="12dp" android:layout_marginStart="8dp" android:visibility="gone" style="@style/Widget.Quantum.Light.ProgressBar.Horizontal" style="@style/Widget.StatusBar.Quantum.ProgressBar" /> <LinearLayout android:id="@+id/line3" Loading
core/res/res/values/styles.xml +4 −4 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ please see styles_device_defaults.xml. <style name="TextAppearance.StatusBar.Quantum"> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent"> <item name="android:textColor">#888888</item> <item name="android:textColor">#88000000</item> <item name="android:textSize">@dimen/notification_text_size</item> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Title"> Loading @@ -294,14 +294,14 @@ please see styles_device_defaults.xml. </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Info"> <item name="android:textSize">@dimen/notification_subtext_size</item> <item name="android:textColor">#888888</item> <item name="android:textColor">#88000000</item> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Time"> <item name="android:textSize">@dimen/notification_subtext_size</item> <item name="android:textColor">#888888</item> <item name="android:textColor">#88000000</item> </style> <style name="TextAppearance.StatusBar.Quantum.EventContent.Emphasis"> <item name="android:textColor">#555555</item> <item name="android:textColor">#55000000</item> </style> <style name="TextAppearance.Small.CalendarViewWeekDayView"> Loading
packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +27 −9 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Canvas; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.MotionEvent; Loading @@ -45,6 +46,9 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private int mBgResId = R.drawable.notification_quantum_bg; private int mDimmedBgResId = R.drawable.notification_quantum_bg_dim; private int mBgTint = 0; private int mDimmedBgTint = 0; /** * Flag to indicate that the notification has been touched once and the second touch will * click it. Loading Loading @@ -209,17 +213,23 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView * @param bgResId The background resource to use in normal state. * @param dimmedBgResId The background resource to use in dimmed state. */ public void setBackgroundResourceIds(int bgResId, int dimmedBgResId) { public void setBackgroundResourceIds(int bgResId, int bgTint, int dimmedBgResId, int dimmedTint) { mBgResId = bgResId; mBgTint = bgTint; mDimmedBgResId = dimmedBgResId; mDimmedBgTint = dimmedTint; updateBackgroundResource(); } public void setBackgroundResourceIds(int bgResId, int dimmedBgResId) { setBackgroundResourceIds(bgResId, 0, dimmedBgResId, 0); } private void fadeBackgroundResource() { if (mDimmed) { setBackgroundDimmed(mDimmedBgResId); setBackgroundDimmed(mDimmedBgResId, mDimmedBgTint); } else { setBackgroundNormal(mBgResId); setBackgroundNormal(mBgResId, mBgTint); } int startAlpha = mDimmed ? 255 : 0; int endAlpha = mDimmed ? 0 : 255; Loading Loading @@ -256,12 +266,12 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private void updateBackgroundResource() { if (mDimmed) { setBackgroundDimmed(mDimmedBgResId); setBackgroundDimmed(mDimmedBgResId, mDimmedBgTint); mBackgroundDimmed.setAlpha(255); setBackgroundNormal(null); } else { setBackgroundDimmed(null); setBackgroundNormal(mBgResId); setBackgroundNormal(mBgResId, mBgTint); mBackgroundNormal.setAlpha(255); } } Loading Loading @@ -295,12 +305,20 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView invalidate(); } private void setBackgroundNormal(int drawableResId) { setBackgroundNormal(getResources().getDrawable(drawableResId)); private void setBackgroundNormal(int drawableResId, int tintColor) { final Drawable d = getResources().getDrawable(drawableResId); if (tintColor != 0) { d.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP); } setBackgroundNormal(d); } private void setBackgroundDimmed(int drawableResId) { setBackgroundDimmed(getResources().getDrawable(drawableResId)); private void setBackgroundDimmed(int drawableResId, int tintColor) { final Drawable d = getResources().getDrawable(drawableResId); if (tintColor != 0) { d.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP); } setBackgroundDimmed(d); } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +9 −7 Original line number Diff line number Diff line Loading @@ -428,7 +428,6 @@ public abstract class BaseStatusBar extends SystemUI implements protected void applyLegacyRowBackground(StatusBarNotification sbn, NotificationData.Entry entry) { if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) { int version = 0; try { ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPackageName(), 0); Loading @@ -436,6 +435,9 @@ public abstract class BaseStatusBar extends SystemUI implements } catch (NameNotFoundException ex) { Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex); } if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) { // Using custom RemoteViews if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) { entry.row.setBackgroundResource(R.drawable.notification_row_legacy_bg); } else if (version < Build.VERSION_CODES.L) { Loading