Loading packages/SystemUI/res/layout/tv_notification_panel.xml +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ android:layout_width="@dimen/tv_notification_panel_width" android:layout_height="match_parent" android:layout_gravity="end" android:background="@color/tv_notification_background_color" android:background="@android:color/transparent" android:orientation="vertical"> <TextView Loading packages/SystemUI/res/values/colors_tv.xml +2 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ <color name="tv_volume_dialog_seek_bar_fill">#FFF8F9FA</color> <color name="tv_volume_dialog_accent">#FFDADCE0</color> <color name="tv_notification_background_color">#383838</color> <color name="tv_notification_default_background_color">#383838</color> <color name="tv_notification_blur_background_color">#a0383838</color> <color name="tv_notification_text_color">#FFFFFF</color> </resources> packages/SystemUI/res/values/dimens_tv.xml +1 −0 Original line number Diff line number Diff line Loading @@ -16,4 +16,5 @@ --> <resources> <dimen name="tv_notification_panel_width">360dp</dimen> <dimen name="tv_notification_blur_radius">100dp</dimen> </resources> No newline at end of file packages/SystemUI/res/values/styles_tv.xml +1 −0 Original line number Diff line number Diff line Loading @@ -30,5 +30,6 @@ <item name="android:backgroundDimEnabled">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowIsFloating">true</item> </style> </resources> packages/SystemUI/src/com/android/systemui/statusbar/tv/notifications/TvNotificationPanelActivity.java +32 −0 Original line number Diff line number Diff line Loading @@ -20,15 +20,19 @@ import android.annotation.NonNull; import android.app.Activity; import android.app.NotificationManager; import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.service.notification.StatusBarNotification; import android.util.SparseArray; import android.view.Gravity; import android.view.View; import androidx.leanback.widget.VerticalGridView; import com.android.systemui.R; import java.util.function.Consumer; import javax.inject.Inject; /** Loading @@ -42,6 +46,7 @@ public class TvNotificationPanelActivity extends Activity implements private VerticalGridView mNotificationListView; private View mNotificationPlaceholder; private boolean mPanelAlreadyOpen = false; private final Consumer<Boolean> mBlurConsumer = this::enableBlur; @Inject public TvNotificationPanelActivity(TvNotificationHandler tvNotificationHandler) { Loading Loading @@ -102,6 +107,33 @@ public class TvNotificationPanelActivity extends Activity implements return false; } @Override public void onAttachedToWindow() { super.onAttachedToWindow(); getWindow().setGravity(Gravity.END); getWindowManager().addCrossWindowBlurEnabledListener(mBlurConsumer); } private void enableBlur(boolean enabled) { if (enabled) { int blurRadius = getResources().getDimensionPixelSize( R.dimen.tv_notification_blur_radius); getWindow().setBackgroundDrawable( new ColorDrawable(getColor(R.color.tv_notification_blur_background_color))); getWindow().setBackgroundBlurRadius(blurRadius); } else { getWindow().setBackgroundDrawable( new ColorDrawable(getColor(R.color.tv_notification_default_background_color))); getWindow().setBackgroundBlurRadius(0); } } @Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); getWindowManager().removeCrossWindowBlurEnabledListener(mBlurConsumer); } @Override public void onDestroy() { super.onDestroy(); Loading Loading
packages/SystemUI/res/layout/tv_notification_panel.xml +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ android:layout_width="@dimen/tv_notification_panel_width" android:layout_height="match_parent" android:layout_gravity="end" android:background="@color/tv_notification_background_color" android:background="@android:color/transparent" android:orientation="vertical"> <TextView Loading
packages/SystemUI/res/values/colors_tv.xml +2 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ <color name="tv_volume_dialog_seek_bar_fill">#FFF8F9FA</color> <color name="tv_volume_dialog_accent">#FFDADCE0</color> <color name="tv_notification_background_color">#383838</color> <color name="tv_notification_default_background_color">#383838</color> <color name="tv_notification_blur_background_color">#a0383838</color> <color name="tv_notification_text_color">#FFFFFF</color> </resources>
packages/SystemUI/res/values/dimens_tv.xml +1 −0 Original line number Diff line number Diff line Loading @@ -16,4 +16,5 @@ --> <resources> <dimen name="tv_notification_panel_width">360dp</dimen> <dimen name="tv_notification_blur_radius">100dp</dimen> </resources> No newline at end of file
packages/SystemUI/res/values/styles_tv.xml +1 −0 Original line number Diff line number Diff line Loading @@ -30,5 +30,6 @@ <item name="android:backgroundDimEnabled">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowIsFloating">true</item> </style> </resources>
packages/SystemUI/src/com/android/systemui/statusbar/tv/notifications/TvNotificationPanelActivity.java +32 −0 Original line number Diff line number Diff line Loading @@ -20,15 +20,19 @@ import android.annotation.NonNull; import android.app.Activity; import android.app.NotificationManager; import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.service.notification.StatusBarNotification; import android.util.SparseArray; import android.view.Gravity; import android.view.View; import androidx.leanback.widget.VerticalGridView; import com.android.systemui.R; import java.util.function.Consumer; import javax.inject.Inject; /** Loading @@ -42,6 +46,7 @@ public class TvNotificationPanelActivity extends Activity implements private VerticalGridView mNotificationListView; private View mNotificationPlaceholder; private boolean mPanelAlreadyOpen = false; private final Consumer<Boolean> mBlurConsumer = this::enableBlur; @Inject public TvNotificationPanelActivity(TvNotificationHandler tvNotificationHandler) { Loading Loading @@ -102,6 +107,33 @@ public class TvNotificationPanelActivity extends Activity implements return false; } @Override public void onAttachedToWindow() { super.onAttachedToWindow(); getWindow().setGravity(Gravity.END); getWindowManager().addCrossWindowBlurEnabledListener(mBlurConsumer); } private void enableBlur(boolean enabled) { if (enabled) { int blurRadius = getResources().getDimensionPixelSize( R.dimen.tv_notification_blur_radius); getWindow().setBackgroundDrawable( new ColorDrawable(getColor(R.color.tv_notification_blur_background_color))); getWindow().setBackgroundBlurRadius(blurRadius); } else { getWindow().setBackgroundDrawable( new ColorDrawable(getColor(R.color.tv_notification_default_background_color))); getWindow().setBackgroundBlurRadius(0); } } @Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); getWindowManager().removeCrossWindowBlurEnabledListener(mBlurConsumer); } @Override public void onDestroy() { super.onDestroy(); Loading