Commit Graph

87 Commits

Author SHA1 Message Date
Sunny Goyal f30e99b2dc am e72f3d53: Fixing wronk rowID check.
* commit 'e72f3d53f8c35b94aece6fafa6fd12cce9d09fe5':
  Fixing wronk rowID check.
2015-03-02 22:43:52 +00:00
Sunny Goyal e72f3d53f8 Fixing wronk rowID check.
Since screenId is changed to primary key, the rowId can now be 0 (earlier
it was auto-increment and never 0)

Bug: 19566734
Change-Id: Icf0e4294a581039101df1ad1756fdb6e581c4cba
2015-03-02 14:26:31 -08:00
Sunny Goyal 633325c4c2 DO NOT MERGE: Setting workspace id as primary key
Bug: 19475231
Change-Id: I0385e97868db73dafe148ce45af7dda4555ee593
2015-02-25 16:56:54 -08:00
Sunny Goyal 14334bda03 Merge "Removing code for the unused 'upgrade path'" into ub-launcher3-master 2015-02-12 18:23:28 +00:00
Sunny Goyal d3f035797e am c87775d8: Fixing rank migration code to handle null values correctly.
* commit 'c87775d8e63c7b5722c23ef95c782f574b847d73':
  Fixing rank migration code to handle null values correctly.
2015-02-11 23:01:53 +00:00
Sunny Goyal 66cfdc2549 Removing code for the unused 'upgrade path'
Change-Id: Ib9eca92284b0eabbe36ffaaf26c62a6ce3cfd3e9
2015-02-11 11:55:36 -08:00
Sunny Goyal c87775d8e6 Fixing rank migration code to handle null values correctly.
Bug: 19297508
Change-Id: I652ef30ab37f5b09204f0388de8e065d64b7724d
2015-02-10 19:53:41 -08:00
Nilesh Agrawal 7034f1467d am a258f812: Modify strict mode thread policy for LauncherProvider.
* commit 'a258f812fac21767d1f2e61ee7a7a58bfe6da582':
  Modify strict mode thread policy for LauncherProvider.
2015-01-26 22:28:49 +00:00
Nilesh Agrawal a258f812fa Modify strict mode thread policy for LauncherProvider.
Allowing thread writes too as SQLiteOpenHelper.getWritableDatabase needs it.

Bug: 19094644
Change-Id: I39fe97a9e7fc07c38a4f8e5c5979196b742e36bf
2015-01-26 14:07:29 -08:00
Nilesh Agrawal d8c2a43efa am fde11852: Add strict mode exception in LauncherProvider.
* commit 'fde11852cf0f91c4500a93dfffb44c1b86991e6e':
  Add strict mode exception in LauncherProvider.
2015-01-21 21:17:07 +00:00
Nilesh Agrawal fde11852cf Add strict mode exception in LauncherProvider.
Content providers are created during process startup (before Application.onCreate),
and we should not be doing expensive stuff in Provider.onCreate

Adding an exception for now as it looks like LauncherProvider initialization is needed
before we can show meaningful UI.

Bug: 19094644
Change-Id: I860c2934c110d3a43f1a3afa00729077dc64796c
2015-01-21 11:50:57 -08:00
Sunny Goyal a2cc624e75 Changing DB upgrade path to use swith case statement.
> This allows to cancel the whole upgrade path if any one step fails
and reset the DB

Change-Id: I645b74af8afcd21dda0d619691a5fb3dbf1a04c0
2015-01-21 11:05:00 -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
Sunny Goyal e87e6abc36 Removing dead code from Launcher provider
> Removing DB upgrade logic for versions before 12. Launcher3
was forked off Launcher2 when DB version was already 12, so, there
can never be a lower version of the DB.
> Removing logic for auto import of launcher2 DB. This flow had
been permanently disabled by a flag, and we show a confirmation
prompt/cling before migration

Change-Id: I2ac2f21fefc41ee247164566a088927263b09459
2015-01-05 12:48:11 -08:00
Sunny Goyal 416541cc0e Adding a few null checks.
1) During migration, if launcher2 has deleted user data,
migration oes not happen
  2) If Launcher3 does not has bind widget permission,
QSB would be null.

Bug: 18388507
Change-Id: Ief81f6f77ce154e7b3ecd4b77caf24239401e738
2014-11-14 12:36:13 -08:00
Sunny Goyal 594d76dc66 Using the default search widget in Launcher3
> Removing all logic related to search and voice overlays
from Launcher3
> Using the widget provided by global search provider on the
homescreen
> Removing VoiceButtonProxy, as it is not being used anymore

Change-Id: Ie8b09b44f7213c8fa11bce685914442e4884295d
2014-11-11 10:17:56 -08: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 9d219685c5 Loading internal default layout if partner layout fails to load
Bug: 18033885
Change-Id: I8399d0107cc3570c0e03d833601abf2cd194b3d3
2014-10-27 16:28:44 -07:00
Adam Cohen a33f11e20a Was seeing some duplicated icons in the migration flow
-> The only delta between the two icons was slightly different flags
-> No need to consider flags for the purposes of duplication

Change-Id: I161f6ad6023d829e5ebbb15f1a9fbc9306795d80
2014-10-24 12:44:20 -07:00
Sunny Goyal 3a5a9d18da Refactoring layout parsing code
Change-Id: Iee5b2280cb1e841bcfe91fdcf523de6fa7f7f3b8
2014-10-17 14:34:49 -07:00
Adam Cohen cee8c66f9a Adding ability to list folder items in separate file
-> remove all apps default layouts

Bug 17569015

Change-Id: I39b899b61d5b1cff2d7801d281dacfc804c403c5
2014-10-17 01:33:55 +00:00
Adam Cohen 951e8812ab am ae5f7ce8: Merge "Fixing typo from previous CL" into ub-now-porkchop
* commit 'ae5f7ce8ed2e385cba8d65a67d9b108c9c3590e8':
  Fixing typo from previous CL
2014-10-14 22:15:32 +00:00
Adam Cohen 4079337ea7 am 755dd702: Merge "Fix missing screen when adding widget directly to provider" into ub-now-porkchop
* commit '755dd70238162d0b631a8a17c42047c61318be30':
  Fix missing screen when adding widget directly to provider
2014-10-14 22:15:32 +00:00
Adam Cohen d61a638e99 Fixing typo from previous CL
Bug 17969770

Change-Id: I4ea04864000d2ed8368ca81ba8cff42b4208d13d
2014-10-14 15:06:54 -07:00
Adam Cohen eb1ac42fd4 Fix missing screen when adding widget directly to provider
bug: 17969770
Change-Id: Icbd8451d8adde0519917a7bf06365517405759fe
2014-10-14 10:36:27 -07:00
Sunny Goyal 2fce90c38a Cleaning up icon resizing code
> For resizing icons, scaling them down instead of cropping them
> Removing duplicate methods and variables

Bug: 17663119
Change-Id: I0f270860c0edaaa939495e63e05da841a603f6e9
2014-10-07 12:04:39 -07:00
Helena Josol 4fbbb3e3e0 Create a central list of files the Launcher writes to the app directory
Replace hardcoded Launcher filenames with the defined constants.

Bug: 12753154
Change-Id: I072f202d9388a703b9e6851bde64ea7fafe4b10a
2014-10-06 17:08:10 +01: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
Adam Cohen 4ae96ce92d Add ability for Partner customization apk to override certain DeviceProfile params
-> Workspace row / col counts
-> All apps row / col counts
-> Workspace icon size

issue 17208277

Change-Id: I25cfafede4da783083593b9bfeff4e5ba7751d36
2014-09-04 15:12:55 +00:00
Jason Monk c3009c06d9 Change URI favorite resolving to use launch intents
Rather than dropping the user in the middle of the app wherever
our intent resolves to, add a shortcut to the launch intent of
the app that handles that intent.

Bug: 16459162
Change-Id: I58256cdc9dc1b3441815f60cc354b60f91fb1a16
2014-08-20 10:00:31 -04:00
Sunny Goyal 0fe505bf82 Autoinstalls loading xml
> Launcher checkes for an apk in the system image with a broadcast
receiver for action:
com.android.launcher3.action.LAUNCHER_CUSTOMIZATION
> Default layout is parsed from that apk, which can also contain
icons and string resources used in the layout config

Change-Id: I44fc9e7c3134f525f7b5db29f4e8bb56e17ce445
2014-08-12 14:13:18 -07:00
Adam Cohen 7ec3bbff8b Fix screen issues with externally added items
-> Ensure that when an item is added to the db from an external
   source that the screen id exists.
-> If the screen id does not exist, add that id as the largest rank

Change-Id: I98d68900c428d80666dab1909418c6d9b0f52e10
(cherry picked from commit 484526620012f88bcd9d5656a71d4218a9acd090)
2014-08-08 04:31:47 +00:00
Adam Cohen 43f3ca0f8c Fix resource issue in folders of partner layouts
-> Resources in folders were not being loaded with the partner
   apk resources. This caused any number of weird things to appear
   in folders of partner default layouts

Change-Id: I7d373e53028c5c327980c15d004993af997de553
2014-07-25 13:38:45 -07:00
Adam Cohen 3ed316a71d Adding broadcast to indicate first launcher load
-> fixing small thing from previous CL

issue 16191557

Change-Id: I015859f6028066e7c8664436f291ed226a539e29
2014-07-23 20:40:09 -07:00
Adam Cohen a043fa8921 When inserting directly into LauncherProvider, ensure item id and widget id are valid
-> We generate an item id, and allocate and bind a widget id if necessary when items
   are added to the LauncherProvider externally. Writing to the provider is protected
   by system|signature.

issue 16191557

Change-Id: I09472e41ad4c8302901a5e49b5817247e9b86695
2014-07-24 00:40:53 +00:00
Adam Cohen 9b8f51fcc8 Adding ability for partners to specify a default layout
Change-Id: Ib071faa4b41d13961c3a33b865b40a644631c08a
2014-06-02 11:06:47 -07:00
Adam Cohen 9b1d062b0f Make sure we can handle database downgrade (by wiping and starting fresh)
issue 15144138

Change-Id: I59aad7445d2aaaaede1cba6754e047f05a2859ae
2014-05-21 19:04:49 -07:00
Winson Chung dbc46f5e05 Merge "Adding support for dynamically resolved default layouts." into ub-now-nova 2014-05-16 19:42:03 +00:00
Winson Chung be87647e2a Adding support for dynamically resolved default layouts.
Change-Id: Id05c60b93423ce37dd06a126ecf33c74a0ba1d62
2014-05-16 12:33:38 -07:00
Adam Cohen 71483f417b Removing antiquated migration path logic
-> also added some extra debugging for issue 14466459

Change-Id: I1ac9352c52c15d3e37f945cffabbca49343d2b8f
2014-05-16 12:26:36 -07: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
Adam Cohen 16f645542a Merge "Second try removing orphaned items from the database" into ub-now-nova 2014-04-23 18:21:15 +00:00
Adam Cohen f9c14de995 Second try removing orphaned items from the database
-> Delete items contained directly on the desktop whose screens
   no longer exist (do not remove items contained in hotseat or
   folders, except as described below)
-> Delete items contained by folder ids which are no longer present
   (ie. orphaned as their parent folder no long exists)

Change-Id: I2f47cc970ce00677cb1c83c0f0a2d13b6f16a33e
2014-04-22 16:11:40 -07:00
Jeff Sharkey 5aeef58131 Add support for partner customization.
Traditionally Launcher workspace customization is offered through
overlays at build time, but we don't have access to partner-specific
customization at build time.  To solve this, this adds a new
"partner-folder" tag which points at an XML resource provided by
an external package.

The external package XML can't depend on the binary XML attributes
defined by Launcher3, so we switch to using manual string-based
attribute lookups.  Partners can also provide extra wallpapers.

When a folder only results in a single item, promote that item into
the folder location instead of deleting completely.

Bug: 13340779
Change-Id: Ide558288bef4113565f288b700d8245055c0fee9
2014-04-22 12:28:51 -07:00
Adam Cohen 76ac344cb6 Merge "Allow the old launcher content URI to be overrided" into ub-now-mister-ugly 2014-04-17 00:53:52 +00:00
Adam Cohen a7946070dc Fix serious data loss issue for folders and hotseat items
Change-Id: I37a5b44c670c2a1f99eb97b77cfdbc78534fdf91

bug 13964735
2014-04-11 01:13:46 +00:00
Adam Cohen 119285e755 Cleanup orphaned workspace items on db upgrade
-> Any workspace item whose screen id is not present in the
   screens table is removed from the database. This is
   intended to restore database consistency.

issue 13741729

Change-Id: I9a04b4165f1d85541025fcf48ddf2ad9e39ae94e
2014-04-02 17:04:41 -07:00
Jason Monk 0bfccebc9b Allow the old launcher content URI to be overrided
Move the URI used to import favorites from launcher2 to be loaded
from a string resource.  This allows it to be overridden.

This will enable permissions fix for GoogleSearch.

Bug: 12058200
Change-Id: I31243fe89f545c9771d5cceffe1c9e7668a42bc5
2014-03-21 15:42:06 -04:00
Anjali Koppal 67e7cae5ad Add LauncherProviderChangeListener
Change-Id: I2333a157c488cd048a860982cc675ed9cec626ae
2014-03-17 15:13:01 -07:00
Jason Monk 9364986c83 Merge "Add support for uri favorites and resolve groups" into ub-now-mister-ugly 2014-03-10 18:29:38 +00:00