Commit Graph

8 Commits

Author SHA1 Message Date
Sunny Goyal
161a214ede Adding support for backing up favorites table
Favorites table is copied as a separate table name during the first grid migration.
On subsequent migrations this backup table is used if it exists, otherwise new
backup is created. The backup table is also removed if there is any insert or
delete operation on the db (outside of the migration operation itself).

Bug: 111850268
Bug: 121048571
Change-Id: I6f02f4a355c369ee99d89430971be258f7516f6e
2019-01-03 10:25:44 -08:00
Sunny Goyal
efb7e84242 Converting long item IDs to int
> Items ids were already being typecasted to int when being bound on the UI
> Using a consistent type allow better use of platform data-structures
> Adding IntArray and IntSet as a replacement for various Collection classes

Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371
2018-10-08 14:52:39 -07:00
Sunny Goyal
f5b4b80972 Fixing widget id restore broadcast.
Ignoring thw broadcast if its not for the main widget host, or if
the Launcher DB is already in use. Launcher already handles missing
widget-Id map broadcast, by binding a new widgetId at runtime.

Bug: 63389280
Change-Id: Iaa9774d6d7adde3711cba9615328020e2b2e66aa
2017-07-12 12:14:29 -07:00
Sunny Goyal
dbfc9014fe Simplifying some DB managed logic
> Adding SQLiteTransaction to make it easier to manage DB transactions
> Using try-with resource for better resource handling
> Defining utility method for iterating over cursor

Change-Id: I20b1a62d61798342825ecfeb971e1a0c63c9b6d7
2017-04-19 13:26:10 -07:00
Hyunyoung Song
3c7d9cbb20 Clean up around 1) Log.VERBOSE and 2) dump
b/31772480

Note: in the follow up CL, I will add the dump result of the bgDataModel
to a proto

Change-Id: I5261cff0fb29cedd1dd772b8b15f67095ad5b967
2017-02-01 15:11:08 -08:00
Sunny Goyal
49f19f0af9 Adding some logging around launcher restore
> Also enabling fileLog when the device is debug build (even when
launcher is not dogfood build)

Bug: 30735662
Change-Id: Ieab2c962d57f6f7f972f8111070d4ecbef06b3e7
2017-01-09 14:27:56 -08:00
Sunny Goyal
b05a00a441 Adding a debug flag to prevent broken downlodas from getting removed during
restore

After setting this flag apps do not need to have an active settion during restore
which would simplyfy debugging backup-restore bugs.

Change-Id: I89f2d3ec677281887f8bab8559ace991709caadc
2016-08-29 11:19:26 -07:00
Sunny Goyal
e8f7d5a67e Executing the DB migration during startup instead of restore.
This allows proper execution of DB.onUpgrade task if the app updates
after the restore

Change-Id: I4c40167b30e1d7040b3a38be70d834f7b215e540
2016-06-08 16:14:59 -07:00