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

Commit 229b2efb authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Fixing crash when using multi-window" into udc-qpr-dev

parents 6a925d07 90bf1f42
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -16,12 +16,12 @@

package com.android.quickstep;

import android.app.ActivityThread;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.os.Process;
import android.os.UserHandle;
import android.util.Log;

import com.android.launcher3.model.data.AppInfo;
@@ -55,9 +55,13 @@ public class InstantAppResolverImpl extends InstantAppResolver {

    @Override
    public boolean isInstantApp(String packageName, int userId) {
        if (!Process.myUserHandle().equals(UserHandle.of(userId))) {
            // Instant app can only exist on current user
            return false;
        }
        try {
            return ActivityThread.getPackageManager().isInstantApp(packageName, userId);
        } catch (RemoteException e) {
            return mPM.isInstantApp(packageName);
        } catch (Exception e) {
            Log.e(TAG, "Failed to determine whether package is instant app " + packageName, e);
            return false;
        }