Commit Graph

35 Commits

Author SHA1 Message Date
Sunny Goyal
249a510ab3 [DO NOT MERGE] Adding minSpanX and minSpanY for all the launcher widgets
Bug: 22353460
Change-Id: Id4450dee42a83e4603dcd56e1c4dec2b0e405858
2015-07-16 19:35:36 -07:00
Robin Lee
2dd9f018ff Don't clobber widgets with the same component - DO NOT MERGE
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
2015-03-19 21:16:34 +00:00
Sunny Goyal
c0ee675f69 Avoiding writing the Metadata in the backup if nothing was changed in the backup
Change-Id: I4608ab5511b01f0d0018596d68e4341635649f73
2015-01-16 14:11:12 -08:00
Sunny Goyal
08f7261d11 Adding a rank column for itemInfo
> Rank is used to determine position of an item
in a folder.

Bug: 18590192
Change-Id: I2826a7c570b4cc58e719d685f17a24ec6133804f
2015-01-13 22:19:56 +00:00
Adam Cohen
30914ad14d Merge "Supporting custom widgets provided by launcher" into ub-now-master 2014-12-06 00:22:43 +00:00
Adam Cohen
5940042d39 Supporting custom widgets provided by launcher
-> This change provides integration for widgets provided by
   the launcher package which can run arbitrary code.

Change-Id: I6052da5c4afed7ee72e3b44d045b9c46f2d84c42
2014-12-05 16:18:41 -08:00
Chris Wren
b02e611d15 Don't try to create an app state instance during restore.
Added a static utility function to get the DeviceProfile instead.

Bug: 18504164
Change-Id: Ia510a84f1c195e58acf3bf4d1f6a42c739fdd413
2014-11-24 16:57:54 -05:00
Sunny Goyal
5fd733dbae Failing restore, if we have an item outside screen bounds
Bug: 17552590
Change-Id: I2d25847fd05d9579bc29ccbfa62e34809d4855d1
2014-10-29 10:52:54 -07:00
Sunny Goyal
33d4438976 Updating backup restore logic
> 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
2014-10-28 09:27:10 -07:00
Sunny Goyal
ef728d4292 Refactoring LauncherBackupHelper.java
> Moving a bunch of variables to Global level to make it easier
to maintain state.

Change-Id: I9ded313bd4f673f45c61556b8c66607dc78a5ae9
2014-10-23 10:46:14 -07:00
Sunny Goyal
42de82ff8d Resetting launcherProvider data if restore set was empty
Bug: 17332300
Change-Id: I6d2187cd1b1fa7a53e49b96eb109263f6b74b258
2014-09-28 17:02:03 -07:00
Sunny Goyal
c5fb59fb9a Fixing loadWorkspace being called multiple times
Using right intent when refreshing shortcut icons

Bug: 17662782
Bug: 17663766
Bug: 17569197
Change-Id: I8d698c5e2145b8412aff9978db4ec930d89f7f24
2014-09-26 01:07:11 +00:00
Sunny Goyal
ffe83f1331 Adding support for managed profiles in widget
issue: 16892811

Change-Id: If8c81f2a5a3bc846b02a5d225c5a8f27b1382dab
2014-08-20 17:09:18 -07:00
Sunny Goyal
0fc1be164e Updating the ui for widget restore flow
> 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
2014-08-12 16:00:03 -07:00
Sunny Goyal
ff57227711 Adding support to restore widgets even for jelly beans.
> 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
2014-08-08 14:29:02 -07:00
Chris Wren
58852b393b Log the component name for restored icons.
Bug: 15192063
Change-Id: I7d8aa05600a2278c18f3ac34f87b87b3867bcd0c
2014-05-23 16:57:51 -04:00
Kenny Guy
f8b1dfd293 Reset profile ids when backing up / restoring favorites.
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
2014-05-13 13:02:21 +01:00
Kenny Guy
43ea7ac8ad Fix missing space in select statement in backup helper.
Also check when backing up favourites that they are
for current user.

Change-Id: Ic9d496c30612ee531fa84a22f852b3012df00b4f
2014-05-09 18:05:29 +01:00
Kenny Guy
ed13187a74 Launcher3 multi-profile support
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
2014-04-30 23:43:00 +01:00
Chris Wren
5160e96698 also backup icon assets for shortcuts.
Bug: 13449249
Change-Id: I8c5a9e907f668e105c2786b80f0c8e62bd5f8344
2014-03-13 11:41:59 -04:00
Chris Wren
7114426665 skip backup if launcher is in a bad state
Bug: 13153542
Change-Id: I4312ebd200e8e652ef841f54301981c2a486b726
2014-02-27 15:49:39 -05:00
Chris Wren
6d0dde01f3 use restored icon for restored app shortcuts
Bug: 10778992
Change-Id: Ie430a6587d49dc0d78b87b81582c0cef7c281017
2014-02-14 11:49:30 -05:00
Mac Duy Hai
22dc65e741 Fix deprecated EMPTY_ARRAY usage (nanoprotos).
Newer nanoproto compiler discourages the use of this.

Change-Id: Ic27a6d15f2892bb49df3100147c086a2bce20fd4
2014-02-05 10:52:07 +00:00
Chris Wren
f4d081107f handle shortcut restore for missing packages
Bug: 10778992
Change-Id: I8766b8d4dd9c0269d52a7ec3da58dd408bc5f09f
2014-01-27 17:30:48 -05:00
Chris Wren
50c8f42568 rationalize launcher backup logging
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
2014-01-15 16:35:33 -05:00
Dan Sandler
44f834133e Merge "restore app favorites and screens" into jb-ub-now-kermit 2014-01-15 14:46:34 +00:00
Chris Wren
65b6a603fa search for a valid journal
there are too many bytes, so we need to find the valid subset,
without stepping past the end!

Bug: 12489602
Change-Id: Ic9d7c804c199740ff50d0864f99632ae68619369
2014-01-14 17:46:27 -05:00
Chris Wren
5dee7aff5f restore app favorites and screens
version 0: restore assuming apps are already installed.

Bug: 10779035
Change-Id: I7f9aa418a7d3d5460a79a229c0fbc80305b5eb5c
2014-01-14 11:23:07 -05:00
Chris Wren
1ae293c647 Merge "backup keys that might have slipped past" into jb-ub-now-kermit 2014-01-14 15:15:04 +00:00
Chris Wren
4b171361ca hide launcher restore behind a flag.
enable with 'adb shell settings put secure launcher_restore_enabled 1'
before signing into wiped device

Bug: 12532845
Change-Id: I1471c39dac2e6e1412f7720b1ba8edf46273c593
2014-01-13 17:52:40 -05:00
Chris Wren
5743aa9a86 backup keys that might have slipped past
seems a little paranoid, but can't hurt.

Bug: 12455866
Change-Id: If9da4cc021ee4fac32c822a91fabda69bf3ff8aa
2014-01-13 08:43:14 -05:00
Chris Wren
33f4c2df28 first backup should save things from the beginning of time
Bug: 12455866
Change-Id: Ie9a97ed4110e7b1ded21f609179b5d6ee7f0ead5
2014-01-09 13:02:20 -05:00
Chris Wren
45297f851a backup launcher preferences
Bug: 11267816
Change-Id: I12a32477164fe2205bc8cb02e0a23c561a7f9189
2013-12-03 23:46:13 -05:00
Chris Wren
4d89e2af11 clean up backup imports
Change-Id: Ic78e071eabb9931b2aaec34b57ab187bf3a1cfd6
2013-10-09 17:03:50 -04:00
Chris Wren
92aa423826 move to backup helper architecture
add journals to DecoderRing, for backup debugging

Bug: 10778984
Change-Id: I38e93853c05f72468b3800c172b96effc70a63e0
2013-10-07 14:43:22 +00:00