From 26ff673458c6b85ecfc9628cf6bd7522c8393d0f Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Fri, 27 Mar 2020 09:33:31 -0700 Subject: Add mSourceDrawableId to copy constructor The copy constructor of AdaptiveIconDrawable#LayerState currently does not copy mSourceDrawableId from the original layer state. This prevents drawables created from preloaded AdaptiveIconDrawables from having the correct source drawable resource id. Bug: 148488431 Test: CtsContentTestCases:android.content.pm.cts.PackageManagerTest Change-Id: I7795a337a2a364677e375776c7aec5bc9189e0da --- graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java | 1 + 1 file changed, 1 insertion(+) (limited to 'graphics') diff --git a/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java b/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java index 746378e10bc7..31ad81b9c346 100644 --- a/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java +++ b/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java @@ -975,6 +975,7 @@ public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback mChangingConfigurations = orig.mChangingConfigurations; mChildrenChangingConfigurations = orig.mChildrenChangingConfigurations; + mSourceDrawableId = orig.mSourceDrawableId; for (int i = 0; i < N_CHILDREN; i++) { final ChildDrawable or = origChildDrawable[i]; -- cgit v1.2.3