This project is mirrored from https://github.com/LineageOS/android_packages_apps_DeskClock.git. Pull mirroring updated .
  1. 15 Jun, 2020 1 commit
    • Michael W's avatar
      DeskClock: Remove notification sound from firing and snoozing channels · 01c3369e
      Michael W authored
      * Firing alarms and timers needs high priority but we don't need a
        notification sound, as the alarm / timer already bring their own sound
      * This has been lost in the rework of notification channels
        -> Needs another channel recreation
      
      * Snoozing was lowered in priority in commit
        22b6cf2f
        but I didn't give it a new id, so existing installations are left with
        notification sound when snoozing - who would want that?
      
      Change-Id: I5c7fc96b657e966950414b40fb61c829040ece9f
      01c3369e
  2. 14 Jun, 2020 2 commits
    • Michael W's avatar
      DeskClock: Replace ViewPager with manual fragment handling · fbaedef9
      Michael W authored
      * Convert to using androidx Fragments
      * Group imports properly
      
      Change-Id: Iaadfb417f0ca8638936875113ec2f39853f2a39c
      fbaedef9
    • Michael W's avatar
      DeskClock: Fix german translation of "days" · 26df7bf2
      Michael W authored
      * Currently the snackbar says
        "Der Wecker klingelt in 5 Tage, 3 Stunden  und 47 Minuten"
      * It must be "Der Wecker klingelt in 5 Tagen, 3 Stunden und 47 Minuten"
      * Also checked if these plurals aren't used elsewhere so other strings
        wouldn't make sense anymore - no more usages found
      
      Change-Id: Iabadaa254afc7a04cb00d79753be1443719fce2c
      26df7bf2
  3. 12 Jun, 2020 1 commit
    • Michael W's avatar
      DeskClock: Properly align settings · b6bca2fe
      Michael W authored
      * The alarm volume setting doesn't look as it should
      * Copied "preference_volume_slider" from Settings (used in Settings->
        Sound) and stripped by stuff we don't need (suppression_text,
        widget_frame)
      * Looks like without providing an initial icon, the layout would not
        inflate the space for it properly, so provide the default one
      
      Change-Id: I31d103cd0b0a6f096d376af2026702a0a4754671
      b6bca2fe
  4. 11 Jun, 2020 1 commit
  5. 10 Jun, 2020 3 commits
    • Jesse Chan's avatar
      DeskClock: also apply disabled color to annotations · 9026139e
      Jesse Chan authored
      Change-Id: Ia2c7e28e161f1a0f01de13deff4d02a78c34f8d5
      9026139e
    • Michael W's avatar
      DeskClock: Come to the dark side... · 6fcbe7e9
      Michael W authored
      ... we have cookies
      
      * Move minSdkVersion to 24 so the notification actions don't use the
        icons anymore and we can just tint the icons black to fit onto the new
        accent color used e.g. for the FABs
      * Move accent color to an own color name which is defined differently
        for values and values-night
      * Background: Keep blue for light theme but use grey for night one
      
      Change-Id: Ib14044fc9c6de15453891638581a7e3f4d10c6c5
      6fcbe7e9
    • Michael W's avatar
      DeskClock: Rework notification channel implementation · 22b6cf2f
      Michael W authored
      
      
      * 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
      Co-authored-by: default avatarWang Han <416810799@qq.com>
      Change-Id: I6d2e9abd6a822a62b3313c62b0617d8d9211948e
      22b6cf2f
  6. 07 Jun, 2020 2 commits
  7. 05 Jun, 2020 1 commit
    • Wang Han's avatar
      Revert "Remove max aspect ratio." · 4fdeff36
      Wang Han authored
       * We don't need this when target SDK is 29, see docs:
         If your app targets Android 8.0 (API level 26) or higher, it
         fills the entire screen, according to its layout.
      
      This reverts commit b7abe063.
      
      Change-Id: I9442b05b8c4d6213676943163e3c0b995047d303
      4fdeff36
  8. 23 May, 2020 2 commits
  9. 21 May, 2020 3 commits
    • Colin Marsch's avatar
      AOSP/DeskClock - Added SET_ALARM permission check · f97987e3
      Colin Marsch authored
      
      
      Added SET_ALARM permission check for the HandleApiCalls activity.
      
      Test: manual - tested the DeskClock UI manually, as well as testing the
      alarm, stopwatch and timer
      
      Forrest run: go/forrest-run/L31100000555861022 to test CtsMediaTestCases module
      
      Change-Id: I9e42e0bc3eb1375d170091ec79315967be1efd32
      Signed-off-by: default avatarJesse Chan <jc@lineageos.org>
      f97987e3
    • Raman Tenneti's avatar
      AOSP/DeskClock - Updated to sdkVersion 29. · 8c6c3741
      Raman Tenneti authored
      
      
      Changed android:name for HandleApiCalls and HandleSetAlarmApiCalls to be same as
      Google Playstore's Clock app. Updated minSdkVersion to "23"  ala Clock app.
      
      BUG: 133177396
      BUG: 143990962
      BUG: 150612638
      
      Test: manual - Tested the DeskClock UI manually and tested the alarm, stopwatch and timer.
      
      $ make -j 40
      
      $ ls -l  out/target/product/bonito/product/app/DeskClock/DeskClock.apk
      -rw-r----- 1 rtenneti primarygroup 6125545 Apr 27 12:57 out/target/product/bonito/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.
      
      Change-Id: I5f4c8a4701635f43c9057759a2ad702968a04020
      Signed-off-by: default avatarJesse Chan <jc@lineageos.org>
      8c6c3741
    • Raman Tenneti's avatar
      AOSP/DeskClock - Updated to sdkVersion 29. · 732cd5c2
      Raman Tenneti authored
      + 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
      Signed-off-by: default avatarJesse Chan <jc@lineageos.org>
      732cd5c2
  10. 06 May, 2020 1 commit
  11. 23 Apr, 2020 1 commit
  12. 30 Mar, 2020 1 commit
  13. 27 Mar, 2020 1 commit
    • Marko Man's avatar
      Change most notfications category · a3f4392a
      Marko Man authored
      Due to androids limited dnd implementation all notifications with
      category_alarm will make sound even in dnd mode. Not all DeskClock's
      notifications are actually alarms. Change appropriate notifications
      to category_event, so that notifications sounds an be muted when
      Do not disturb is turned on.
      
      Change-Id: I5a5eb26fac85357e108e3008f7b57f053f81b599
      a3f4392a
  14. 20 Mar, 2020 1 commit
    • Danny Baumann's avatar
      Remove max aspect ratio. · b7abe063
      Danny Baumann authored
      Make sure the app is displayed in full-screen on devices with
      18:9 and 19:9 screen by removing the default max aspect ratio set for
      apps that target older API levels than O.
      
      Change-Id: I715d254e98af261ce6b881bb0c2b79eb32b4bd9c
      b7abe063
  15. 24 Feb, 2020 1 commit
  16. 01 Feb, 2020 1 commit
  17. 11 Jan, 2020 2 commits
  18. 11 Dec, 2019 8 commits
    • Pavel Kirpichyov's avatar
      Provide upgrade path for cm-14.1 -> lineage-17.0 · b5bda106
      Pavel Kirpichyov authored
      This just takes care of making the database is up to date with cm-14.1
      
      * Increasing alarm and switch to profile still need to be implemented.
      
      Change-Id: Ibbb2b618ddeb6f93cd95a0fba3923bfd6d3fbbbb
      b5bda106
    • Mao Jinlong's avatar
      DeskClock: Use POWER_OFF_ALARM permission · 5e02796e
      Mao Jinlong authored
      Use POWER_OFF_ALARM permission to send set and cancel power off alarm
      actions.
      
      CRs-fixed: 2282053
      Change-Id: I1a7984cb90db289d1bd7377963dbd28aa866eb10
      5e02796e
    • Mao Jinlong's avatar
      DeskClock: Add support of power off alarm feature · 5771a338
      Mao Jinlong authored
      1. Add set and cancel power off alarm actions
      
      Power off alarm feature is based on DeskClock app. Add set and cancel
      power off alarm actions for the feature.
      
      2. update alarm if it is handled in min framework
      
      Update the alarm instance status when the power off alarm is handled
      in min framework mode.
      
      CRs-Fixed: 2200664
      Change-Id: I9442b05b8c4d6213676943163e3c0b995047d903
      5771a338
    • Wilhelm Fitzpatrick's avatar
      DeskClock: Add back flip and shake actions · 699cff78
      Wilhelm Fitzpatrick authored
      Allow the alarm to be dismissed/snoozed by flipping or shaking
      
      Picked from:
      
      http://review.cyanogenmod.org/#/c/29894
      http://review.cyanogenmod.org/#/c/80342
      http://review.cyanogenmod.org/#/c/81204
      http://review.cyanogenmod.org/#/c/94950
      
      Authors/Contributors:
      
      Artem Chep <artemchep@gmail.com>
      Danny Baumann <dannybaumann@web.de>
      Ronald Ramsay II <ronaldramsayii@gmail.com>
      Danesh M <daneshm90@gmail.com>
      Michael Bestas <mikeioannina@gmail.com>
      Martin Brabham <mbrabham@cyngn.com>
      Keith Mok <kmok@cyngn.com> - Use accelerometer instead of orientation sensor
      Dan Pasanen <dan.pasanen@gmail.com> - Android 8.1 port
      
      Change-Id: I222b6cd53a95db6f8662e7aef52aa6922d8a5d6a
      699cff78
    • Asher Simonds's avatar
      DeskClock: adaptive icon · 862baa30
      Asher Simonds authored
      
      
      Change-Id: I772f0a697b48d2d1752aa08d517bb09050f96836
      Signed-off-by: default avatarJoey <joey@lineageos.org>
      862baa30
    • Joey's avatar
      Deskclock: define app category · 1f083c01
      Joey authored
      
      
      Change-Id: I6963ed861d6b5115ea87d1c9e59186e696b5b1de
      Signed-off-by: default avatarJoey <joey@lineageos.org>
      1f083c01
    • Raman Tenneti's avatar
      AOSP/DeskClock - Fix improperly formatted resource strings in DeskClock. · 11951a77
      Raman Tenneti authored
      TODO: Need to run translation to fix across all languages.
      
      Bug: 135627311
      
      Test: manual - Did a "make -j40" and verified that there are no warnings in strings.xml.
      Change-Id: I0895c9b5aee34f39e01a32eb8dab0231dd68cee9
      11951a77
    • Raman Tenneti's avatar
      DeskClock - Moved the android:targetSdkVersion to 25 to fix "Clock has... · 4ae827f9
      Raman Tenneti authored
      DeskClock - Moved the android:targetSdkVersion to 25 to fix "Clock has stopped" message displayed when Alarm trigger.
      
      + Added android.permission.FOREGROUND_SERVICE permission to fix the following exception.
      
        06-20 22:07:00.155  4690  4690 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.android.deskclock.alarms.AlarmService@bd4eda3 with Intent { act=change_state cat=[ALARM_MANAGER] dat=content://com.android.deskclock/instances/1 flg=0x10000004 cmp=com.android.deskclock/.alarms.AlarmService (has extras) }: java.lang.SecurityException: Permission Denial: startForeground from pid=4690, uid=10061 requires android.permission.FOREGROUND_SERVICE
      
      Bug: 135587258
      
      Test: manual - Ran the following tests on Pixel phone. Tested the clock for Alarm.
      
      $ make -j 40
       -rw-r--r-- 1 rtenneti primarygroup 4842448 Jun 20 15:17 ./target/product/marlin/system/product/app/DeskClock/DeskClock.apk
      
      $ adb install -d -r out/target/product/marlin/system/product/app/DeskClock/DeskClock.apk
        Performing Streamed Install
        Success
      
      $ adb logcat -c
      $ adb logcat >> ~/temp/logcat/0620/logcat.out.0620.1603
      
      + Set up the alarm and wait for the alarm to go off. The following is from the logcat output. "Clock has stopped" wasn't displayed. Noted there were no exceptions in the logs.
      
      06-19 11:37:03.706   929   929 D ConditionProviders.SCP: evaluateSubscriptionLocked cal=ScheduleCalendar[mDays={1, 2, 3, 4, 5, 6, 7}, mSchedule=ScheduleInfo{days=[1, 2, 3, 4, 5, 6, 7], startHour=22, startMinute=0, endHour=7, endMinute=0, exitAtAlarm=true, nextAlarm=Thu Jan 01 00:00:00 GMT 1970 (0)}], now=Wed Jun 19 11:37:03 GMT 2019 (1560944223706), nextUserAlarmTime=Thu Jun 20 11:37:00 GMT 2019 (1561030620000)
      06-19 11:37:03.706   929   929 D ConditionProviders.SCP: notifyCondition condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true STATE_FALSE reason=!meetsSchedule
      06-19 11:37:03.708   929   929 D ConditionProviders.SCP: Scheduling evaluate for Wed Jun 19 22:00:00 GMT 2019 (1560981600000), in +10h22m56s294ms, now=Wed Jun 19 11:37:03 GMT 2019 (1560944223706)
      06-19 11:37:03.711  2915  2915 D KeyguardClockSwitch: Updating clock: 1137
      06-19 11:37:03.719  4385  4385 I AlarmClock: Setting upcoming AlarmClockInfo for alarm: 4
      06-19 11:37:03.721  4385  4385 D Events  : [Alarm] [Dismiss] [DeskClock]
      06-19 11:37:03.722   929   929 D ConditionProviders.SCP: onReceive android.app.action.NEXT_ALARM_CLOCK_CHANGED
      06-19 11:37:03.723   929   929 D ConditionProviders.SCP: evaluateSubscriptionLocked cal=ScheduleCalendar[mDays={1, 2, 3, 4, 5, 6, 7}, mSchedule=ScheduleInfo{days=[1, 2, 3, 4, 5, 6, 7], startHour=22, startMinute=0, endHour=7, endMinute=0, exitAtAlarm=true, nextAlarm=Thu Jun 20 11:37:00 GMT 2019 (1561030620000)}], now=Wed Jun 19 11:37:03 GMT 2019 (1560944223722), nextUserAlarmTime=Thu Jun 20 11:37:00 GMT 2019 (1561030620000)
      06-19 11:37:03.723   929   929 D ConditionProviders.SCP: notifyCondition condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true STATE_FALSE reason=!meetsSchedule
      06-19 11:37:03.723   929   929 D ConditionProviders.SCP: Scheduling evaluate for Wed Jun 19 22:00:00 GMT 2019 (1560981600000), in +10h22m56s278ms, now=Wed Jun 19 11:37:03 GMT 2019 (1560944223722)
      06-19 11:37:03.729   929   988 I DropBoxManagerService: add tag=system_app_strictmode isTagEnabled=true flags=0x2
      06-19 11:37:03.747  2915  2915 D KeyguardClockSwitch: Updating clock: 1137
      06-19 11:37:03.765  4385  4385 V AlarmClock: AlarmService.onStartCommand() with Intent { act=STOP_ALARM dat=content://com.android.deskclock/instances/3 cmp=com.android.deskclock/.alarms.AlarmService }
      06-19 11:37:03.765  4385  4385 V AlarmClock: AlarmService.stop with instance: 3
      06-19 11:37:03.765  4385  4385 V AlarmClock: AlarmKlaxon.stop()
      06-19 11:37:03.765  4385  4385 D AsyncRingtonePlayer: Posting stop.
      06-19 11:37:03.765  4385  5050 I AsyncRingtonePlayer: Stop ringtone via android.media.Ringtone.
      06-19 11:37:03.767  4385  5050 D AsyncRingtonePlayer: Ringtone.stop() invoked.
      06-19 11:37:03.767   806  3934 D NuPlayerDriver: reset(0xed43b600) at state 5
      
      Change-Id: I75a96e1ed4acebd118c212b51b7d0e57482a66bb
      4ae827f9
  19. 13 Aug, 2019 1 commit
  20. 12 Aug, 2019 6 commits