summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vadim Caen <caen@google.com> 2021-03-17 19:45:23 +0100
committer Vadim Caen <caen@google.com> 2021-03-23 08:28:14 +0000
commit884c99d06519d315ac9c7ad830aed447a4ed0dfc (patch)
treef191823997ad8be5b4c518eeb4ba37714f5cfd32
parent689a571110610cceaf6d41a9e06ab4757ed5b8f3 (diff)
Hide branding view when empty
It looks like the empty branding view was causing the underlying view to bleed through it so ensuring that it is removed if empty. Bug: 182708883 Change-Id: I868931768bed5b083433fd5222720724bfe3e60e
-rw-r--r--core/java/android/window/SplashScreenView.java6
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/window/SplashScreenView.java b/core/java/android/window/SplashScreenView.java
index da445b8b9f33..9998bccec9c9 100644
--- a/core/java/android/window/SplashScreenView.java
+++ b/core/java/android/window/SplashScreenView.java
@@ -200,14 +200,14 @@ public final class SplashScreenView extends FrameLayout {
view.mParceledIconBitmap = mParceledIconBitmap;
}
// branding image
- if (mBrandingImageHeight > 0 && mBrandingImageWidth > 0) {
+ if (mBrandingImageHeight > 0 && mBrandingImageWidth > 0 && mBrandingDrawable != null) {
final ViewGroup.LayoutParams params = view.mBrandingImageView.getLayoutParams();
params.width = mBrandingImageWidth;
params.height = mBrandingImageHeight;
view.mBrandingImageView.setLayoutParams(params);
- }
- if (mBrandingDrawable != null) {
view.mBrandingImageView.setBackground(mBrandingDrawable);
+ } else {
+ view.mBrandingImageView.setVisibility(GONE);
}
if (mParceledBrandingBitmap != null) {
view.mParceledBrandingBitmap = mParceledBrandingBitmap;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
index 3f9c2717731a..3e71318c8851 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
@@ -129,8 +129,8 @@ public class SplashscreenContentDrawer {
} else if (attrs.mWindowBgResId != 0) {
themeBGDrawable = context.getDrawable(attrs.mWindowBgResId);
} else {
- Slog.w(TAG, "Window background not exist!");
themeBGDrawable = createDefaultBackgroundDrawable();
+ Slog.w(TAG, "Window background does not exist, using " + themeBGDrawable);
}
final int animationDuration;
final Drawable iconDrawable;