Merge "Fixing crash when using multi-window" into udc-qpr-dev am: 229b2efbae
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23924146 Change-Id: Ia921e7f93117a091252936429a955704d0c6a754 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user