Commit Graph

43 Commits

Author SHA1 Message Date
Schneider Victor-tulias
229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias
84269d349d Add UI updates for incremental app installs.
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Bug: 171008815

Test: manual

Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2021-01-05 15:17:26 -05:00
Sunny Goyal
cfcefb0c47 Synchronizing model data access
Test: Presubmit
Bug: 173328873
Change-Id: Ifc1724e17ebfa2ee5f21bb3f272986b8a14fdbc1
2020-12-10 16:24:19 -08:00
TreeHugger Robot
3cc22175e9 Merge "Moving hotseat predictions to ModelDelegate" into ub-launcher3-master 2020-08-24 18:42:01 +00:00
Sunny Goyal
104c9d1206 Using persisted item storage for install queue.
Shared prefs are loaded during startup and should avoid large objects

Change-Id: Ibb5c8307dbccb9414b42454825e6c3c2a972efa6
2020-08-19 17:38:58 -07:00
Sunny Goyal
0fc3d1275a Moving hotseat predictions to ModelDelegate
Bug: 160748731

Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-17 08:43:07 -07:00
Sunny Goyal
60e68c91e9 Removing static state management from the install shortcut queue
Change-Id: I0b74a843b2081ee314e0840d5ea8ab8ddabde32b
2020-08-12 14:37:15 -07:00
Sunny Goyal
762d06136c Caching last predictions and loading it with model
Adding support for persisting itemInfos on disk. This uses
a separate xml file. Unlike prefs, it does not keep the items
in memory and is just a wraper over reading/writing a file.

Bug: 160748731
Change-Id: Iaccab9928ab8f30127fb3c2d630ca8ca83f0bd05
2020-08-11 13:23:29 -07:00
Sunny Goyal
cded4dd923 Create a copy of the original list instead of a new view
unmodifiableList is backed up by the original list and is not suitable
to passing to different thead.

Bug: 162518472
Change-Id: I71774ced89d64acc7176269e107cfcf47627f7c4
2020-07-30 12:27:21 -07:00
Sunny Goyal
8b74cc761b Moving all-apps predictions to Launcher model
Predictions are loaded and managed by Launcher model and follow
the model lifecycle. They are then bound to the callback which
handles the UI

Bug: 160748731
Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
2020-07-29 13:07:52 -07:00
Sunny Goyal
28f5075eb0 Adding support for storing container based item list in the model
These items get updated automatically during various model tasks.
Also simplifying the pinned shortcut state, by calculating the
list of ppined shortcut on demand, instead of storing a refCount.

Bug: 160748731
Change-Id: I3169d293552b05b4f4d6c529397fbc761887a282
2020-07-23 15:27:50 -07:00
Sunny Goyal
ea600c70fd Creating a common method to iterate over all model items.
This would allow adding different source for model items without
modifying every model task

Bug: 160748731
Change-Id: I5a14dd761e2b8696c58dc8fec7b14077da0aced3
2020-07-10 09:56:15 -07:00
Sunny Goyal
28daf4a76f Removing multiple system RPCs to packageMAnager and userManager from UI thread
Bug: 158427348
Change-Id: Ibb1837fe932000b69cf5683bb01727fc32abca91
2020-06-08 17:56:36 -07:00
Samuel Fufa
385e93249e Improve Hybird hotseat cache support
Loads list of cached apps and shows predicted app icons with the rest of workspace items.

-> Extracted prediction caching logic into a model layer

Bug: 155029837
Test: Manual

Change-Id: I6981594a910f5fe4e8e8cf8fe39db0cb856e7acd
2020-05-06 14:14:08 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
TreeHugger Robot
103dfd8816 Merge "Remove workspace layout logging that used dumpsys" into ub-launcher3-master 2020-03-30 15:33:19 +00:00
Hyunyoung Song
d1efd4ed21 Remove workspace layout logging that used dumpsys
Bug: 144953948
More context: in next CL, migration will happen to StatsLog

Change-Id: If8ace91ceff6daf1a0af5963b538d7e14401e497
2020-03-29 21:03:38 -07:00
Pinyao Ting
d25023b05e Parse share-targets defined by non-main activities
Some system apps do not have any launcher icons but want to publish
sharing shortcuts. As a fix, all activities are parsed for their XML
resource, which implies some of these shortcut may not hold an
activity. This CL removes that assumption from launcher side.

Bug: 136353429
Test: Manual test
Change-Id: I2994da17fe078b2fab61a614c1326fddd5fd8571
2020-03-23 17:49:34 +00:00
Zak Cohen
3eeb41de9a Rename flag IS_DOGFOOD to IS_STUDIO.
The flag is only set when building from Android Studio... and is never
used for dogfood.

Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
2020-02-14 14:19:59 -08:00
Sunny Goyal
a7a5bf3101 Adding support for multiple Model clients
Bug: 137568159
Change-Id: Ia4db800b19cc80c695fcb9ea28e07709dfd08c6a
2020-01-10 12:23:27 -08:00
Sunny Goyal
fa39536570 Removing static reference of deep shortcut manager
Bug: 141376165
Change-Id: Ie60b82be63a8926825598c681d8b2a1b2ace6413
2020-01-02 20:13:12 +00:00
Sunny Goyal
87dcde6d6c Separating apps list callback from model callback and simplifying various events
Bug: 137568159
Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
2019-07-25 11:29:16 -07:00
Sunny Goyal
6bbf6004f8 Removing ShortcutInfoCompat and directly using ShortcutInfo
Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
2019-04-22 15:39:40 -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
7143ba6fec Make QSB_ON_FIRST_SCREEN a boolean.
Bug: 118140522
Change-Id: Ic8e47e71f538b0b0caff6f630566665d05a65522
2019-03-15 09:11:54 -07:00
Sunny Goyal
c3f4dc6c6a Fixing workspace screens not including page 0
Instead of maintaining a workspace screen array, calculating it from
the current set of items as needed.

Bug: 122262946
Bug: 119500058
Change-Id: I85bb0e55a4442ab9bcac390a601da0cb2583c26a
2019-01-07 12:14:06 -08:00
Zak Cohen
658c67a609 Deepshortcuts - only keep the per package shortcut count in memory.
Change to only keep the per Activity shortcut count in memory, not
the list of ids.
The full shortcuts are loaded at long press time so saves memory.

Bug:117239104
Test:Manual and ran instrumentation tests
Change-Id: Iee974ecba2c977216be4f078396ceed22b931f5d
2018-10-22 11:38:09 -07: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
605bcf3367 Fixing bug when model was not reflected properly on the UI.
If launcher submits a job, and then reloads before the job is executed, the correct model
is not reflected on the Launcher. In that case, we simply rebind the launcher

Change-Id: I380242a4de13e7b2bc326d1a076f0a974435999c
2018-03-05 17:38:47 -08:00
Hyunyoung Song
8fe56a6a7d dump method should accept --proto and --debug flag regardless of the order
Bug:69006241

Change-Id: Idca9c65fbd1842c6bee7999ee9921cf4806c4328
2017-11-16 16:07:14 -08:00
Rajeev Kumar
443bfc8600 1. Get rid of few unnecessary boxing in BgDataModel class.
2. Get rid of an unnecessary return statment from BgDataModel class.

Change-Id: I7be47a75d3754bc621cff4af59d5b03cc3e53f10
2017-06-15 13:18:51 -07:00
Sunny Goyal
c6e97692e4 Moving LoaderTask static
Will move it to a separate file in a followup cl.
This simplifies dependencies between LauncherModel and LoaderTask which
and making it easier to start the loader before Launcher activity is
created (as the Callbacks in LauncherModel can change while loader is running).

Bug: 34112546
Bug: 37616877
Change-Id: Ie9619c6b0de0e3eb60657c04ae1b58d946c829e9
2017-06-02 14:27:29 -07:00
Mario Bertschler
c06af333cb Minor Refactoring only: no functional change
- organizing imports
- remove redundant modifiers on LauncherCallback interface
- fix typos

Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
2017-03-28 12:23:22 -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
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
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
3fe4a146cf Simplifying IconCache access code
Providing a way to access icon cache without LauncherAcitivtiyInfo.
This allows fetching LauncherActivityInfo only when required, thus
avoiding system RPC when the icon is already in cache.

Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
2017-01-03 15:58:53 -08:00
Sunny Goyal
7c74e4ae64 No more UserHandleCompat
Bug: 32745285
Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-15 22:06:10 -08:00
Sunny Goyal
f75baa9f40 Adding support for deep shortcuts in Install queue
Bug: 32904959
Change-Id: Ida43bcf78da716defdf95eb704c31973bc390ea1
2016-12-03 15:55:13 +05:30
Sunny Goyal
dde4fd971e Changing DeepShortcutManager to have a singleton contructor instead
of getting it from LauncherAppState

This follows the design of other managers and makes it easier to access it
from other processes and non-ui thread.

Bug: 33032833
Change-Id: I8ad82ae5b6cc47bae885f9896985675c7dd0d5b8
2016-11-21 22:28:23 +05:30
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
e9956a76c9 Separating all the static data in a separate class, BgDataModel.
This will allow moving all the Tasks defined in LauncherModel as
separate intependent classes

Change-Id: I0b2f82b90dc22590eb1cc360a5690e2e7f857b5c
2016-09-09 13:32:32 -07:00