Loading core/java/android/window/SplashScreenView.java +10 −2 Original line number Diff line number Diff line Loading @@ -733,11 +733,12 @@ public final class SplashScreenView extends FrameLayout { mIconBitmap = iconView != null ? copyDrawable(((ImageView) view.getIconView()).getDrawable()) : null; } mBrandingBitmap = copyDrawable(view.getBrandingView().getBackground()); ViewGroup.LayoutParams params = view.getBrandingView().getLayoutParams(); final ViewGroup.LayoutParams params = view.getBrandingView().getLayoutParams(); mBrandingWidth = params.width; mBrandingHeight = params.height; mBrandingBitmap = copyDrawableWithSize(view.getBrandingView().getBackground(), mBrandingWidth, mBrandingHeight); if (view.getIconAnimationStart() != null) { mIconAnimationStartMillis = view.getIconAnimationStart().toEpochMilli(); Loading @@ -752,6 +753,13 @@ public final class SplashScreenView extends FrameLayout { final Rect initialBounds = drawable.copyBounds(); final int width = initialBounds.width(); final int height = initialBounds.height(); return copyDrawableWithSize(drawable, width, height); } return null; } private Bitmap copyDrawableWithSize(Drawable drawable, int width, int height) { if (drawable != null) { if (width <= 0 || height <= 0) { return null; } Loading Loading
core/java/android/window/SplashScreenView.java +10 −2 Original line number Diff line number Diff line Loading @@ -733,11 +733,12 @@ public final class SplashScreenView extends FrameLayout { mIconBitmap = iconView != null ? copyDrawable(((ImageView) view.getIconView()).getDrawable()) : null; } mBrandingBitmap = copyDrawable(view.getBrandingView().getBackground()); ViewGroup.LayoutParams params = view.getBrandingView().getLayoutParams(); final ViewGroup.LayoutParams params = view.getBrandingView().getLayoutParams(); mBrandingWidth = params.width; mBrandingHeight = params.height; mBrandingBitmap = copyDrawableWithSize(view.getBrandingView().getBackground(), mBrandingWidth, mBrandingHeight); if (view.getIconAnimationStart() != null) { mIconAnimationStartMillis = view.getIconAnimationStart().toEpochMilli(); Loading @@ -752,6 +753,13 @@ public final class SplashScreenView extends FrameLayout { final Rect initialBounds = drawable.copyBounds(); final int width = initialBounds.width(); final int height = initialBounds.height(); return copyDrawableWithSize(drawable, width, height); } return null; } private Bitmap copyDrawableWithSize(Drawable drawable, int width, int height) { if (drawable != null) { if (width <= 0 || height <= 0) { return null; } Loading