From dfe76e632107223524b853b48595930a541dd063 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 14 Sep 2023 22:26:34 +0530 Subject: [PATCH 1/4] Etar: Fix missed package rename --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 03c336a0f..45a59f855 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -87,7 +87,7 @@ - @@ -218,7 +218,7 @@ -- GitLab From 2c4e19885976a33ccdd8a70c290e42a78e6d8efe Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 15 Sep 2023 13:26:38 +0530 Subject: [PATCH 2/4] Etar: add elib --- app/build.gradle | 1 + settings.gradle | 1 + 2 files changed, 2 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 0e216db1a..7dbd5d2ef 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -88,6 +88,7 @@ android { } dependencies { + implementation 'foundation.e:elib:0.0.1-alpha11' // Core implementation 'androidx.core:core-ktx:1.10.0' diff --git a/settings.gradle b/settings.gradle index b2b9aba90..877dc98db 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,6 +13,7 @@ dependencyResolutionManagement { google() mavenCentral() maven { url "https://jitpack.io" } + maven { url 'https://gitlab.e.foundation/api/v4/groups/9/-/packages/maven' } } } rootProject.name = "Etar-Calendar" -- GitLab From e7872f6b3e4932edd0dcd0e6a3cb9c3a1a6abc0c Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 14 Sep 2023 22:28:47 +0530 Subject: [PATCH 3/4] Etar: Build as platform app This also allows to use this permission, which was causing a crash in android 12 and up java.lang.RuntimeException: Unable to start receiver com.android.calendar.alerts.AlertReceiver: java.lang.SecurityException: Permission Denial: android.intent.action.CLOSE_SYSTEM_DIALOGS broadcast from foundation.e.calendar (pid=4466, uid=10186) requires android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS. --- Android.bp | 2 ++ app/src/main/AndroidManifest.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/Android.bp b/Android.bp index ea7f89c46..c46022362 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 45a59f855..b20f00b2e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,6 +22,7 @@ package="ws.xsoh.etar" android:installLocation="auto"> + -- GitLab From e1e9b8eaa2343243933354fcdb0780e09b02687f Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 21 Sep 2023 17:19:12 +0530 Subject: [PATCH 4/4] Etar: Add workaround for Notification trampoline --- .../com/android/calendar/alerts/AlertReceiver.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 e469cbfb5..efc09ec0f 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); -- GitLab