From 1649845e7aeee9e10b240ade1a9797085029452b Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Tue, 6 Sep 2022 17:16:10 +0530 Subject: [PATCH 1/8] Change package name --- app/org.lineageos.etar.allowlist.xml | 2 +- app/src/main/AndroidManifest.xml | 10 +++++----- app/src/main/java/com/android/calendar/Utils.java | 2 +- .../java/com/android/calendar/icalendar/VCalendar.java | 2 +- .../java/com/android/calendar/icalendar/VEvent.java | 2 +- app/src/main/res/xml-v25/shortcuts.xml | 2 +- app/src/main/res/xml/searchable.xml | 2 +- app/src_aosp/ws/xsoh/etar/BuildConfig.java | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/org.lineageos.etar.allowlist.xml b/app/org.lineageos.etar.allowlist.xml index ad0c111c9..e1f47b484 100644 --- a/app/org.lineageos.etar.allowlist.xml +++ b/app/org.lineageos.etar.allowlist.xml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 291d959ad..15a484ff8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -19,7 +19,7 @@ --> @@ -60,7 +60,7 @@ android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_label" - android:taskAffinity="org.lineageos.etar.task" + android:taskAffinity="foundation.e.calendar.task" android:requiredAccountType="*" android:usesCleartextTraffic="false" android:theme="@style/CalendarAppThemeLight"> @@ -209,7 +209,7 @@ + android:authorities="foundation.e.calendar.CalendarRecentSuggestionsProvider" /> sPropertyList = new HashMap(); diff --git a/app/src/main/java/com/android/calendar/icalendar/VEvent.java b/app/src/main/java/com/android/calendar/icalendar/VEvent.java index 6aeea271f..5098b7717 100644 --- a/app/src/main/java/com/android/calendar/icalendar/VEvent.java +++ b/app/src/main/java/com/android/calendar/icalendar/VEvent.java @@ -88,7 +88,7 @@ public class VEvent { mAttendees = new LinkedList(); // Generate and add a unique identifier to this event - iCal requisite - addProperty(UID , UUID.randomUUID().toString() + "@org.lineageos.etar"); + addProperty(UID , UUID.randomUUID().toString() + "@foundation.e.calendar"); addTimeStamp(); } diff --git a/app/src/main/res/xml-v25/shortcuts.xml b/app/src/main/res/xml-v25/shortcuts.xml index eec1033c6..50b4c2b36 100644 --- a/app/src/main/res/xml-v25/shortcuts.xml +++ b/app/src/main/res/xml-v25/shortcuts.xml @@ -8,6 +8,6 @@ + android:targetPackage="foundation.e.calendar" /> diff --git a/app/src/main/res/xml/searchable.xml b/app/src/main/res/xml/searchable.xml index ea5550bf3..193676eff 100644 --- a/app/src/main/res/xml/searchable.xml +++ b/app/src/main/res/xml/searchable.xml @@ -22,7 +22,7 @@ android:voiceSearchMode="showVoiceSearchButton|launchRecognizer" android:voiceLanguageModel="free_form" - android:searchSuggestAuthority="org.lineageos.etar.CalendarRecentSuggestionsProvider" + android:searchSuggestAuthority="foundation.e.calendar.CalendarRecentSuggestionsProvider" android:searchSuggestSelection=" ? " android:imeOptions="actionSearch" > diff --git a/app/src_aosp/ws/xsoh/etar/BuildConfig.java b/app/src_aosp/ws/xsoh/etar/BuildConfig.java index 09551a5bc..ff3ea54e1 100644 --- a/app/src_aosp/ws/xsoh/etar/BuildConfig.java +++ b/app/src_aosp/ws/xsoh/etar/BuildConfig.java @@ -16,7 +16,7 @@ package ws.xsoh.etar; public final class BuildConfig { - public static final String APPLICATION_ID = "org.lineageos.etar"; + public static final String APPLICATION_ID = "foundation.e.calendar"; public static final boolean DEBUG = false; } -- GitLab From ff8809f236cd62deba952c85c1629325adf847a8 Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Tue, 6 Sep 2022 17:21:01 +0530 Subject: [PATCH 2/8] Use background service instead of foreground service --- .../calendar/alerts/AlertReceiver.java | 2 +- .../android/calendar/alerts/AlertService.java | 21 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) 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 b2f0958d8..51881e912 100644 --- a/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java +++ b/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java @@ -138,7 +138,7 @@ public class AlertReceiver extends BroadcastReceiver { if (Utils.isUpsideDownCakeOrLater() && !Utils.canScheduleAlarms(context)) { return; } - context.startForegroundService(intent); + context.startService(intent); } else { context.startService(intent); } diff --git a/app/src/main/java/com/android/calendar/alerts/AlertService.java b/app/src/main/java/com/android/calendar/alerts/AlertService.java index a7c0da723..23068f912 100644 --- a/app/src/main/java/com/android/calendar/alerts/AlertService.java +++ b/app/src/main/java/com/android/calendar/alerts/AlertService.java @@ -930,27 +930,6 @@ public class AlertService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { if (intent != null) { - - if (Utils.isOreoOrLater()) { - createChannels(this); - Notification notification = new NotificationCompat.Builder(this, FOREGROUND_CHANNEL_ID) - .setContentTitle(getString(R.string.foreground_notification_title)) - .setSmallIcon(R.drawable.stat_notify_refresh_events) - .setShowWhen(false) - .build(); - if (Utils.isQOrLater()) { - int serviceType; - if (Utils.isUpsideDownCakeOrLater()) { - serviceType = FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED; - } else { - serviceType = FOREGROUND_SERVICE_TYPE_DATA_SYNC; - } - ServiceCompat.startForeground(this, 1337, notification, serviceType); - } else { - startForeground(1337, notification); - } - } - Message msg = mServiceHandler.obtainMessage(); msg.arg1 = startId; msg.obj = intent.getExtras(); -- GitLab From 0e22957266ba9c607614ea93956791b6bc75337d Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Mon, 10 Oct 2022 15:14:27 +0530 Subject: [PATCH 3/8] Change app icon to our custom icon --- app/src/main/AndroidManifest.xml | 6 ++ app/src/main/res/drawable/e_day_1.xml | 25 +++++++ app/src/main/res/drawable/e_day_10.xml | 25 +++++++ app/src/main/res/drawable/e_day_11.xml | 25 +++++++ app/src/main/res/drawable/e_day_12.xml | 25 +++++++ app/src/main/res/drawable/e_day_13.xml | 25 +++++++ app/src/main/res/drawable/e_day_14.xml | 25 +++++++ app/src/main/res/drawable/e_day_15.xml | 25 +++++++ app/src/main/res/drawable/e_day_16.xml | 25 +++++++ app/src/main/res/drawable/e_day_17.xml | 25 +++++++ app/src/main/res/drawable/e_day_18.xml | 25 +++++++ app/src/main/res/drawable/e_day_19.xml | 25 +++++++ app/src/main/res/drawable/e_day_2.xml | 25 +++++++ app/src/main/res/drawable/e_day_20.xml | 25 +++++++ app/src/main/res/drawable/e_day_21.xml | 25 +++++++ app/src/main/res/drawable/e_day_22.xml | 25 +++++++ app/src/main/res/drawable/e_day_23.xml | 25 +++++++ app/src/main/res/drawable/e_day_24.xml | 25 +++++++ app/src/main/res/drawable/e_day_25.xml | 25 +++++++ app/src/main/res/drawable/e_day_26.xml | 25 +++++++ app/src/main/res/drawable/e_day_27.xml | 25 +++++++ app/src/main/res/drawable/e_day_28.xml | 25 +++++++ app/src/main/res/drawable/e_day_29.xml | 25 +++++++ app/src/main/res/drawable/e_day_3.xml | 25 +++++++ app/src/main/res/drawable/e_day_30.xml | 25 +++++++ app/src/main/res/drawable/e_day_31.xml | 25 +++++++ app/src/main/res/drawable/e_day_4.xml | 25 +++++++ app/src/main/res/drawable/e_day_5.xml | 25 +++++++ app/src/main/res/drawable/e_day_6.xml | 25 +++++++ app/src/main/res/drawable/e_day_7.xml | 25 +++++++ app/src/main/res/drawable/e_day_8.xml | 25 +++++++ app/src/main/res/drawable/e_day_9.xml | 25 +++++++ app/src/main/res/drawable/e_month_april.xml | 72 +++++++++++++++++++ app/src/main/res/drawable/e_month_august.xml | 72 +++++++++++++++++++ .../main/res/drawable/e_month_december.xml | 72 +++++++++++++++++++ .../main/res/drawable/e_month_february.xml | 72 +++++++++++++++++++ app/src/main/res/drawable/e_month_january.xml | 72 +++++++++++++++++++ app/src/main/res/drawable/e_month_july.xml | 72 +++++++++++++++++++ app/src/main/res/drawable/e_month_june.xml | 72 +++++++++++++++++++ app/src/main/res/drawable/e_month_march.xml | 72 +++++++++++++++++++ app/src/main/res/drawable/e_month_may.xml | 72 +++++++++++++++++++ .../main/res/drawable/e_month_november.xml | 72 +++++++++++++++++++ app/src/main/res/drawable/e_month_october.xml | 72 +++++++++++++++++++ .../main/res/drawable/e_month_september.xml | 72 +++++++++++++++++++ .../res/drawable/ic_launcher_background.xml | 38 +++++++--- .../res/drawable/ic_launcher_foreground.xml | 56 +++++++-------- .../res/drawable/ic_launcher_monochrome.xml | 18 ----- .../main/res/mipmap-anydpi/ic_launcher.xml | 18 +++-- app/src/main/res/values/arrays.xml | 50 +++++++++++++ 49 files changed, 1765 insertions(+), 60 deletions(-) create mode 100644 app/src/main/res/drawable/e_day_1.xml create mode 100644 app/src/main/res/drawable/e_day_10.xml create mode 100644 app/src/main/res/drawable/e_day_11.xml create mode 100644 app/src/main/res/drawable/e_day_12.xml create mode 100644 app/src/main/res/drawable/e_day_13.xml create mode 100644 app/src/main/res/drawable/e_day_14.xml create mode 100644 app/src/main/res/drawable/e_day_15.xml create mode 100644 app/src/main/res/drawable/e_day_16.xml create mode 100644 app/src/main/res/drawable/e_day_17.xml create mode 100644 app/src/main/res/drawable/e_day_18.xml create mode 100644 app/src/main/res/drawable/e_day_19.xml create mode 100644 app/src/main/res/drawable/e_day_2.xml create mode 100644 app/src/main/res/drawable/e_day_20.xml create mode 100644 app/src/main/res/drawable/e_day_21.xml create mode 100644 app/src/main/res/drawable/e_day_22.xml create mode 100644 app/src/main/res/drawable/e_day_23.xml create mode 100644 app/src/main/res/drawable/e_day_24.xml create mode 100644 app/src/main/res/drawable/e_day_25.xml create mode 100644 app/src/main/res/drawable/e_day_26.xml create mode 100644 app/src/main/res/drawable/e_day_27.xml create mode 100644 app/src/main/res/drawable/e_day_28.xml create mode 100644 app/src/main/res/drawable/e_day_29.xml create mode 100644 app/src/main/res/drawable/e_day_3.xml create mode 100644 app/src/main/res/drawable/e_day_30.xml create mode 100644 app/src/main/res/drawable/e_day_31.xml create mode 100644 app/src/main/res/drawable/e_day_4.xml create mode 100644 app/src/main/res/drawable/e_day_5.xml create mode 100644 app/src/main/res/drawable/e_day_6.xml create mode 100644 app/src/main/res/drawable/e_day_7.xml create mode 100644 app/src/main/res/drawable/e_day_8.xml create mode 100644 app/src/main/res/drawable/e_day_9.xml create mode 100644 app/src/main/res/drawable/e_month_april.xml create mode 100644 app/src/main/res/drawable/e_month_august.xml create mode 100644 app/src/main/res/drawable/e_month_december.xml create mode 100644 app/src/main/res/drawable/e_month_february.xml create mode 100644 app/src/main/res/drawable/e_month_january.xml create mode 100644 app/src/main/res/drawable/e_month_july.xml create mode 100644 app/src/main/res/drawable/e_month_june.xml create mode 100644 app/src/main/res/drawable/e_month_march.xml create mode 100644 app/src/main/res/drawable/e_month_may.xml create mode 100644 app/src/main/res/drawable/e_month_november.xml create mode 100644 app/src/main/res/drawable/e_month_october.xml create mode 100644 app/src/main/res/drawable/e_month_september.xml delete mode 100644 app/src/main/res/drawable/ic_launcher_monochrome.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 15a484ff8..010895ccf 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -91,6 +91,12 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/e_day_10.xml b/app/src/main/res/drawable/e_day_10.xml new file mode 100644 index 000000000..145c3f928 --- /dev/null +++ b/app/src/main/res/drawable/e_day_10.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_11.xml b/app/src/main/res/drawable/e_day_11.xml new file mode 100644 index 000000000..293efbd24 --- /dev/null +++ b/app/src/main/res/drawable/e_day_11.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_12.xml b/app/src/main/res/drawable/e_day_12.xml new file mode 100644 index 000000000..b5b31ecdf --- /dev/null +++ b/app/src/main/res/drawable/e_day_12.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_13.xml b/app/src/main/res/drawable/e_day_13.xml new file mode 100644 index 000000000..65d655305 --- /dev/null +++ b/app/src/main/res/drawable/e_day_13.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_14.xml b/app/src/main/res/drawable/e_day_14.xml new file mode 100644 index 000000000..1f9c341ef --- /dev/null +++ b/app/src/main/res/drawable/e_day_14.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_15.xml b/app/src/main/res/drawable/e_day_15.xml new file mode 100644 index 000000000..e67c43fc4 --- /dev/null +++ b/app/src/main/res/drawable/e_day_15.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_16.xml b/app/src/main/res/drawable/e_day_16.xml new file mode 100644 index 000000000..ceecd0f5b --- /dev/null +++ b/app/src/main/res/drawable/e_day_16.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_17.xml b/app/src/main/res/drawable/e_day_17.xml new file mode 100644 index 000000000..9417f7769 --- /dev/null +++ b/app/src/main/res/drawable/e_day_17.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_18.xml b/app/src/main/res/drawable/e_day_18.xml new file mode 100644 index 000000000..77e3a93a9 --- /dev/null +++ b/app/src/main/res/drawable/e_day_18.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_19.xml b/app/src/main/res/drawable/e_day_19.xml new file mode 100644 index 000000000..83ef274e9 --- /dev/null +++ b/app/src/main/res/drawable/e_day_19.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_2.xml b/app/src/main/res/drawable/e_day_2.xml new file mode 100644 index 000000000..325e7842c --- /dev/null +++ b/app/src/main/res/drawable/e_day_2.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_20.xml b/app/src/main/res/drawable/e_day_20.xml new file mode 100644 index 000000000..1cb30c1bd --- /dev/null +++ b/app/src/main/res/drawable/e_day_20.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_21.xml b/app/src/main/res/drawable/e_day_21.xml new file mode 100644 index 000000000..d42dfec1c --- /dev/null +++ b/app/src/main/res/drawable/e_day_21.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_22.xml b/app/src/main/res/drawable/e_day_22.xml new file mode 100644 index 000000000..37e939517 --- /dev/null +++ b/app/src/main/res/drawable/e_day_22.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_23.xml b/app/src/main/res/drawable/e_day_23.xml new file mode 100644 index 000000000..2f0681024 --- /dev/null +++ b/app/src/main/res/drawable/e_day_23.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_24.xml b/app/src/main/res/drawable/e_day_24.xml new file mode 100644 index 000000000..5f2c750c7 --- /dev/null +++ b/app/src/main/res/drawable/e_day_24.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_25.xml b/app/src/main/res/drawable/e_day_25.xml new file mode 100644 index 000000000..13e270fa9 --- /dev/null +++ b/app/src/main/res/drawable/e_day_25.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_26.xml b/app/src/main/res/drawable/e_day_26.xml new file mode 100644 index 000000000..8c83d4348 --- /dev/null +++ b/app/src/main/res/drawable/e_day_26.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_27.xml b/app/src/main/res/drawable/e_day_27.xml new file mode 100644 index 000000000..d801bd5cf --- /dev/null +++ b/app/src/main/res/drawable/e_day_27.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_28.xml b/app/src/main/res/drawable/e_day_28.xml new file mode 100644 index 000000000..feb57377f --- /dev/null +++ b/app/src/main/res/drawable/e_day_28.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_29.xml b/app/src/main/res/drawable/e_day_29.xml new file mode 100644 index 000000000..5704f10ae --- /dev/null +++ b/app/src/main/res/drawable/e_day_29.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_3.xml b/app/src/main/res/drawable/e_day_3.xml new file mode 100644 index 000000000..5dc2f3396 --- /dev/null +++ b/app/src/main/res/drawable/e_day_3.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_30.xml b/app/src/main/res/drawable/e_day_30.xml new file mode 100644 index 000000000..2fc6176c4 --- /dev/null +++ b/app/src/main/res/drawable/e_day_30.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_31.xml b/app/src/main/res/drawable/e_day_31.xml new file mode 100644 index 000000000..9a5ac3fc3 --- /dev/null +++ b/app/src/main/res/drawable/e_day_31.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_4.xml b/app/src/main/res/drawable/e_day_4.xml new file mode 100644 index 000000000..c61ba0071 --- /dev/null +++ b/app/src/main/res/drawable/e_day_4.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_5.xml b/app/src/main/res/drawable/e_day_5.xml new file mode 100644 index 000000000..7d04e2d6e --- /dev/null +++ b/app/src/main/res/drawable/e_day_5.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_6.xml b/app/src/main/res/drawable/e_day_6.xml new file mode 100644 index 000000000..5024d1e08 --- /dev/null +++ b/app/src/main/res/drawable/e_day_6.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_7.xml b/app/src/main/res/drawable/e_day_7.xml new file mode 100644 index 000000000..b997ef30f --- /dev/null +++ b/app/src/main/res/drawable/e_day_7.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_8.xml b/app/src/main/res/drawable/e_day_8.xml new file mode 100644 index 000000000..52c781f3a --- /dev/null +++ b/app/src/main/res/drawable/e_day_8.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_day_9.xml b/app/src/main/res/drawable/e_day_9.xml new file mode 100644 index 000000000..005054128 --- /dev/null +++ b/app/src/main/res/drawable/e_day_9.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/e_month_april.xml b/app/src/main/res/drawable/e_month_april.xml new file mode 100644 index 000000000..aabee11d1 --- /dev/null +++ b/app/src/main/res/drawable/e_month_april.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_august.xml b/app/src/main/res/drawable/e_month_august.xml new file mode 100644 index 000000000..6e389a6e9 --- /dev/null +++ b/app/src/main/res/drawable/e_month_august.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_december.xml b/app/src/main/res/drawable/e_month_december.xml new file mode 100644 index 000000000..3c6c648e7 --- /dev/null +++ b/app/src/main/res/drawable/e_month_december.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_february.xml b/app/src/main/res/drawable/e_month_february.xml new file mode 100644 index 000000000..92fb99180 --- /dev/null +++ b/app/src/main/res/drawable/e_month_february.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_january.xml b/app/src/main/res/drawable/e_month_january.xml new file mode 100644 index 000000000..625c57350 --- /dev/null +++ b/app/src/main/res/drawable/e_month_january.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_july.xml b/app/src/main/res/drawable/e_month_july.xml new file mode 100644 index 000000000..05c958172 --- /dev/null +++ b/app/src/main/res/drawable/e_month_july.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_june.xml b/app/src/main/res/drawable/e_month_june.xml new file mode 100644 index 000000000..9214d6215 --- /dev/null +++ b/app/src/main/res/drawable/e_month_june.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_march.xml b/app/src/main/res/drawable/e_month_march.xml new file mode 100644 index 000000000..dc99f42e2 --- /dev/null +++ b/app/src/main/res/drawable/e_month_march.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_may.xml b/app/src/main/res/drawable/e_month_may.xml new file mode 100644 index 000000000..6aaacd2dc --- /dev/null +++ b/app/src/main/res/drawable/e_month_may.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_november.xml b/app/src/main/res/drawable/e_month_november.xml new file mode 100644 index 000000000..f1de93e55 --- /dev/null +++ b/app/src/main/res/drawable/e_month_november.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_october.xml b/app/src/main/res/drawable/e_month_october.xml new file mode 100644 index 000000000..ccc0a23d6 --- /dev/null +++ b/app/src/main/res/drawable/e_month_october.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/e_month_september.xml b/app/src/main/res/drawable/e_month_september.xml new file mode 100644 index 000000000..0ea87d477 --- /dev/null +++ b/app/src/main/res/drawable/e_month_september.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml index cc2f6babf..4d26f5bbb 100644 --- a/app/src/main/res/drawable/ic_launcher_background.xml +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -1,18 +1,40 @@ + ~ Copyright ECORP SAS 2022 + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see . + --> + android:pathData="M0,0h108v108h-108z"> + + + + + + + + android:pathData="M0,0h108v38h-108z" + android:fillColor="#F83E54"/> diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml index 59a07bb45..80e8f47c9 100644 --- a/app/src/main/res/drawable/ic_launcher_foreground.xml +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -1,38 +1,34 @@ + ~ Copyright ECORP SAS 2022 + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see . + --> - - - - - - - - - - - - - + + + + diff --git a/app/src/main/res/drawable/ic_launcher_monochrome.xml b/app/src/main/res/drawable/ic_launcher_monochrome.xml deleted file mode 100644 index ecfabb49f..000000000 --- a/app/src/main/res/drawable/ic_launcher_monochrome.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml index b58c81ff9..81cae2c43 100644 --- a/app/src/main/res/mipmap-anydpi/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi/ic_launcher.xml @@ -1,10 +1,20 @@ + ~ Copyright ECORP SAS 2022 + ~ This program is free software: you can redistribute it and/or modify + ~ it under the terms of the GNU General Public License as published by + ~ the Free Software Foundation, either version 3 of the License, or + ~ (at your option) any later version. + ~ + ~ This program is distributed in the hope that it will be useful, + ~ but WITHOUT ANY WARRANTY; without even the implied warranty of + ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ~ GNU General Public License for more details. + ~ + ~ You should have received a copy of the GNU General Public License + ~ along with this program. If not, see . + --> - diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 5a6453066..3f0ddacb2 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -409,4 +409,54 @@ @drawable/logo_calendar_30_adaptive @drawable/logo_calendar_31_adaptive + + + + @drawable/e_month_january + @drawable/e_month_february + @drawable/e_month_march + @drawable/e_month_april + @drawable/e_month_may + @drawable/e_month_june + @drawable/e_month_july + @drawable/e_month_august + @drawable/e_month_september + @drawable/e_month_october + @drawable/e_month_november + @drawable/e_month_december + + + + @drawable/e_day_1 + @drawable/e_day_2 + @drawable/e_day_3 + @drawable/e_day_4 + @drawable/e_day_5 + @drawable/e_day_6 + @drawable/e_day_7 + @drawable/e_day_8 + @drawable/e_day_9 + @drawable/e_day_10 + @drawable/e_day_11 + @drawable/e_day_12 + @drawable/e_day_13 + @drawable/e_day_14 + @drawable/e_day_15 + @drawable/e_day_16 + @drawable/e_day_17 + @drawable/e_day_18 + @drawable/e_day_19 + @drawable/e_day_20 + @drawable/e_day_21 + @drawable/e_day_22 + @drawable/e_day_23 + @drawable/e_day_24 + @drawable/e_day_25 + @drawable/e_day_26 + @drawable/e_day_27 + @drawable/e_day_28 + @drawable/e_day_29 + @drawable/e_day_30 + @drawable/e_day_31 + -- GitLab From 7df2d8885c12754fa97b1b0f156973618902738e Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Tue, 13 Sep 2022 19:02:47 +0530 Subject: [PATCH 4/8] Hide theme related options from settings and disable monet --- .../main/java/com/android/calendar/Utils.java | 20 +------------------ .../main/res/xml-v26/general_preferences.xml | 9 ++++++--- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/com/android/calendar/Utils.java b/app/src/main/java/com/android/calendar/Utils.java index 9fc8fa512..5c7b126ae 100644 --- a/app/src/main/java/com/android/calendar/Utils.java +++ b/app/src/main/java/com/android/calendar/Utils.java @@ -248,26 +248,8 @@ public class Utils { * exist but cannot be configured by the user. */ public static boolean isMonetAvailable(Context context) { - if (Build.VERSION.SDK_INT < 31) { - return false; - } - - // Wallpaper-based theming requires a color extraction engine and is enabled when the `flag_monet` - // config flag is enabled in SystemUI. It's unclear how to access this information from a - // normal application. - // - // To determine whether Material You is available on the device, we use a naive heuristic which - // is to compare the palette against known default values in AOSP. - Resources resources = context.getResources(); - int probe1 = resources.getColor(android.R.color.system_accent1_500, context.getTheme()); - int probe2 = resources.getColor(android.R.color.system_accent2_500, context.getTheme()); - if (probe1 == Color.parseColor("#007fac") && probe2 == Color.parseColor("#657985")) { - // AOSP palette - Log.d(TAG, "Material You not available - Detected AOSP palette"); - return false; - } - return true; + return false; } public static int getViewTypeFromIntentAndSharedPref(Activity activity) { diff --git a/app/src/main/res/xml-v26/general_preferences.xml b/app/src/main/res/xml-v26/general_preferences.xml index 18c0098f8..486f7c8f1 100644 --- a/app/src/main/res/xml-v26/general_preferences.xml +++ b/app/src/main/res/xml-v26/general_preferences.xml @@ -22,17 +22,20 @@ app:title="@string/preferences_theme" app:entries="@array/pref_theme_entries" app:entryValues="@array/pref_theme_values" - app:defaultValue="@string/pref_theme_default" /> + app:defaultValue="@string/pref_theme_default" + app:isPreferenceVisible="false" /> + app:title="@string/preferences_pure_black_night_mode" + app:isPreferenceVisible="false" /> + app:defaultValue="teal" + app:isPreferenceVisible="false" /> Date: Thu, 14 Sep 2023 22:28:47 +0530 Subject: [PATCH 5/8] 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. --- app/Android.bp | 2 ++ app/src/main/AndroidManifest.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/app/Android.bp b/app/Android.bp index de39bace8..74cb39a61 100644 --- a/app/Android.bp +++ b/app/Android.bp @@ -17,6 +17,8 @@ android_app { product_specific: true, + certificate: "platform", + static_libs: [ // DO NOT EDIT THIS SECTION MANUALLY "androidx.core_core-ktx", diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 010895ccf..737972011 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,6 +22,7 @@ package="foundation.e.calendar" android:installLocation="auto"> + -- GitLab From 7469cd9cc36f3873fe08122ec0257cd996098d64 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 21 Sep 2023 17:19:12 +0530 Subject: [PATCH 6/8] 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 51881e912..5731932e0 100644 --- a/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java +++ b/app/src/main/java/com/android/calendar/alerts/AlertReceiver.java @@ -20,6 +20,7 @@ package com.android.calendar.alerts; 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; @@ -685,6 +686,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 From 41e404e117d506ae53a0bbb8733ee1aa75b912c8 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 15 Apr 2024 02:29:56 +0000 Subject: [PATCH 7/8] 6430-t-Clear_notification_after_event_ends --- .../com/android/calendar/alerts/AlertService.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/android/calendar/alerts/AlertService.java b/app/src/main/java/com/android/calendar/alerts/AlertService.java index 23068f912..a45f129c5 100644 --- a/app/src/main/java/com/android/calendar/alerts/AlertService.java +++ b/app/src/main/java/com/android/calendar/alerts/AlertService.java @@ -534,15 +534,13 @@ public class AlertService extends Service { int newState = -1; boolean newAlert = false; - // Uncomment for the behavior of clearing out alerts after the - // events ended. b/1880369 - // - // if (endTime < currentTime) { - // newState = CalendarAlerts.DISMISSED; - // } else + // clearing out alerts after the events ended. b/1880369 + if (endTime < currentTime) { + newState = CalendarAlerts.STATE_DISMISSED; + } // Remove declined events - boolean sendAlert = !declined; + boolean sendAlert = !declined && newState != CalendarAlerts.STATE_DISMISSED; // Check for experimental reminder settings. if (remindRespondedOnly) { // If the experimental setting is turned on, then only send -- GitLab From 7caad12de439bc464d87ecf5054565d0d2a2fc27 Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Mon, 8 Jul 2024 18:24:47 +0600 Subject: [PATCH 8/8] feat: add recurrence rule support for importing calendar event from .ics file The recurrence rule (RRULE) property has been added to the VEvent class. This property represents a recurrence rule, such as "FREQ=WEEKLY;COUNT=10;BYDAY=MO". The property list in the VEvent also has been updated to include RRULE. The ImportActivity class now includes the RRULE property when creating a calendar intent. This allows the recurrence rule of an event to be imported along with other properties. It creates the correct recurrence rule while importing a recurring calendar event from an .ics file. --- app/src/main/java/com/android/calendar/ImportActivity.java | 2 ++ app/src/main/java/com/android/calendar/icalendar/VEvent.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/android/calendar/ImportActivity.java b/app/src/main/java/com/android/calendar/ImportActivity.java index fa89b4457..c55f31c6f 100644 --- a/app/src/main/java/com/android/calendar/ImportActivity.java +++ b/app/src/main/java/com/android/calendar/ImportActivity.java @@ -162,6 +162,8 @@ public class ImportActivity extends Activity { IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.URL))); calIntent.putExtra(CalendarContract.Events.ORGANIZER, IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.ORGANIZER))); + calIntent.putExtra(CalendarContract.Events.RRULE, + IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.RRULE))); if (firstEvent.mAttendees.size() > 0) { StringBuilder builder = new StringBuilder(); diff --git a/app/src/main/java/com/android/calendar/icalendar/VEvent.java b/app/src/main/java/com/android/calendar/icalendar/VEvent.java index 5098b7717..1bef91cd2 100644 --- a/app/src/main/java/com/android/calendar/icalendar/VEvent.java +++ b/app/src/main/java/com/android/calendar/icalendar/VEvent.java @@ -45,6 +45,7 @@ public class VEvent { public static String DESCRIPTION = "DESCRIPTION"; public static String ATTENDEE = "ATTENDEE"; public static String CATEGORIES = "CATEGORIES"; + public static String RRULE = "RRULE"; // Recurrence rule, example: FREQ=WEEKLY;COUNT=10;BYDAY=MO // Stores the -arity of the attributes that this component can have private static HashMap sPropertyList = new HashMap(); @@ -66,10 +67,10 @@ public class VEvent { sPropertyList.put(DTSTAMP,1); sPropertyList.put(SUMMARY,1); sPropertyList.put(DESCRIPTION,1); - sPropertyList.put(ATTENDEE, Integer.MAX_VALUE); sPropertyList.put(CATEGORIES, Integer.MAX_VALUE); sPropertyList.put(CATEGORIES, Integer.MAX_VALUE); + sPropertyList.put(RRULE, 1); } // Stores attributes and their corresponding values belonging to the Event component -- GitLab