Loading Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ android_app { optimize: { enabled: false, }, kotlincflags: ["-Xjvm-default=enable"], certificate: "", privileged: true, Loading src/com/android/customization/model/ResourcesApkProvider.java +9 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ import android.graphics.drawable.Drawable; import android.text.TextUtils; import android.util.Log; import androidx.annotation.ColorInt; public abstract class ResourcesApkProvider { private static final String TAG = "ResourcesApkProvider"; Loading Loading @@ -55,6 +57,13 @@ public abstract class ResourcesApkProvider { return mStubApkResources.getDrawable(resourceId, null); } @ColorInt protected int getItemColorFromStub(String prefix, String itemName) { int resourceId = mStubApkResources.getIdentifier(String.format("%s%s", prefix, itemName), "color", mStubPackageName); return mStubApkResources.getColor(resourceId, null); } public boolean isAvailable() { return mStubApkResources != null; } Loading Loading
Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ android_app { optimize: { enabled: false, }, kotlincflags: ["-Xjvm-default=enable"], certificate: "", privileged: true, Loading
src/com/android/customization/model/ResourcesApkProvider.java +9 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ import android.graphics.drawable.Drawable; import android.text.TextUtils; import android.util.Log; import androidx.annotation.ColorInt; public abstract class ResourcesApkProvider { private static final String TAG = "ResourcesApkProvider"; Loading Loading @@ -55,6 +57,13 @@ public abstract class ResourcesApkProvider { return mStubApkResources.getDrawable(resourceId, null); } @ColorInt protected int getItemColorFromStub(String prefix, String itemName) { int resourceId = mStubApkResources.getIdentifier(String.format("%s%s", prefix, itemName), "color", mStubPackageName); return mStubApkResources.getColor(resourceId, null); } public boolean isAvailable() { return mStubApkResources != null; } Loading