summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherBackupHelper.java
Commit message (Collapse)AuthorAgeFilesLines
* Disabling home screen migration logicSunny Goyal2015-08-111-1/+3
| | | | Change-Id: I506948852945bfb8ebd7a95fc951880ffe9a3e17
* Homescreen migration from a larger grid to a smaller grid.Sunny Goyal2015-07-311-15/+39
| | | | | | | | | | | | Adding support for restoring from a larger device, if the grid size difference is not more that 1. During restore add all the items in the DB, and run a one-time migration the next time launcher starts. The migration strategy is defined in ShrinkWorkspaceTask.java which involves resizing, moving and removing some items. Change-Id: I6ee411f6db5bf0152b527e16146a88c56dec2d97
* Adding rank column in backupSunny Goyal2015-07-221-3/+12
| | | | | | | | | > targetType was only added for M builds, so it can also be considered as v4 change. V3 which introduced minSpanX and minSpanY didn't contain targetType Bug: 22417713 Change-Id: I5c353674f7e0c2b5b4ab46e574fdb347d82028cd
* Merge "Shifting hotseat icons to aling with all-apps icon, if the hotseat ↵Sunny Goyal2015-07-211-2/+16
|\ | | | | | | size is different from the source device" into ub-launcher3-burnaby
| * Shifting hotseat icons to aling with all-apps icon, if the hotseatSunny Goyal2015-07-201-2/+16
| | | | | | | | | | | | | | size is different from the source device Bug: 19074056 Change-Id: I8d8517971a3cde0dc38f653d151daeba90fa38a0
* | Resizing the bitmap before caching it in the DBSunny Goyal2015-07-201-4/+5
|/ | | | | | | | | > The icon size in the backup can be different that what is required by the device. We should resize the icon, before caching it. Bug: 22413328 Change-Id: Id77c53edf8ea5e95a2d32dbe22be553120279ebd
* Adding minSpanX and minSpanY for all the launcher widgetsSunny Goyal2015-07-171-7/+19
| | | | | Bug: 22353460 Change-Id: Id4450dee42a83e4603dcd56e1c4dec2b0e405858
* Fixing backup restoreSunny Goyal2015-06-251-22/+25
| | | | | | | | | | | | | | | > Not deleting icons from cache, which have not been restored yet > Not checking if activity exists during DB migration. Missing components are removed during loader anyway > Backing up and restoring bitmaps even when iconType is resource. This allows us to show a proper bitmap icon, until the correct resource is available. > Loading proper shortcutResource icon for promiseIcons > Checking against promise intent when verifying duplicates > A launcher App intent can contain EXTRA_PROFILE Bug: 22094970 Change-Id: I982971338846733833ec133119393af0bea0eb08
* Fixing crash in restoreSunny Goyal2015-06-051-41/+20
| | | | | | | | > LauncherAppState cannot be initialized during restore, as it is not called from a looper thread. Bug: 21275736 Change-Id: Ifdb3f9913fa2ee63a7e1566d0c5cfc6f72b4f41e
* Removing some synthetic method creationSunny Goyal2015-06-021-5/+5
| | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Refactoring DeviceProfileAdam Cohen2015-05-211-64/+40
| | | | | | | | | | | | | | | | | | | | -> Pulling out the parts of device profile which can (and need to be) initialized and accessed without access to an Activity context, ie. the invariant bits. -> The invariant bits are stored in InvariantDeviceProfile which is initialized statically from LauncherAppState. -> The DeviceProfile contains the Activity context-dependent bits, and we will create one of these for each Activity instance, and this instance is accessed through the Launcher activity. -> It's possible that we can continue to refactor this such that all appropriate dimensions can be computed without an Activity context (by only specifying orientation). This would be an extension of this CL and allow us to know exactly how launcher will look in both orientations from any context. Sets the stage for some improvements around b/19514688 Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
* Using utility method for serializing bitmapSunny Goyal2015-04-281-19/+5
| | | | Change-Id: I066f40cf867326b0a116351f00b19350b4c26912
* Removing ContentObserver from LauncherModel, and calling reloadSunny Goyal2015-04-011-1/+1
| | | | | | whereever necessary Change-Id: Ia4a8abdfe2be9703f3217a60527d3a1220b33bdc
* Rewrite: Widget preview loader logicSunny Goyal2015-03-201-8/+6
| | | | | | | | | > Widget previews are saved in data dir instead of cache dir > Expiring widget previews similar to IconCache > Removed support for setting thread priorities Bug: 19865031 Change-Id: Ib6033c2b1ff8ae61bba8762ca994ccd8217d3c75
* Don't clobber widgets with the same component.Robin Lee2015-03-191-3/+6
| | | | | | | | | By not storing them in a HashMap keyed against ComponentName (which is almost guaranteed to conflict with other widgets when managed profiles are in play). Bug: 19444068 Change-Id: I6ffce78e8aaf265196239670404cbdaff9fa09be
* Cleaning up widget preview loaderSunny Goyal2015-03-181-3/+3
| | | | | | | > Removing unnecessary canvas cache > Removing unnecessary new bitmap creation Change-Id: Ic9f45c5a204ea4d32dbf93c21a6a7fd6baea4b51
* Updating IconCache to maintain a persistent of iconsSunny Goyal2015-02-261-6/+19
| | | | | | | | | | > IconDB maintains a DB of icons keyed on ComponentName + User > During loader, icons & labels are loaded first from the DB, and if the entry doesn't exist, loaded using packageManager > After the loader completes, IconDB updates any entry which might have changed, while the launcher was dead. Change-Id: I7a6021cb6d1ca1e66fa5a0bdd21e1543e0cf66fc
* Replacing hotseat icon to an appropriate system appSunny Goyal2015-01-221-5/+112
| | | | | | | | | | | > During backupi, store the hotseat target app type, based on some predefined common system apps > During restore, save this app type in the restore flag, if it is a hotseat app > During first launcher load, if an app is not being restored, try to replace it with an appropriate replacement for that type, otherwise delete it. Bug: 18764649 Change-Id: Ic49e40bd707bd8d7de18bbab8b1e58a0a36426a2
* Avoiding writing the Metadata in the backup if nothing was changed in the backupSunny Goyal2015-01-161-8/+24
| | | | Change-Id: I4608ab5511b01f0d0018596d68e4341635649f73
* Adding a rank column for itemInfoSunny Goyal2015-01-131-2/+2
| | | | | | | | > Rank is used to determine position of an item in a folder. Bug: 18590192 Change-Id: I2826a7c570b4cc58e719d685f17a24ec6133804f
* Merge "Supporting custom widgets provided by launcher" into ub-now-masterAdam Cohen2014-12-061-14/+2
|\
| * Supporting custom widgets provided by launcherAdam Cohen2014-12-051-14/+2
| | | | | | | | | | | | | | -> This change provides integration for widgets provided by the launcher package which can run arbitrary code. Change-Id: I6052da5c4afed7ee72e3b44d045b9c46f2d84c42
* | Don't try to create an app state instance during restore.Chris Wren2014-11-241-10/+3
|/ | | | | | | Added a static utility function to get the DeviceProfile instead. Bug: 18504164 Change-Id: Ia510a84f1c195e58acf3bf4d1f6a42c739fdd413
* Failing restore, if we have an item outside screen boundsSunny Goyal2014-10-291-15/+62
| | | | | Bug: 17552590 Change-Id: I2d25847fd05d9579bc29ccbfa62e34809d4855d1
* Updating backup restore logicSunny Goyal2014-10-281-11/+77
| | | | | | | | | | | | | | | > Adding DeviceProfile information in the backup > Removing SharedPreference backup > Adding helper methods to abort backup in the middle > Comparing keys against the backup journal during restore to avoid restoring corrupt/lost entries > Old backups are still compatible, but lost keys verification will be ignored in that case. Bug: 17937935 Bug: 17951775 Bug: 17260941 Change-Id: Iad48646cfdd69abaff5c163b2055f3b8a9b39b19
* Refactoring LauncherBackupHelper.javaSunny Goyal2014-10-231-390/+222
| | | | | | | > Moving a bunch of variables to Global level to make it easier to maintain state. Change-Id: I9ded313bd4f673f45c61556b8c66607dc78a5ae9
* Resetting launcherProvider data if restore set was emptySunny Goyal2014-09-281-4/+2
| | | | | Bug: 17332300 Change-Id: I6d2187cd1b1fa7a53e49b96eb109263f6b74b258
* Fixing loadWorkspace being called multiple timesSunny Goyal2014-09-261-1/+1
| | | | | | | | Using right intent when refreshing shortcut icons Bug: 17662782 Bug: 17663766 Bug: 17569197 Change-Id: I8d698c5e2145b8412aff9978db4ec930d89f7f24
* Adding support for managed profiles in widgetSunny Goyal2014-08-201-26/+21
| | | | | | issue: 16892811 Change-Id: If8c81f2a5a3bc846b02a5d225c5a8f27b1382dab
* Updating the ui for widget restore flowSunny Goyal2014-08-121-0/+3
| | | | | | | | | | | | | | > Pending widget show a PreloadIconDrawable to indicate installation progress > Only the concerned widgets are reinflated on package install and not the whole workspace. > Adding support for storing default package icon in IconCache issue: 10779035 issue: 16737660 Change-Id: Id787ae4a5ef72d6e01aeb5a1bae5ab8840037679
* Adding support to restore widgets even for jelly beans.Sunny Goyal2014-08-081-8/+13
| | | | | | | | | | | | | | | > Show 'widget-not-ready' until the widget app is installed > Once the app is installed, bind a new widget id (not required on L if id-remap was received). **Remove the widget if bind failed > If the widget has no configuration screen, show the widget, otherwise show 'setup-widget'. > Clicking 'setup-widget' shows the config screen, and updates the widget on RESULT_OK. issue: 10779035 Change-Id: I2f8b06d09dd6acbc498cdd93edc59c26e5ce17af
* Log the component name for restored icons.Chris Wren2014-05-231-0/+1
| | | | | Bug: 15192063 Change-Id: I7d8aa05600a2278c18f3ac34f87b87b3867bcd0c
* Reset profile ids when backing up / restoring favorites.Kenny Guy2014-05-131-3/+14
| | | | | | | | Clear the profile id when packing an intent for backup. Set the profile id to the current user when restoring a favorite from a backup. Change-Id: I9d976fbe16773b34a74e57d080ff797ba51f9b04
* Fix missing space in select statement in backup helper.Kenny Guy2014-05-091-10/+23
| | | | | | | Also check when backing up favourites that they are for current user. Change-Id: Ic9d496c30612ee531fa84a22f852b3012df00b4f
* Launcher3 multi-profile supportKenny Guy2014-04-301-4/+11
| | | | | | | | | | | | | | | | | | | | | Use LauncherApps API and badging APIs instead of PackageManager. With compatability layer that uses PackageManager pre L. Adds support to show apps from current user and any managed profiles. Background: Managed profiles are user sandboxes that are visible from the primary user and can be launched as if they are a part of this user. A launcher should now be capable of listing apps from this user as well as related profiles of this user. Launching of activities is now via the LauncherApps interface, to allow for cross-profile app launching. Only activities with category LAUNCHER can be added as a shortcut on the workspace for a managed profile. Widgets and non-application shortcuts are only supported for the current profile. Widgets from the managed profile are not available. Change-Id: I5f396b1bf7f91ad91a5710ea4a0fd14573972eb9
* also backup icon assets for shortcuts.Chris Wren2014-03-131-1/+2
| | | | | Bug: 13449249 Change-Id: I8c5a9e907f668e105c2786b80f0c8e62bd5f8344
* skip backup if launcher is in a bad stateChris Wren2014-02-271-10/+32
| | | | | Bug: 13153542 Change-Id: I4312ebd200e8e652ef841f54301981c2a486b726
* use restored icon for restored app shortcutsChris Wren2014-02-141-20/+45
| | | | | Bug: 10778992 Change-Id: Ie430a6587d49dc0d78b87b81582c0cef7c281017
* Fix deprecated EMPTY_ARRAY usage (nanoprotos).Mac Duy Hai2014-02-051-2/+2
| | | | | | Newer nanoproto compiler discourages the use of this. Change-Id: Ic27a6d15f2892bb49df3100147c086a2bce20fd4
* handle shortcut restore for missing packagesChris Wren2014-01-271-0/+4
| | | | | Bug: 10778992 Change-Id: I8766b8d4dd9c0269d52a7ec3da58dd408bc5f09f
* rationalize launcher backup loggingChris Wren2014-01-151-42/+49
| | | | | | | | | enough data to debug dogfood issues easy switch to move to quieter production mode common switch across all three classes Bug: 12545310 Change-Id: Icb4ad7174f20884c6993140149db590d66f6e006
* Merge "restore app favorites and screens" into jb-ub-now-kermitDan Sandler2014-01-151-8/+77
|\
| * restore app favorites and screensChris Wren2014-01-141-8/+77
| | | | | | | | | | | | | | version 0: restore assuming apps are already installed. Bug: 10779035 Change-Id: I7f9aa418a7d3d5460a79a229c0fbc80305b5eb5c
* | search for a valid journalChris Wren2014-01-141-19/+33
|/ | | | | | | | there are too many bytes, so we need to find the valid subset, without stepping past the end! Bug: 12489602 Change-Id: Ic9d7c804c199740ff50d0864f99632ae68619369
* Merge "backup keys that might have slipped past" into jb-ub-now-kermitChris Wren2014-01-141-4/+6
|\
| * backup keys that might have slipped pastChris Wren2014-01-131-4/+6
| | | | | | | | | | | | | | seems a little paranoid, but can't hurt. Bug: 12455866 Change-Id: If9da4cc021ee4fac32c822a91fabda69bf3ff8aa
* | hide launcher restore behind a flag.Chris Wren2014-01-131-1/+4
|/ | | | | | | | enable with 'adb shell settings put secure launcher_restore_enabled 1' before signing into wiped device Bug: 12532845 Change-Id: I1471c39dac2e6e1412f7720b1ba8edf46273c593
* first backup should save things from the beginning of timeChris Wren2014-01-091-2/+2
| | | | | Bug: 12455866 Change-Id: Ie9a97ed4110e7b1ded21f609179b5d6ee7f0ead5
* backup launcher preferencesChris Wren2013-12-031-0/+2
| | | | | Bug: 11267816 Change-Id: I12a32477164fe2205bc8cb02e0a23c561a7f9189
* clean up backup importsChris Wren2013-10-091-2/+1
| | | | Change-Id: Ic78e071eabb9931b2aaec34b57ab187bf3a1cfd6