diff options
author | 2018-02-15 18:06:10 +0000 | |
---|---|---|
committer | 2018-02-15 18:06:10 +0000 | |
commit | 2d375453ec8ed8a2957afb7ea493625e48e362e2 (patch) | |
tree | 2a262d9b37431ed992fd68f571acd18ae7058f4e | |
parent | e4adba745b4d91113afeee2c4fe49a37a50d1175 (diff) | |
parent | 531db46112ac067efbc509910d1578d7b8a9d119 (diff) |
Merge "Fixes go to web behavior for Instant Apps"
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java | 7 | ||||
-rw-r--r-- | services/core/java/com/android/server/am/ActivityStarter.java | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index 6444cc816663..747a551defe6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -575,7 +575,7 @@ public class PhoneStatusBarPolicy implements Callback, Callbacks, Intent browserIntent = getTaskIntent(taskId, userId); Notification.Builder builder = new Notification.Builder(mContext, NotificationChannels.GENERAL); - if (browserIntent != null) { + if (browserIntent != null && browserIntent.isWebIntent()) { // Make sure that this doesn't resolve back to an instant app browserIntent.setComponent(null) .setPackage(null) @@ -597,8 +597,9 @@ public class PhoneStatusBarPolicy implements Callback, Callbacks, .addCategory("unique:" + System.currentTimeMillis()) .putExtra(Intent.EXTRA_PACKAGE_NAME, appInfo.packageName) .putExtra(Intent.EXTRA_VERSION_CODE, (int) (appInfo.versionCode & 0x7fffffff)) - .putExtra(Intent.EXTRA_VERSION_CODE, appInfo.versionCode) - .putExtra(Intent.EXTRA_EPHEMERAL_FAILURE, pendingIntent); + .putExtra(Intent.EXTRA_LONG_VERSION_CODE, appInfo.versionCode) + .putExtra(Intent.EXTRA_EPHEMERAL_FAILURE, pendingIntent) + .putExtra(Intent.EXTRA_INSTANT_APP_FAILURE, pendingIntent); PendingIntent webPendingIntent = PendingIntent.getActivity(mContext, 0, goToWebIntent, 0); Action webAction = new Notification.Action.Builder(null, mContext.getString(R.string.go_to_web), diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java index 0dcefbfd26a4..8205265ba047 100644 --- a/services/core/java/com/android/server/am/ActivityStarter.java +++ b/services/core/java/com/android/server/am/ActivityStarter.java @@ -932,6 +932,7 @@ class ActivityStarter { // Don't modify the client's object! intent = new Intent(intent); if (componentSpecified + && !(Intent.ACTION_VIEW.equals(intent.getAction()) && intent.getData() == null) && !Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE.equals(intent.getAction()) && !Intent.ACTION_RESOLVE_INSTANT_APP_PACKAGE.equals(intent.getAction()) && mService.getPackageManagerInternalLocked() |