Commit Graph

244 Commits

Author SHA1 Message Date
Sunny Goyal
2bba1900e0 Adding temporary logs to capture configuration changes and item deletions
Bug: 72481685
Bug: 73814840
Change-Id: I1e30632647ad08a08d84c49875bc7b6cac3be1fb
2018-02-27 13:20:57 -08:00
Tony Mak
1b6826c53c Deprecate work folder
FIX: 73876183

Change-Id: I9d15df247eed3500c679cba085c680b75581cffb
2018-02-27 17:47:22 +00:00
Sunny Goyal
66f2b35320 Adding a utility class to simplify main process initialization.
Change-Id: I796cf758d2a25cf8fd5f9a9b78a7977fd54ca451
2018-02-13 17:08:09 -08:00
Sunny Goyal
85525173ce Rearranging the code structure to allow replacing state logic.
Change-Id: I6f83d0f77045ba189f02dd465bf70ffc2a239aa1
2017-11-06 14:57:50 -08:00
TreeHugger Robot
8838b8e0e5 Merge "Removing extraction service and palette api dependency" into ub-launcher3-master 2017-10-03 20:56:02 +00:00
Sunny Goyal
fca6bc9dce Adding a utility method to simplify method tracing
Change-Id: I79ef0aa5d65b933f4b7f0520fc8bac26e366da2d
2017-10-02 13:47:42 -07:00
Sunny Goyal
f2dd4216c1 Removing extraction service and palette api dependency
Change-Id: I30ad1a1462a97b6bc03f8e386ae3058c7fe022e5
2017-09-29 10:40:08 -07:00
Android Build Merger (Role)
ea1212a38a [automerger] Demo mode default layout support am: 2782449da6
Change-Id: I0d03e760f97c6f9984ad0bf9e8f9e8c7a8a8b5c7
2017-09-29 15:49:43 +00:00
Adam Cohen
2782449da6 Demo mode default layout support
67062454

Change-Id: Ic060d3d7dba4fffe688dddf7cd04c48e4baaf813
2017-09-29 15:49:34 +00:00
Sunny Goyal
64a75aa305 Adding A feature flag to disable widgets and a corresponding build
target Launcher3Go without widgets support

Bug: 62353159
Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
2017-07-21 14:10:13 -07:00
Jonathan Miranda
36be1d3674 Revert "Update existing Folder items' ranks to match their pre-permutation layouts."
This reverts commit c4b296a50e.

Change-Id: Ieff7873edc3cb300fe454b0ad97d6f0b4f0cb5a9
2017-07-13 18:00:52 +00:00
Jon Miranda
c4b296a50e Update existing Folder items' ranks to match their pre-permutation layouts.
With the new Folder permutation logic, we change the position of the items
when they are added to a Folder. This means that existing Folders will
now appear in a different order than the user arranged them in.

This change makes sure that when a user upgrades, their existing Folders
will appear untouched.

Note: We decided to priotize restoring the original layout of the Folder,
      as opposed to making sure the preview items remain the same. This
      is less destructive of users' data (we're changing the window into
      the Folder, but not the location of items when the Folder is open).

Bug: 63115141
Bug: 35064148

Change-Id: Ib0a28b4b50be089878ffc3e40bced89832e125bc
2017-06-28 19:10:53 -07:00
Sunny Goyal
22ca9ec137 Removing various reflection calls with final APIs
Change-Id: Ibf48d6015d808f86bc79ccf64e3077eb5b6ccaff
2017-05-22 11:00:29 -07:00
Sunny Goyal
05f30889d6 Adding support for DB downgrade
Adding a schema file for handling DB downgrade. This schema file is part of
the backup/restore set, and hence is available on a device with lower app version.

Bug: 37257575
Change-Id: I69c8ef5f28d5209be6e6679412c7459d4eeda5d0
2017-05-09 12:59:04 -07:00
Sunny Goyal
f7d9b70700 Do not delete chost widgets when opening DB.
am: 57266aa2bd

Change-Id: Iab767b7b7c60db60322151cc5c2ab6a65706a553
2017-05-05 19:55:31 +00:00
Sunny Goyal
57266aa2bd Do not delete chost widgets when opening DB.
During restore, the data can be in inconsistant state, as the
system is yet to give us the widget map. Deleting the widget during
open would cause the AppWidgetRestoredReceiver to store the widget id
after it has been deleted.

Bug: 37935101
Bug: 38029633
Change-Id: Id3b8766229718239ae784794e848dcfbc74658ac
2017-05-05 10:55:21 -07:00
Sunny Goyal
9205a3035d Merge "Initializing the Add To Homescreen setting by reading it from market app" into ub-launcher3-dorval
am: f436478b02

Change-Id: I0f322aeb37c7ba35b2d2f97b1802f1c657a790b4
2017-05-03 20:11:57 +00:00
Sunny Goyal
3e443a2457 Initializing the Add To Homescreen setting by reading it from market app
> Also enabling add to home-to-homescreen feature based on install reason

Bug: 36588249
Change-Id: Icfc1edd4c31ed7eb50086f8ffb1a7858a9641b41
2017-05-03 11:24:54 -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
Sunny Goyal
581a69e6d4 Merge "Deleting any ghost widget from system service:" into ub-launcher3-dorval
am: f2d8b65775

Change-Id: I1d9b7a5a532bf504aabac69691e3f83e2f181a04
2017-04-18 22:20:19 +00:00
Sunny Goyal
55fddc825b Deleting any ghost widget from system service:
> A one-time DB update for removing any existing ghost widgets
> Handling widget cleanup when we bulk delete workspace items during loader
> Simplifying external delete

Bug: 35634653
Change-Id: Id0c520f57aee6d75d9c0e7bcd5786a464bf9f39f
2017-04-17 15:28:39 -07:00
Sunny Goyal
0e43493f8f Merge "Separating the DB upgrade into two paths: > schema update: changes in the table schema > data update: backward compatible changes to the data" into ub-launcher3-dorval
am: d31692c0e7

Change-Id: If9b5e413401ac2b969a591acd81c8e6e1c7c2483
2017-04-17 16:46:28 +00:00
Sunny Goyal
3c7d55bdc7 Separating the DB upgrade into two paths:
> schema update: changes in the table schema
> data update: backward compatible changes to the data

Bug: 37257575
Change-Id: I856854ff2bffa2701f903a24fdc3baf6641175fd
2017-04-17 09:36:05 -07:00
Hyunyoung Song
e295acaeb3 Launcher dump proto that will be used for:
$ adb shell dumpsys activity provider com.android.launcher3/com.android.launcher3.LauncherProvider
To see how the proto is filled: go/launcher-proto-dump

b/31772480

Change-Id: I8e0f1e5e38148a3dfeabd2fc057392193b2625dd
(cherry picked from commit 6aa3729e98)
2017-04-04 23:06:30 +00:00
Sunny Goyal
740e90144a Adding support for dynamically change icon shape for AdaptiveIcons
am: ca18746163

Change-Id: Ic4c14ad1760930735a881926aac8b45efe0cdba0
2017-04-04 19:52:22 +00:00
Sunny Goyal
ca18746163 Adding support for dynamically change icon shape for AdaptiveIcons
> This would allow developers to verify their icon designs on different
device configurations
> This settings is only visible when developer settings is enabled

Change-Id: I7e32abfede001c134f23390734dcd39c93b68b9a
2017-04-04 12:33:59 -07:00
Sunny Goyal
d23f37794f Merge "Removing the profile extra from intent and using the profile id from the profile column" into ub-launcher3-dorval
am: 77ff9a4343

Change-Id: Ib0cd8cb8f963b78a9cd53ed896aeb6e4f6163683
2017-03-21 23:21:26 +00:00
Sunny Goyal
24bb66a1c5 Removing the profile extra from intent and using the profile id from the profile column
The intent extra is not always correct as the profile id can change during backup restore.
This allows us to use a consistant behavior everywhere.

Change-Id: I004bd244204ca91758b1d42488e1fc13b0ccb998
2017-03-21 15:14:43 -07:00
Sunny Goyal
3d706ad703 Separating the config and flags in different directories so that
it is easier to override one or the other

Bug: 36001650
Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
2017-03-07 09:30:51 -08:00
Hyunyoung Song
6aa3729e98 Launcher dump proto that will be used for:
$ adb shell dumpsys activity provider com.android.launcher3/com.android.launcher3.LauncherProvider
To see how the proto is filled: go/launcher-proto-dump

b/31772480

Change-Id: I8e0f1e5e38148a3dfeabd2fc057392193b2625dd
2017-03-01 17:21:19 -08:00
Sunny Goyal
e05b08f705 Using transaction when dropping tables, so that the DB never enters
an inconsistant state

Bug: 34720697
Change-Id: I55a26d63be6c06622da6ee3395bf1990f1a58a11
2017-02-23 18:30:56 -08:00
Sunny Goyal
dd96a5e4fd Simplifying Model data load state management
Instead of maintaining 3 different states, each tied to a subset of data,
maintaing a single state that represents all the data. Individual subset
data is invalidated in rare cases and these invalidates are tightly tied
to the UI. This also allows us to add new data to the model, without worring
about classifying the data into a subset.

Bug: 34112546
Change-Id: Id9cb273de35b79e84a2ef8d6556fcf1e72fb4b75
2017-02-22 15:45:14 -08:00
Sunny Goyal
fdbef27759 Initializing LauncherAppState only on the main thread
Bug: 33032833
Change-Id: I7992a5358142dde80aeaf8c6b7a6c7bfef2c8a00
2017-02-13 17:36:18 -08:00
Sunny Goyal
87f784c285 Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context

Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
2017-01-11 12:52:03 -08:00
Sunny Goyal
8ad02b8f3f Removing static access to Context through LauncherAppState
Bug: 33032833
Change-Id: I09baaa6d79187b3096a2ab3a89d7dcaeaf9eee68
2016-12-29 15:12:14 -08:00
Sunny Goyal
a52ecb0390 Removing all compatibility code below Lollipop
Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
2016-12-16 15:05:09 -08:00
Sunny Goyal
7c74e4ae64 No more UserHandleCompat
Bug: 32745285
Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-15 22:06:10 -08:00
Sunny Goyal
72db9afef4 Fixing wrong message sent on app widget host reset
Change-Id: If5842d4ebbf3fa0ef8596f22788f909748f01ac5
2016-11-29 07:26:20 +05:30
Sunny Goyal
2e013ea7f6 Alienating QSB
> Moving all QSB widget handling code in a separate package
> QSB is handled on a separate host, independent of the main
host. This allows us to safely reset either of the two hosts
> Also removing the logic around closeSystemDialog:
   Launcher does not use any panels which need closing
   System sends an onActivityResult(RESULT_CANCELLED), we do
   not need special handling for waitingForResult
> Fixing bug when auto-generated qsb widget id was not being saved

Change-Id: I2d889b7b1c80b14785d14f35624142a4b78452de
2016-10-18 11:44:21 +01:00
Sunny Goyal
8e0e1d7609 Moving come helper methods to corresponding classes
> Moving isPackageEnabled to InstallShortcutReceiver
> Moving the deep shortcut map to the data model
> Removing appInfo.flags. Instead fetching the flags when needed

Change-Id: I654dd8acefa7b7d183b0419afbe112bef001d536
2016-10-10 20:58:56 +00:00
Sunny Goyal
10629b077c Moving some image handling classes to .graphics package
Change-Id: Id6d3d0b9c345a503ff2e09f073eb4b6449e21c7e
2016-09-02 12:34:33 -07:00
Louis Begin
a9c21c624c Improve handling of external deletion in LauncherProvider.delete
When deleting a widget, ensure that we also delete the corresponding
widget from the system server

Bug 30835877

Change-Id: I7d539c2d37ef53086d09ae128f7278941f804aeb
2016-08-16 12:43:05 -07:00
Sunny Goyal
a5c8a9eb66 Adding logic to pull in workspace data from another Launcher3 based
provider. This allows OEMs to keep the user's homescreen intact while
changing the default home app package.

Bug: 28536314
Change-Id: Ibebfd7dd33aa2cbd9ca28d2d611dd0a4a5971444
2016-07-09 16:19:26 -07:00
Sunny Goyal
eb77aaea89 Removing Key-Value pair backup logic as Launcher now uses full-data backup
Change-Id: I3bbaec2b33afe8c1da3ca1468c7c733cc3194604
2016-06-23 16:31:54 -07:00
Sunny Goyal
e26d1008eb Adding some tracing sections around launcher startup
Bug: 29007436
Change-Id: I53afd9130a2dc70a2223f1623e862faf44370f26
2016-06-20 15:56:22 -07:00
Sunny Goyal
a9e2f5abb3 Adding a DB update path to handle the QSB position change
> Renamed the id of 1st screen to 0 and making space for the QSB
by running the grid migration task.
> Added a feature flag to easily disable the QSB-in-workspace behavior

Change-Id: Ie3369f0d4433d916e9d6215d414770d4333f3e26
2016-06-15 10:03:12 -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
Sunny Goyal
da4fe1a624 Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).

Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
2016-05-27 18:23:29 -07:00
Sunny Goyal
ded0fdba52 Removing logic for workspace migration from Launcher2
Change-Id: I8a121d74862f665c58406f8d5c7eb1263e7ccff3
2016-05-23 16:00:09 -07:00
Sunny Goyal
f48e59268b Making the 'Allow rotation' setting dependent on system state
The setting will not be available on a tablet, where rotation is
always enabled. On mobiles, it will be disabled when auto-rotate
is disabled in display settings.
Also removing content provider dependency from settings, as its in the
same process as launcher.

Bug: 28704055
Change-Id: Ibe6b1e67411fb0e4b2e36446710f463e4a3d6883
2016-05-16 12:07:41 -07:00