This was the first attempt at implementing grid-based Recents.
The new implementation doesn't use a separate activity and reuses a lot
more code.
Bug: 32101881
Test: Checked Recents behavior on local sw600dp device
Change-Id: Ic3535fc49f3f5448d6002d354678b633f122f57d
This is a simple first version in the spirit of small, incremental CLs.
It is fully functional but the following will come in later changes:
* Split screen support
* Potential animations
* Alt-tab behavior
* Relayout on orientation changes
The new activity is only started when a specific system property is set.
Test: Tested new activity behavior on local Ryu. Added tests for layout logic.
Bug: 32101881
Merged-In: I550f6e7ea0de3937dbf80e5f0294676cfe567d47
Change-Id: I46a537646e98b312d831510e1d331948888ae5ce
- This CL does two things, firstly, it ensures that all first & last
active times are monotonically increasing and independent of the
current system time. This allows us to better keep track of which
tasks are historical and should be hidden, and which are not.
Secondly, this CL moves the tracking of the last visible active time
into the system (per user) where it can be adjusted along with the
task active times when they are loaded.
- Following this CL, all active times in the future will be adjusted on
boot such that old tasks are made relative to the current boot time.
It’s not important exactly what time they are, only that they are
adjusted along with the last visible task active time so that we
always keep track of what is visible.
Bug: 28908500
Change-Id: I4f789df3a6bd825517cf3a70e26fb60deff89d06
Evidently some apps redirect/obscure tiles in a way that makes
creating a ComponentName from the TileService useless. Instead
generate a token which will be a much more stable way of identifying
tiles henceforth.
Change-Id: Id68550bcdcdc3e3987f09380f258610e7a5aca85
Fixes: 29121793
Since the mode of a tile service was set in onTileAdded, it couldn't
be controlled by developers if they updated their tile. To handle
the mode has been moved to a boolean meta-data flag to indicate
a tile should be an active tile.
Bug: 28043969
Change-Id: I6403d34f8cb70809edc07769389d5a1f835c1ab3
Do this by making SignalCallbacks send out initial state immediately
rather than posting this state. This requires a little refactoring
to how SignalControllers work.
Bug: 27061469
Change-Id: Iba6b91a4a5d1d13cce0f0d308b6f85f0340bff39
Moves the protos and event log tags into a library,
so the build system doesn't think they're duplicates.
Bug: 27151225
Change-Id: Ic96b6b811d4813a4c48940081ea77b12fb23f0bc
- Add startActivityAndCollapse, to make collapsing the shade easy
- Add isSecure()
- Add isLocked()
- Add unlockandRun(Runnable)
- Add unavailable, active, and inactive states
The states are added to allow consistent UI across OEM devices, by
allowing UI tweaking and tinting to match system tiles with custom
ones.
The combination of isSecure() and isLocked() and unlockAndRun(Runnable)
allows all combinations of launching show when lockend and triggering
an unlock when needed for sensitive tiles.
Change-Id: Iade98ad9f2c22aa174e62090d8ccd44c86f3bb3c
Allow system apps that have a Quick Settings tile to show a
status bar icon. If the quick settings tile is removed, the
status bar icon will no longer be shown.
Change-Id: I875b962bbdf4ff863012de688a3dd29a8d7e11ab
Allow tiles to request when they are bound instead of doing it
automatically for them when in the listening state. Only one
of these modes is allowed for a given tile, meaning it can either
push updates when it thinks they matter, or it can be told when
to update.
Change-Id: I165b39dddb836df90d253aeb5ebea48e62ea0dae
Better wrapper around the service that will handle rebinding
when it dies, binding when it becomes available, and forwarding
along all messages to the service once it binds.
Also better handling of too many services at a time. Will only
ever bind to at most 3 tiles and will manage which ones are most
important to show based on pending clicks, last update, etc.
Change-Id: I5f4da0bc751f7eb25baa32e5c0bb9f1bc418f5bb
- Initial changes to show a history view within Overview (behind tuner
flag)
- Restoring the task view dim in the stack
Change-Id: I0503d11768736c86f3145942404391dfacd0ddd6
- Removing old broadcasts in favor of direct aidl interface between
system and secondary users. Also moving user specific implementation
into RecentsImpl, allowing Recents to handle proxying between users.
Change-Id: I4bd5ef1d1ee47309b7c754f50a5e8b2e2aab988f
Derive the app labels in a right way.
Not forgetting to get accessibility labels for newly dragged-in apps.
The change adds inefficiency with apps getting repeatedly resolved several times,
which is OK for a prototype, but I have plans to optimize this.
Bug: 20024603
Change-Id: I755d38de34c016d0ec31ecc617f7accfd876693b
2 copies of NavigationBarApps (for vertical and for horizontal orientation) share a single
static copy of NavigationBarsAppsModel.
If the active orientation's view made changes, they are not conveyed
to the inactive one, and if we rotate to show the other view, it will show
stale data.
The fix introduces an event generated by the model, which allows the invisible
shelf to get updated when the visible one makes changes.
Bug: 20024603
Change-Id: I0d749dbac700857b081bce8a5a232f24ba271b25
The existing Shelf DND crashes if profile or app removal happens
while dragging from outside of shelf. This is because in this case
shelf temporary adds a null placeholder enter to the model, and
doesn’t check for nulls in user-removed and app-removed callbacks.
Adding checking for nulls.
In addition, since adding nulls muds the contract between the
shelf view and its model, I’m getting rid of adding null entries
to the model. Nulls are used on the view side, but never leak to
the model.
Because of that, the state of the view (which may have nulls) and the
mode may not match each other during the drag, I introduce storing
app data in views, as a tag. Null tag means a drag placeholder.
Now that the state of the model doesn’t always follow the state
of the shelf via add/remove operations, it makes sense to introduce
set-all/get-all calls in the model, instead of add/remove/get(i)
calls.
Again, all these changes, even though relatively massive, add clarity
into the view/model contract by eliminating strange states where the
model can have nulls in certain positions.
Also fixing a case when removing an app while dragging it happily
creates an icon.
Bug: 20024603
Change-Id: Ie4e617ccf9278708d64ee100265a4858d1227aed
Fixing an issue when installed apps in Guest user were treated incorrectly.
This happened because we used APIs using the systemui current user (0),
not the app's user.
Also, switching AppInfo from user's serial numbers to UserHandle. Earlier,
I declared that user ids (not serials) is the "lingua franca" between different classes,
so, this move is along these lines. In addition, this is simply more convenient.
Bug: 20024603
Change-Id: I749d900aa17083a41e4215c6587ae5ccaa31f5eb
Added a new component which tracks touch and sensor events and
also events like showing the bouncer tapping a notification and
others. The collection is enabled when the screen is turned on and
is disabled after the phone is unlocked. The data is saved in a
protobuf file in internal storage in a directory called
"good_touches". There is also an option to collect events which
end with the screen turning off. These are saved in the
"bad_touches" file. Everything is hidden behind the
ENABLE_ANALYTICS flag which is set by default to false and can be
turned on only if Build.IS_DEBUGGABLE is true. Also
behind the ENFORCE_BOUNCER flag the class shows the bouncer before
expanding a notification, showing quick settings or launching an
affordance from one of the bottom corners.
Change-Id: Iaeae0fb7a0d9c707daf7a270201fa5b1cd84c74a
When loading apps from prefs, detecting apps that cannot
be launched (for example, were uninstalled) and not adding them
to the shelf.
Also watching for apps that become unlauncheable while the shelf
is shown, and removing them as it happens.
Bug: 22694757
Change-Id: Iab9494f0480e9bf4438b72a94041002be010334f
These users required special treatment and complicated code development.
Now simply always using the actual value.
Bug: 22609426
Change-Id: Ife44de442de455248ae7a8ebf8655ddbc4c289d4
All users are stored in same SharedPreferences file. User serial number is included in the preference key.
Prefs for deleted users get cleaned up upon switching to a new user.
Bug: 22853745, 22609426
Change-Id: I7f774483bc660ed5b1e8115da9b468a291488723
We need this to differentiate between starting apps for the primary and
managed users.
This in particular solves the issue when apps were executed as Owner
while we are in Guest account (see the bug).
Valid user ids for a shelf app are either primary or a managed (work)
user for the profile.
Launcher allows mixing apps for for primary and the managed users on
its home screen. Apps for the managed user are marked with a suitcase
badge.
Launcher includes a user id in the drag and drop info that it sends to
SystemUI, as “profile” extra added to the intent.
Shelf now stores this user id and uses it to start apps.
Bug: 22609426
Change-Id: Id4c6c1ac8617a83f4484f78db578955699d1a888