summaryrefslogtreecommitdiff
path: root/src/com/android/deskclock/data/TimerNotificationBuilder.java
AgeCommit message (Collapse)Author
2022-04-18DeskClock: Remove compatibility to old APIsHEADsugisawa-mr1Michael W
* We never build on these, so the code and annotations are useless Change-Id: I791370b531ecadcbddb63ca04d5c4c51aafe1bc1
2022-04-18DeskClock: Material Me? No YOU!Michael W
* Since Android 12 introduced a new style, try to mimic it for this app * Due to AndroidX and the support libraries still being old, we have to, like Settings does with SettingsLib, create our own styles in the desired looks * Also adjust the color scheme to reflect Material You * We deviated from AOSP already quite a bit, so we don't need to really care about the change's footprint * Clean up behind us by removing (now unused) resources and includes in files that were modified anyways (and adjust order while on it) * Copy CollapsibleToolbarBaseActivity and required resources from SettingsLib - that way we can mimic the style easily without having to move this app to system_ext or using privileged_api * Since we always use dark layout, modify slightly so it works for us * Remove things we don't need so we don't have to copy too many files from SettingsLib Change-Id: I4c81e03c71f468a9e468426a8233ad96059cb05d
2022-04-18DeskClock: Add FLAG_IMMUTABLEMichael W
* As per recommendations Change-Id: I467c5eec9e7de1cb8084a173e942832c6ac44e27
2020-12-08DeskClock: Rework notification channel implementationMichael W
* Alarm notifications etc. are important and should be on high importance level. * On contrast, upcoming alarms etc. should not have sounds or vibrations attached to them. * In addition, we need to fix strings for notification channel. * In order to achieve this, we need to create some new channels because you can't change the priority for existing channels * Delete old channels on boot and update the names of existing channels if they already exist (they get created with the first notification requiring them) * Move creation of upcoming alarm notifications into one place Test: manual - Tested the DeskClock UI manually and tested that every possible notification behaves as expected. Co-authored-by: Wang Han <416810799@qq.com> Change-Id: I6d2e9abd6a822a62b3313c62b0617d8d9211948e
2019-11-13AOSP/DeskClock - Updated to sdkVersion 29.Raman Tenneti
+ Fixed all the comments from jplemieux@ in CL: https://android-review.googlesource.com/c/platform/packages/apps/DeskClock/+/1161143 + Incorporated changes from Luca Stefani (https://android-review.googlesource.com/c/platform/packages/apps/DeskClock/+/1162919) BUG: 133177396 BUG: 143990962 Test: manual - Tested the DeskClock UI manually and tested the alarm, stopwatch and timer. $ make -j 40 $ ls -l out/target/product/generic/system/product/app/DeskClock/DeskClock.apk -rw-r--r-- 1 rtenneti .... 6436375 Nov 11 16:09 out/target/product/generic/system/product/app/DeskClock/DeskClock.apk $ adb install -r out/target/product/generic/system/product/app/DeskClock/DeskClock.apk + Verified by setting up the alaram and waiting for the alarm to go off. "Clock has stopped" wasn't displayed. Noted there were no exceptions in the logs. (b/135587258) ++ The following are the results from logcat with manual alaram testing On x20web site in my home directory - ~rtenneti/android/ logcat.out.1111.1610 logcat.out.1112.1603 ++ Verified there were no java exceptions. $ grep -n -i 'exception' ~rtenneti/android/logcat.out.1111.1610 | wc -l 0 ++ Verified Alarm was firing (results are in x20web site) $ grep -n -i 'alarm' ~rtenneti/android/logcat.out.1111.1610 (for an alarm that was set to 19:12:00 at 19:11:19. Results from Alarm firing). 6880:11-11 19:11:19.403 8813 8863 I AlarmClock: Registering instance: 1 6881:11-11 19:11:19.405 8813 8863 I AlarmClock: Setting high notification state to instance 1 6882:11-11 19:11:19.406 8813 8863 V AlarmClock: *** notifyChange() id: 1 url content://com.android.deskclock/instances/1 6883:11-11 19:11:19.408 8813 8863 V AlarmClock: Displaying high priority notification for alarm instance: 1 6884:11-11 19:11:19.414 8813 8863 I AlarmClock: Scheduling state change 5 to instance 1 at Mon 7:12 PM (1573517520000) 6885:11-11 19:11:19.419 8813 8863 I AlarmClock: Setting upcoming AlarmClockInfo for alarm: 1 6887:11-11 19:11:19.423 1329 1329 V SettingsProvider: Notifying for 0: content://settings/system/next_alarm_formatted .... 7143:11-11 19:12:00.031 1329 1329 V SettingsProvider: Notifying for 0: content://settings/system/next_alarm_formatted 7144:11-11 19:12:00.032 1329 1329 D ConditionProviders.SCP: onReceive android.app.action.NEXT_ALARM_CLOCK_CHANGED .... 7152:11-11 19:12:00.055 8813 8813 I AlarmClock: Setting fire state to instance 1 7153:11-11 19:12:00.105 8813 8813 V AlarmClock: *** notifyChange() id: 1 url content://com.android.deskclock/instances/1 7154:11-11 19:12:00.112 8813 8813 D Events : [Alarm] [Fire] 7155:11-11 19:12:00.113 8813 8813 I AlarmClock: Scheduling state change 6 to instance 1 at Mon 7:22 PM (1573518120000) 7156:11-11 19:12:00.118 8813 8813 I AlarmClock: Canceling upcoming AlarmClockInfo 7157:11-11 19:12:00.123 8813 8813 V AlarmClock: AlarmService.start with instance: 1 7158:11-11 19:12:00.124 8813 8813 V AlarmClock: Displaying alarm notification for alarm instance: 1 7159:11-11 19:12:00.130 8813 8813 V AlarmClock: Clearing notifications for alarm instance: 1 7161:11-11 19:12:00.145 8813 8813 V AlarmClock: AlarmKlaxon.start() ... Change-Id: I005530d5d82568e028acb4cbad1f3212fc9c61a2
2019-11-08Revert submissionRaman Tenneti
Reason for revert: https://b.corp.google.com/issues/144125913 - DeskClock exits when alarm goes off. Change-Id: I55b1a95632c52235429365ca64c36840b23bb005
2019-11-07AOSP/DeskClock - Updated to sdkVersion 29.Raman Tenneti
BUG: 133177396 BUG: 143990962 Test: manual - Tested the DeskClock UI manually and tested the alarm, stopwatch and timer. $ make -j 40 $ ls -l out/target/product/generic/system/product/app/DeskClock/DeskClock.apk -rw-r--r-- 1 rtenneti primarygroup 6432279 Nov 6 19:07 out/target/product/generic/system/product/app/DeskClock/DeskClock.apk $ adb install -r out/target/product/generic/system/product/app/DeskClock/DeskClock.apk + Verified by setting up the alaram and waiting for the alarm to go off. "Clock has stopped" wasn't displayed. Noted there were no exceptions in the logs. (b/135587258) Change-Id: Ic946cb58ddc8430c034b73854080c586a1939d4a
2018-04-03Convert DeskClock to androidx.Aurimas Liutikas
Test: compile and open Bug: 76692459 Change-Id: Ibf8e95a917fbe3e364340ed1c5fba6e66f2d8afd
2017-07-13Update DeskClock to use v4 NotificationCompatIan Lake
v7 NotificationCompat's DecoratedCustomViewStyle has been deprecated and folded into the v4 NotificationCompat. By updating the imports, we avoid using the deprecated versions and fully switch to the new versions. Test: mmma packages/apps/DeskClock BUG: 28983951 Change-Id: I9028f3f048fc3857a24fa83f5ed075107d85e7cf
2016-10-04Timer no longer has Pre-N and N+ notification builders.Sean Stout
Bug: 30793112 Test: manual - Confirm notifications post correctly on Pre-N and N Change-Id: I7921707a021e98396cd8b5e586d9b9aefecc212a