Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java +5 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.ActivityTaskManager; import android.app.ActivityTaskManager.RootTaskInfo; import android.app.AppGlobals; Loading Loading @@ -271,13 +272,16 @@ public class InstantAppNotifier .addFlags(Intent.FLAG_IGNORE_EPHEMERAL) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); ActivityOptions options = ActivityOptions.makeBasic() .setPendingIntentCreatorBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED); PendingIntent pendingIntent = PendingIntent.getActivityAsUser( mContext, 0 /* requestCode */, browserIntent, PendingIntent.FLAG_IMMUTABLE /* flags */, null, options.toBundle(), user); ComponentName aiaComponent = null; try { Loading services/core/java/com/android/server/pm/InstantAppResolver.java +6 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -296,6 +297,9 @@ public abstract class InstantAppResolver { if (needsPhaseTwo) { intent.setAction(Intent.ACTION_RESOLVE_INSTANT_APP_PACKAGE); } else { ActivityOptions options = ActivityOptions.makeBasic() .setPendingIntentCreatorBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED); // We have all of the data we need; just start the installer without a second phase if (failureIntent != null || installFailureActivity != null) { // Intent that is launched if the package couldn't be installed for any reason. Loading @@ -322,7 +326,7 @@ public abstract class InstantAppResolver { PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE, null /*bOptions*/, userId); options.toBundle(), userId); IntentSender failureSender = new IntentSender(failureIntentTarget); // TODO(b/72700831): remove populating old extra intent.putExtra(Intent.EXTRA_INSTANT_APP_FAILURE, failureSender); Loading @@ -342,7 +346,7 @@ public abstract class InstantAppResolver { new String[] { resolvedType }, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE, null /*bOptions*/, userId); options.toBundle(), userId); IntentSender successSender = new IntentSender(successIntentTarget); intent.putExtra(Intent.EXTRA_INSTANT_APP_SUCCESS, successSender); } catch (RemoteException ignore) { /* ignore; same process */ } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java +5 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.ActivityTaskManager; import android.app.ActivityTaskManager.RootTaskInfo; import android.app.AppGlobals; Loading Loading @@ -271,13 +272,16 @@ public class InstantAppNotifier .addFlags(Intent.FLAG_IGNORE_EPHEMERAL) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); ActivityOptions options = ActivityOptions.makeBasic() .setPendingIntentCreatorBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED); PendingIntent pendingIntent = PendingIntent.getActivityAsUser( mContext, 0 /* requestCode */, browserIntent, PendingIntent.FLAG_IMMUTABLE /* flags */, null, options.toBundle(), user); ComponentName aiaComponent = null; try { Loading
services/core/java/com/android/server/pm/InstantAppResolver.java +6 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -296,6 +297,9 @@ public abstract class InstantAppResolver { if (needsPhaseTwo) { intent.setAction(Intent.ACTION_RESOLVE_INSTANT_APP_PACKAGE); } else { ActivityOptions options = ActivityOptions.makeBasic() .setPendingIntentCreatorBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED); // We have all of the data we need; just start the installer without a second phase if (failureIntent != null || installFailureActivity != null) { // Intent that is launched if the package couldn't be installed for any reason. Loading @@ -322,7 +326,7 @@ public abstract class InstantAppResolver { PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE, null /*bOptions*/, userId); options.toBundle(), userId); IntentSender failureSender = new IntentSender(failureIntentTarget); // TODO(b/72700831): remove populating old extra intent.putExtra(Intent.EXTRA_INSTANT_APP_FAILURE, failureSender); Loading @@ -342,7 +346,7 @@ public abstract class InstantAppResolver { new String[] { resolvedType }, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE, null /*bOptions*/, userId); options.toBundle(), userId); IntentSender successSender = new IntentSender(successIntentTarget); intent.putExtra(Intent.EXTRA_INSTANT_APP_SUCCESS, successSender); } catch (RemoteException ignore) { /* ignore; same process */ } Loading