Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 013f062d authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

ApplicationPackageManager should fetch Resource from non system context

Test: builds and manually verified on device
Test: change theme inside ThemePicker and default icon color changes

Bug: 128445995
Bug: 128447895

Change-Id: I184534c9ecea52fa381ffa6cd1e9ba53134766ca
parent 5bb71f49
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1301,8 +1301,7 @@ public class ApplicationPackageManager extends PackageManager {
    }

    @Override public Drawable getDefaultActivityIcon() {
        return Resources.getSystem().getDrawable(
            com.android.internal.R.drawable.sym_def_app_icon);
        return mContext.getDrawable(com.android.internal.R.drawable.sym_def_app_icon);
    }

    @Override public Drawable getApplicationIcon(ApplicationInfo info) {
@@ -1440,7 +1439,7 @@ public class ApplicationPackageManager extends PackageManager {
        if (density <= 0) {
            density = mContext.getResources().getDisplayMetrics().densityDpi;
        }
        return Resources.getSystem().getDrawableForDensity(drawableId, density);
        return mContext.getResources().getDrawableForDensity(drawableId, density);
    }

    private Drawable getManagedProfileIconForDensity(UserHandle user, int drawableId, int density) {
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
    android:viewportHeight="108.0"
    android:viewportWidth="108.0"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillColor="@android:color/material_deep_teal_500"
    <path android:fillColor="@android:color/accent_device_default_light"
        android:pathData="M0,0h108v108h-108z"
        android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
    <path android:fillColor="#00000000" android:pathData="M19,0L19,108"