diff --git a/Android.bp b/Android.bp index 8be0269988d8375cb88a6ff87f39e18624d9687c..54c955354a4823b4a59e42b28d6629b0992b4f7d 100644 --- a/Android.bp +++ b/Android.bp @@ -15,6 +15,8 @@ android_app { product_specific: true, + certificate: "platform", + static_libs: [ "android-common", "android-opt-timezonepicker", diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e7d82796a2e88674253e6942c974715f6c57fedd..fa2548703d0ee87418247f58794f209ece369ad3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -21,6 +21,7 @@ package="ws.xsoh.etar" android:installLocation="auto"> + diff --git a/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java b/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java index 26006d5a71912f02114c1672c5f7d64af91ba8f8..f10e3d3f79d5dca555bd61af7f211bf8f7756a33 100644 --- a/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java +++ b/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java @@ -22,6 +22,7 @@ import static com.android.calendar.alerts.AlertService.ALERT_CHANNEL_ID; import android.app.Notification; import android.app.PendingIntent; import android.app.Service; +import android.app.TaskStackBuilder; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; import android.content.ContentUris; @@ -676,6 +677,15 @@ public class AlertReceiver extends BroadcastReceiver { geoIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // If this intent cannot be handled, do not create the map action if (isResolveIntent(context, geoIntent)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context); + geoIntent = createMapActivityIntent(context, urlSpans); + if (geoIntent != null) { + taskStackBuilder.addNextIntentWithParentStack(geoIntent); + return taskStackBuilder.getPendingIntent(0, + PendingIntent.FLAG_UPDATE_CURRENT | Utils.PI_FLAG_IMMUTABLE); + } + } Intent broadcastIntent = new Intent(MAP_ACTION); broadcastIntent.setClass(context, AlertReceiver.class); broadcastIntent.putExtra(EXTRA_EVENT_ID, eventId);