Commit Graph

17 Commits

Author SHA1 Message Date
Pinyao Ting
fb9b779e9d log number of items deleted even when no item was deleted at all
Bug: 137678815
Change-Id: I1cf23921f863a17433ba803158e489b54c1aa35d
2020-01-06 14:10:35 -08:00
Pinyao Ting
3c79804f28 include error log to determine root cause of sql statement failure when
restoring work profile

Bug: 147114476
Change-Id: I25e57413faa569a30e27a0cde1fc47233ff8b603
2020-01-06 11:21:41 -08:00
Sunny Goyal
71834aa186 Merge "Fix bug where we incorrectly change the default profile id of the database." into ub-launcher3-qt-qpr1-dev
am: a42681f6d2

Change-Id: I05ca0e24324272e06087221fbbb50a6dbef7ed4f
2019-09-03 11:17:14 -07:00
Jon Miranda
768cb139cc Fix bug where we incorrectly change the default profile id of the database.
Change-Id: I0fafc06f5e28c1fdff77003c984e686719a60cd2
2019-08-30 16:11:00 +00:00
Sunny Goyal
9dbb27c09c Moving some utilities methods to separate class
Change-Id: I5094b22ddc77c45590cea1a5f5dead0dc7580abf
2019-07-17 15:15:07 -07:00
Jon Miranda
c7206caf6e Ensure app widget ids are restored after database is sanitized.
Previously, it was possible for AppWidgetsRestoredReceiver to
start the restore process before work profile has finished restoring which
resulted in the work profile items being removed from the workspace.

Bug: 131315856
Change-Id: I2f295a1ca91f1996522bcc8052aa139979526e3b
2019-05-14 17:30:04 +00:00
Jon Miranda
df94de9343 Fix SDK check to use Utilities.ATLEAST_Q.
Bug: 131315856
Change-Id: Ie1d00d85dd01da7e57f28e16f51a49962d734927
2019-05-08 10:05:57 -07:00
Sunny Goyal
9589916418 ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-04-16 00:08:24 -07:00
Jon Miranda
2bc6b934ac Add launcher support for restoring work profile items onto workspace.
Bug: 111301511
Change-Id: I40decf4c763401c97afcc2bfa7954a1f3a03f536
2019-03-07 18:55:16 -08:00
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