History log of /packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
63669870c5677e73c61ae81dd7469abccb51d629 01-Feb-2017 James Lemieux <jplemieux@google.com> Suppress lint warnings

Test: N/A
Change-Id: I8c1d33cdf0470dd9c21c84395f9014abfa7e0ba6
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
2a138d4a772ad8cf1d3e9cd9682d69f4f8d49db6 28-Jan-2017 James Lemieux <jplemieux@google.com> Avoid ActivityNotFoundException when missing default alarm ringtone

Bug: 34766844
Test: Install Clock on a chromebook and view snack bar
Change-Id: Ie7707f65ad20d745d47a1d95147d2754166c59b2
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
95eed3212011413e1cb717c281e2157859a5adf4 07-Jan-2017 Sean Stout <sstout@google.com> User is now informed when a custom ringtone in unplayable.

Bug: 34132184

When a user moves, renames, or deletes a file which was previously
selected as a custom ringtone, the clock is unable to play it back.
This is now conveyed to the user as a warning badge on the ringtone
selection screen. The user will now be prompted to remove the
ringtone if they tap on the badged ringtone.

Change-Id: I913b0c194dc463ff51b59b7c8e600ab18507b82d
(cherry picked from commit 84994eb7985da1cdfa379b73bdee31ab548c102d)
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
e63f127d8dba518b0859db880fca5ba647abbbfc 13-Dec-2016 James Lemieux <jplemieux@google.com> Merge "Avoid setting default home timezone to an illegal value" into ub-deskclock-huddle
84b60fe3a95f07ee793d880ca754389159b4929e 12-Dec-2016 James Lemieux <jplemieux@google.com> Avoid setting default home timezone to an illegal value

Bug: 33418631
Test: Flash device. Open Clock. Verify the home timezone is absent.

Adjusting the default home timezone via Settings presents a subset
of all available TimeZones. After a fresh install of Android, it is possible
for Clock to launch before setup wizard completes and the timezone
of the device becomes known. In these cases, attempts to write an
illegal TimeZone (absent from the set of TimeZones to choose from in
Settings) may occur. These attempts are now ignored.

Change-Id: I0e9db67f2fc3250487d11899a36aa867f894a0b5
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
df466cea0899b6dd2efd3ebd961c614486b639d0 13-Dec-2016 James Lemieux <jplemieux@google.com> Unmuting alarm stream now adjusts volume to a higher level

Bug: 33419208
Change-Id: I7642a1622518e4e67fd315f3d69046a18a920697
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
58d9315aed4f645eb60c22be117b074e18c0982f 08-Dec-2016 James Lemieux <jplemieux@google.com> Prevent reset timers from having their remaining time changed

Bug: 33416541
Bug: 33397230

This CL also removes the notion of a maximum timer length. In
practice, the UI components limit timer lengths to 99h 99m 99s,
but more time can be added after creation and external API
callers can specify longer lengths than the UI allows.

Change-Id: Ib3cb503e1aecea1ceb0427e4fe8267595c84e852
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
0777a082e248c33c2e5a32690bfcdbd5de7d3f9e 05-Dec-2016 James Lemieux <jplemieux@google.com> Remove DataModel.getSharedPreferences()

Bug: 33251787

All access to SharedPreferences now occurs privately within
DataModel and UiDataModel. This ensures SharedPreferences
are created precisely once and cached in member variables
(in the delegate models behind DataModel). Tests can now be
isolated from each other by rebuilding those delegate models.

Change-Id: Ie7bf69bed13be1604e73dca6058877bc05e8afea
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
ff62e7fa903e3b6b11d0443543725c1351ab289d 03-Dec-2016 James Lemieux <jplemieux@google.com> Refactor where SharedPreferences are built

Bug: 33251787

To enable easier testing, build and migrate SharedPreferences once
during Application creation and only store references to it in member
variables.

Change-Id: I562d2cbddeeff165304fc8844d2af4b765fe4861
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
23629266834a251cb937a885e5223e5ae37cc6fa 21-Nov-2016 Christine Franks <christyfranks@google.com> Fix janky RepeatDays animation

Bug: 33039716
Test: manual - no apparent jank (or strict mode violations) during
repeatdays expansion/contraction, and systrace reports no dropped
frames during the animation itself.

Change-Id: I923781f44a5db50534640ae605705f7437c805f4
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
c9446b52d9391e859e65d11e5342d84cfe3e781c 05-Nov-2016 James Lemieux <jplemieux@google.com> Avoid fetching ringtone titles on the main thread

Bug: 32645208
Bug: 32203879

The ringtone title cache is now primed when loading alarms and
when loading ringtones for the picker. If the cache is already
primed, no work is done. This will handle all cases except when
alarms are created with custom ringtone uri, which is a very rare
occurrence.

Change-Id: Ib97c77e688f8055642af2c079f41a49e93a13a20
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
0b19985ecfa0f43acb8ededc173f643843098a95 09-Nov-2016 James Lemieux <jplemieux@google.com> Stop misrepresenting alarm time on DST days

Bug: 27654884

The alarms list displays the alarm time by formatting a Calendar object.
The Calendar object is always created on the current date. If the
current date happens to be the day DST is applied and the alarm time
falls in the missing hour (in the spring), Calendar adjusts the hour ahead
an hour, causing the alarm time to be incorrectly displayed on screen.

The Calendar object is now created on a fixed non-DST day to avoid
applying DST rules inappropriately.

Change-Id: Ibf3f86a84171edcf819a132fc3f3efdd4f32dd5d
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
33781c882e4229f4ec1a8fafbabb9d4b8b8e2932 14-Oct-2016 James Lemieux <jplemieux@google.com> Implementing fullscreen ringtone picker

Bug: 27856432

Ringtone picker now looks more like the rest of the app. Also allows
the user to pick a file chosen from their file system using the built-in
file browser.

Change-Id: I8ce9dbc28e414d188f52b3885960a475a16061d8
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
25384711e3c2894a84642c49953594930dd078ab 21-Oct-2016 James Lemieux <jplemieux@google.com> Refactor code that checks for settings that suppress alarms

Bug: 32196863
Bug: 32198258
Bug: 32011667
Test: all testing performed manually

This code was located in the DeskClock activity, but has been moved
to SilentSettingsModel, a new delegate of DataModel. The settings
themselves are now inspected on a background thread. A new check
was added to inspect clock notification blocking.

Change-Id: I9eae5832bfed201f22ac899bb419334f799dd104
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
a81fe295c010df16b29350b66757c7285ff9998a 17-Oct-2016 Sean Stout <sstout@google.com> Merge "Add TimeModel for accessing time data." into ub-deskclock-huddle
be74d5fefb57de5ec6bb986bb3ef6f2874da5a00 11-Oct-2016 Sean Stout <sstout@google.com> Add TimeModel for accessing time data.

Bug: 31990801
Change-Id: I9bc79e4d09fa4d14e57bc15a3863690c5fbaff7e
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
7b852b43db6d9e50814dd07366b025b3f9f9b758 08-Sep-2016 Christine Franks <christyfranks@google.com> Add seconds option for main clock

Bug: 18594326
Test: Manual - go to settings, toggle setting for displaying seconds,
toggle between analog and digital clocks and toggle display seconds
setting again. Close the app and reopen to test persistence of setting.
On upgrade from old version, current defaults are respected.
Change-Id: I21391929e59f5e8ada77efe446acbc13145478ee
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
f9f1bb7fbc803b8a281032cb2eec521c72ee4abe 09-Sep-2016 Justin Klaassen <justinklaassen@google.com> Add support to set Timer length / remainingTime
am: 705928dc4b

Change-Id: I2b3e0dd9aef4a0fd2fc073cc75c293ae98f72057
705928dc4b0ed61e28d7f2807d5af3aaa9075806 08-Sep-2016 Justin Klaassen <justinklaassen@google.com> Add support to set Timer length / remainingTime

Bug: 30076796

- EXPIRED / MISSED timers now have their totalLength reset to 0L and
remainingTime set to <= 0L at the time of expire() or miss().

Change-Id: I8dc954da6b271c61d9a64305a77ecb7edb6fb0fd
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
d558f895bb099c9d324e32f14d678515ae76882f 07-Sep-2016 Justin Klaassen <justinklaassen@google.com> Add support to reset timer without deleting
am: 12540ba3d8

Change-Id: Id7ae52b46cd1377c703503c07a79ad694b78635d
12540ba3d8802d36c3893c6b88300c6a391d7d22 07-Sep-2016 Justin Klaassen <justinklaassen@google.com> Add support to reset timer without deleting

Bug: 30076796
Change-Id: Ibe2e3728cbff6455cf4b944ea12bd5ae58adfe0b
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
8670cfcca8323116fc1b1c1747798334fdbb4d24 01-Sep-2016 Justin Klaassen <justinklaassen@google.com> resolve merge conflicts of ab6a8e1 to ub-deskclock-huddle

Change-Id: I88f075b4c6fc95e54a92d11328e4258521c7054e
ab6a8e1f3e21977b0fddfa03ee0ba942830dc00a 29-Aug-2016 Justin Klaassen <justinklaassen@google.com> Cleanup exported APIs

Bug: 30076796

- Removed preliminary support for deeplinks since Clock doesn't have a
public content provider.
- Removed unnecessarily exported intent actions since Intents
specifying explicit components don't need to register specific
actions.
- Removed unused strings and resources.

Change-Id: Ifbee006dbd752ecdcfe0125cabe19ffda40ea659
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
310f96ed002219067d2e652e27d64d256e315832 04-Aug-2016 James Lemieux <jplemieux@google.com> Controller, DataModel and UiDataModel allow context to be replaced

Bug: 29538369

Adjusting the context within those classes connotes that their delegates
should be rebuilt using the new context.

Change-Id: If11e4f8a5e6c4fe870d9eb16c0e3b65ed0a32624
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
ff17acface9b98eba868fff0e2d70ddc85c5e4db 31-Jul-2016 James Lemieux <jplemieux@google.com> Replace DaysOfWeek with Weekdays

Bug: 27915335

Weekdays is designed to be immutable, as are all other data model objects.

Change-Id: I9a12bdb17e439dbe79b735e9ed7e04940ea93048
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
458aa8b4ebb8b7c6fdc0680a1b687ea21a61bf35 28-Jul-2016 James Lemieux <jplemieux@google.com> Create FormattedStringsModel, a delegate of UiDataModel

FormattedStringsModel now builds and caches locale-specific Strings
including numbers and days of the week.

UtilsTest was removed because it does not execute correctly under
robolectric (because of its dependency on ICU).

Change-Id: Ife4611e1e8988c61f5eda88fddec59983f2ab6bc
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
0a3313e231702cc9944e9a17e52aea62eb25afab 12-Jul-2016 Sean Stout <sstout@google.com> Negative time timers expire if you resume them

Bug: 30066072

Though it is still possible for a timer to go negative and not fire,
if the user pauses a negative time timer and then resumes it,
it will immediately fire.

Change-Id: I27945febbbf8ee10ada6e523261738024b7c2e80
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
a10158df7b7e056ec5c63df9cfaacd88d0e79c7f 06-Jul-2016 Sean Stout <sstout@google.com> notifyDataSetChanged called whenever city list changes

Bug: 29899153
Change-Id: I77d52591706da2d4448c75ac9cf4291a06bebba9
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
2a07ae3286fd5c76f71546890e0f02af99065825 03-Jun-2016 Sean Stout <sstout@google.com> Stopwatches and timers continue to work after device reboot.

Bug: 8101723

Upon device shutdown and reboot, the stopwatch will resume state. If
the stopwatch was running, it will continue to run as well as account
for the time that the device was off. Additionally, all timers that
are on the device will resume state. If the timer was running, it will
continue to run on device reboot. If the timer was missed by less than
1 minute, the timer will still go off. If the timer was missed by more
than 1 minute, the timer will go to a new "missed" state and give the
user a notification that a timer has been missed.

Change-Id: Ib7f199ef5be4714b831450933c574f39824d15dc

Stopwatches and timers continue to work after device reboot.

Bug: 8101723

Upon device shutdown and reboot, the stopwatch will resume state. If
the stopwatch was running, it will continue to run as well as account for
the time that the device was off. Additionally, all timers that are on the
device will resume state. If the timer was running, it will continue to run
on device reboot. If the timer was missed by less than 1 minute, the
timer will still go off. If the timer was missed by more than 1 minute, the
timer will go to a new "missed" state and give the user a notification
that a timer has been missed.

Change-Id: I831d7a5172a3cede595db1b62e503ecc8c4c55c2
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
432b07cdbafb9733fea76e9511b6b5f6c15aa8c8 09-May-2016 James Lemieux <jplemieux@google.com> Remove world city widget

Change-Id: I2c2b1a54077a76c7ae0fae04e00a35aa20742266
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
8bf1c3ba34724773b92242effec8330e1852bb7b 06-May-2016 James Lemieux <jplemieux@google.com> Restore world cities list to digital clock widget

Bug: 28638735

Change-Id: Ia7dfe3bc6b64df2db4c2971a5dc9913a31a41b88
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
592c66b3eb497d24d1528fb2597059c6e4ec6620 06-Apr-2016 James Lemieux <jplemieux@google.com> Introduce world city widget

Bug: 27282291
Bug: 27693716
Bug: 24126517

This CL includes:
- full implementation of city widget
- event logging for creation/deletion of widgets
- tapping all widgets now opens the app in the prior state
(not the clock tab)

Change-Id: Ia43ec0ebf2f02aba6b7e277e5feca3e8afa91e64
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
a5c107781dc8f8239bc980d19e1e31ed262e8829 05-Apr-2016 Justin Klaassen <justinklaassen@google.com> Prevent deadlock using DataModel#run(...)

Bug: 26747326
Change-Id: I6861a387da5fa38419ddf06cc68bf9d9df9007e8
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
9caa88cda32a37f0190d5e5b0ec9ff20028dac46 01-Apr-2016 James Lemieux <jplemieux@google.com> Relayout widgets after launcher is rotated

It is quite difficult to detect an orientation change within the widget
providers themselves, so the change is detected by the Application
and the widgets are tickled to be updated.

Other clean-up is also found in this change.

Change-Id: Ia82c7e3b6a35ba54feedca28b340ebda2816276d
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
ae9a055482865a70028fc9940c5d871775f9620c 21-Mar-2016 Justin Klaassen <justinklaassen@google.com> Use Utils#RINGTONE_SILENT constant

Change-Id: I4cb9ca56fb685385c590d510e216a9f2c0cd697e
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
9042b0b548db623f7f465767008a27d305299aa9 18-Feb-2016 James Lemieux <jplemieux@google.com> Introduce StopwatchListener to gracefully handle BOOT_COMPLETE

After a device reboot, there is a window of opportunity (about 15 seconds)
in which the user may open the Clock app and view the stopwatch. They
will see the stopwatch in a non-operational state. When BOOT_COMPLETE
is finally broadcast, the stopwatch is reset and the laps are cleared.

Prior to this change, the stale lap data would continue to be displayed
because no mechanism existed to notify StopwatchFragment of changes
to the stopwatch data by an external entity.

This change introduces StopwatchListener, which is notified of changes to
the stopwatch and its laps. The StopwatchFragment uses this listener to
react to stopwatch changes from external entities, such as the
BOOT_COMPLETE receiver.

Clearing laps is now a byproduct of resetting the stopwatch instead of an
independent update to the model.

Change-Id: Ie1aa3d3e5006d8a28947cb3cd6343175d1c3644c
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
3af168c834d73487f8f614f0aaafbf6f9a850f0f 26-Jan-2016 James Lemieux <jplemieux@google.com> Refactor the mechanism for delivering periodic callbacks

Bug: 25983208
Bug: 26381960

Periodic timed callbacks are used to update portions of the UI that
may change at time boundaries, such as date displays when midnight
passes. The old mechanism required the API user to define their own
Handler and also compute and schedule each callback. Also, no
corrective rescheduling occurred if the device time changed.

The new design introduces PeriodicCallbackModel as a delegate to
UiDataModel. The delegate removes all of the burdens associated
with scheduling and canceling period callbacks. The caller need only
supply the Runnable that contains the logic to execute and an offset
in millis if they want to be called before or after the period ends.

Change-Id: Ibb51b22af081fc4df60ee1c561f2c9aaf1ddef96
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
376b0f51995803a93d7a6907f8ed30aff06e2aae 22-Jan-2016 James Lemieux <jplemieux@google.com> resolve merge conflicts of ac1506f175 to ub-deskclock-escargatoire.

Change-Id: Iac75ebf83671a3f4dd18a926f7f90923e5f4af15
09c1f0e96743fcde110ecd1160ab55cdfaec12c0 20-Jan-2016 Annie Chin <afchin@google.com> Add timer vibrate option.

Bug: 23980150

User can en/disable vibration for all timers from the Settings page.
Vibration is off by default.

Change-Id: I0ae81583c73e54f44fca6262359ed2d46aaba498
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
ac1506f175631e2b2f52ff9142cbdc6c725ef447 21-Jan-2016 James Lemieux <jplemieux@google.com> Rebuild notifications after app upgrade

Bug: 26676584
Change-Id: If6e905328265ad626ad9cc19b0ff6f128bdfe3a4
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
ed1c9b9725e77aef7266f75d87f56cfe6e5d739e 13-Jan-2016 James Lemieux <jplemieux@google.com> Promote TimerService to the foreground while expired timers exist
am: 0dd0cac610

* commit '0dd0cac610cd59762c8b604da6c437b18a29246b':
Promote TimerService to the foreground while expired timers exist
0dd0cac610cd59762c8b604da6c437b18a29246b 09-Jan-2016 James Lemieux <jplemieux@google.com> Promote TimerService to the foreground while expired timers exist

Bug: 26471891

This makes the clock app unlikely to be killed in memory pressure
situations while expired timers are ringing.

Change-Id: I89f141a835e3de67a58671d6c5b381de52be5c18
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
b10e1abe917de457e9cb3be12ffd5d2634d8f79c 30-Nov-2015 James Lemieux <jplemieux@google.com> Refactor DataModel.resetOrDeleteTimer(...)

By adding a return value from this method, callers that want to know
whether the timer was reset or deleted can examine the return value
rather that duplicating the logic found within DataModel.

Change-Id: Id63ea1f56c35b21d5b3d8cd7188d28b87926bb45
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
7a89ca1ba1a006d8de7b340d67f4c25070c355b9 13-Nov-2015 James Lemieux <jplemieux@google.com> Merge "Simplify HandleDeskClockApiCalls, TimerService and StopwatchService" into ub-deskclock-dazzle
am: 8da3608e79

* commit '8da3608e7942518a3c33dc6be26160c02295259c':
Simplify HandleDeskClockApiCalls, TimerService and StopwatchService
437da3b08ce9ce1b32f4e544816cb3431ceb8d4e 13-Nov-2015 James Lemieux <jplemieux@google.com> Simplify HandleDeskClockApiCalls, TimerService and StopwatchService

HandleDeskClockApiCalls used to pass through all timer and stopwatch
mutations to the corresponding Service to complete. This complicated
the logging of the corresponding event unnecessarily.

After this change:

- StopwatchService is only invoked from stopwatch notifications and may
now assume the event label

- TimerService is only invoked from timer notifications and AlarmManager
and may now assume the event label

- HandleDeskClockApiCalls.EXTRA_FROM_NOTIFICATION has been replaced
with HandleDeskClockApiCalls.EXTRA_EVENT_LABEL which explicitly
identifies the label of the event

Change-Id: Ic9796c43e826f82138ee431d3abb02524c0146ba
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
0fc5fcb3d18b2104f783f9a25f35fd31006603df 11-Nov-2015 James Lemieux <jplemieux@google.com> resolve merge conflicts of bca2b6924d to ub-deskclock-escargatoire.

Change-Id: I14346d1532cb65da0c4d35cd9ddde3edcc6570e1
6d603b7c62bb38d763a681a8bf20fadb1442e833 07-Nov-2015 James Lemieux <jplemieux@google.com> Refactor Timers to use new unified DataModel

Bug: 24816218
Bug: 25494722

This refactoring introduces a Timer domain object. Instances of these
domain objects are fetched via a DataModel class that is the single point
of reference for all timer data. This allows the data to be shared across
the entire application. In particular, the timer notifications, TimerFragment
and ExpiredTimersActivity all draw upon the same model to determine
what the state of the timers are.

IMPORTANT: The public intent com.android.deskclock.action.STOP_TIMER
has been renamed to com.android.deskclock.action.PAUSE_TIMER to be
more accurate.

Change-Id: Ib904e80a25c6de1861de2b395bec27db16ff0e66
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
3101fcf76ff5c228d2e643395be03d6cbf97d47e 27-Oct-2015 Dylan Phan <lerp@google.com> Implement custom ringtone picker for timers and alarms.

Bug: 23996371
Change-Id: I6515da60f2811d7fd03b8a41d9bd724dc959fd0f
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
83692ec735d72eb312ad61258a0dd50804b8e7f9 16-Oct-2015 Dylan Phan <lerp@google.com> Make digital widget resizable to 2x1

Bug: 24307555
Change-Id: If217226fd4f71c0c2ceb74732d8885cf4dc26ea6
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
d6c134979a65c717aa5e667c39d9f9a788b32a45 10-Oct-2015 Dylan Phan <lerp@google.com> Dynamically size fonts in the digital widget

Bug: 22690473

Also introduced DataModel.run() for accessing data on the correct thread.

Change-Id: I6c21b9293882e6aa502e6930bd039d342d9cbfd4
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
24a54fc16fdf95ee3f76ab99978c3401473dc516 19-Sep-2015 James Lemieux <jplemieux@google.com> Refactor Stopwatch to use new unified DataModel

This refactoring introduces Stopwatch and Lap domain objects.
Instances of these domain objects are fetched via a DataModel
class that is the single point of reference for all stopwatch data.
This allows the data to be shared across the entire application.
In particular, the stopwatch notification and StopwatchFragment
all draw upon the same model to determine what the state of the
stopwatch is and what laps have been recorded.

Change-Id: I6bda1fda73568cb312b167f1f6b10bd1abc99d62
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
14ca4235805189e33093ff728aa40a538e2e28a6 05-Sep-2015 Fan Zhang <zhfan@google.com> Make dream setting ui fit to system screen.

Bug: 23823337

Translucent window theme made UI overlay with actionbar. Adding
fitsSystemWindows to push down the content and save space for actionbar.

Change-Id: I0a528fdc128469f79ea530933d15a6e71bba8427
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
f8faca1961278db2797d122351885ce6e32e4f3d 01-Sep-2015 James Lemieux <jplemieux@google.com> Simplify code that adds None as a valid timer ringtone

- None option is added to picker by default, remove code that
manually added it
- Replace NO_RINGTONE_URI constant in TimerRingtonePreference
with test method: DataModel.isSilentTimerRingtoneUri(uri)

Bug: 23499698
Change-Id: Id45a24bee607edd8295c2a31785e55d67b44e8b0
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
bd9eae10b13e015d1997d06f13e9abe06a7f306b 21-Aug-2015 James Lemieux <jplemieux@google.com> Present Clock's timer beep as the default ringtone

A "settings" package was introduced as a byproduct of this CL.

When choosing the preferred ringtone for timers, the default
selection should play timer_expired.ogg which ships with the
application. This is the only sound played on all prior version of
the application.

Known Issue: the dialog will label the default as
"Default alarm sound". This will be fixed in a later CL.

Change-Id: I4e9c6663c597038ec273b699cdda3a036b376350
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
6a59a7b2c034557bc8bc7481544db5cd1105a891 20-Aug-2015 James Lemieux <jplemieux@google.com> Alarms created from external intents use default ringtone

Clock recently gained the notion of "application default ringtone"
but this was ignored in favor of "system default alarm ringtone" when
creating alarms from external intents. This behavior was fixed.

A secondary cleanup moved the functionality in
RingtoneDataManager into DataModel.

Bug: 23353723
Change-Id: Id092101dc30ec6c48f59cf4f142778b08a6075de
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
856483e7e18d5f042a338f7b3d472e28a386c4ad 18-Aug-2015 James Lemieux <jplemieux@google.com> remove requests for READ_EXTERNAL_STORAGE permission

Very late in the M release, a change was made to no longer
require the READ_EXTERNAL_STORAGE permission to view
the titles of external ring tones. Consequently, we no longer
have a reason to acquire this permission in the application.

As well, the storage of the ringtone to play for expired timers
has been moved from Utils into the DataModel.

Bug: 22919062
Change-Id: I9209cd3e6efaee1063c1c04bca15b0ea61ffc4d8
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java
34142b1d0f2445bbd606bb490dfef6c078c630ea 14-Aug-2015 James Lemieux <jplemieux@google.com> Refactor Cities (World Clocks) to use new unified DataModel

This refactoring replaces CityObj with City, an immutable description
of a city and its associated clock information. City objects are fetched
via a DataModel class that is the single point of reference for all City
data. This allows the data to be shared across the entire application.
In particular, DigitalWidgetViewsFactory, ClockFragment and
CitySelectionActivity all draw upon the same model to determine what
cities exist, which ones are selected, and what the preferred display
order shall be.

Change-Id: I7c2eaa31b596b5333213415af58a7bb46ebb370e
/packages/apps/DeskClock/src/com/android/deskclock/data/DataModel.java