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

Commit 16b7af40 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

IconFactory should be initialized before mAdapter is created inside ResolverActivity

Bug: 113032889
Test: builds
Change-Id: I9906ee7ec8be64f0a82634796a7e2f3bcbd01800
parent 8ad9ef4a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.internal.app;

import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;

import android.annotation.Nullable;
import android.annotation.StringRes;
import android.annotation.UiThread;
@@ -66,6 +68,7 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.content.PackageMonitor;
@@ -81,8 +84,6 @@ import java.util.List;
import java.util.Objects;
import java.util.Set;

import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;

/**
 * This activity is displayed when the system attempts to start an Intent for
 * which there is more than one matching activity, allowing the user to decide
@@ -288,6 +289,7 @@ public class ResolverActivity extends Activity {
        mTitle = title;
        mDefaultTitleResId = defaultTitleRes;

        mIconFactory = IconDrawableFactory.newInstance(this, true);
        if (configureContentView(mIntents, initialIntents, rList)) {
            return;
        }
@@ -335,7 +337,6 @@ public class ResolverActivity extends Activity {
                : MetricsProto.MetricsEvent.ACTION_SHOW_APP_DISAMBIG_NONE_FEATURED,
                intent.getAction() + ":" + intent.getType() + ":"
                        + (categories != null ? Arrays.toString(categories.toArray()) : ""));
        mIconFactory = IconDrawableFactory.newInstance(this, true);
    }

    @Override