Commit Graph

6793 Commits

Author SHA1 Message Date
Jeff Sharkey
98cb23dccf Merge "Slight API renaming, better behavior." 2015-12-09 22:51:43 +00:00
Jeff Sharkey
e13529a4ad Slight API renaming, better behavior.
Rename APIs to reflect that they're storage-related.  Also move
credential-storage APIs to be system API.

Return a null Context when device-encrypted storage isn't
supported.  This is the easiest way to keep legacy apps working when
upgrading from M to N.

Reduce strictness of path checking so we don't crash when working
with special packages like "android".

Bug: 22358539, 26104027
Change-Id: I38c24fc003488186210a6ae3b64270f86e1efe56
2015-12-09 15:22:54 -07:00
Selim Cinek
7b83639c34 Changed the appearance of the notification children
Some further tuning to the layout

Change-Id: Ifb3797e9982d718a30954adb9e1901eb2a1fa75d
2015-12-08 16:25:00 -08:00
Selim Cinek
bde0d4fe35 Removed the devider above the actions
The templates had a divider line above
the actions. this is now gone.

Change-Id: I85e8c773c4c49d9eaeceb20915cc98941d537ee6
2015-12-08 16:25:00 -08:00
Selim Cinek
ea4bef7386 Removed duplicate content from group notification header
Previously the headers all had duplicate content, which is
now optimized to look visually more appealing.

Change-Id: I38ed8db1985fd8a9470888e1b7e1e6b0f2e23b19
2015-12-08 16:25:00 -08:00
Jeff Sharkey
103d61b9f7 Merge "Shift around encryption public APIs." 2015-12-08 22:29:52 +00:00
Jeff Sharkey
7a30a30ebe Shift around encryption public APIs.
There are far too many Context APIs with special directory paths
to replicate device-encryption versions of them all.  Instead, add
methods to clone a Context that explicitly stores its data in either
credential- or device-encrypted storage.

Methods to test the behavior of a given Context.

Bug: 22358539
Change-Id: I6a6290a9b282605ce9a1f82742fc2c4c50536754
2015-12-08 15:24:29 -07:00
Svet Ganov
2acf063da0 Ephemeral cookie API
Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.

The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.

This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.

Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
2015-12-08 19:17:15 +00:00
Robin Lee
fbc65644b9 DevicePolicy API to remove an installed KeyPair
The keypair is specified by alias and removed via a call to the
KeyChainService, which will have installed the pair in the first place.

Bug: 22541933
Change-Id: I37317e7c22e89816156e6e9a7abf4c5a59e8440a
2015-12-08 16:40:56 +00:00
Filip Gruszczynski
d6d5f8f045 Merge "Fix freeform to recents animating window being cuttoff." 2015-12-08 02:40:40 +00:00
Filip Gruszczynski
f34a04cca9 Fix freeform to recents animating window being cuttoff.
The window will appear cutoff during the animation if the window was
cropped due to stack or decor bounds before the animation started. We
need to disable the cropping (both from decor and from stack bounds)
for the duration of the animation.

Unfortunately, by disabling cropping of a freeform window to the stack
bounds, we will make it appear above the docked window during the
animation (because the animation will lift the layer). To fix this, we
need to treat the docked stack like the pinned stack and assume it's
always on top for the layering purposes.

CL also includes refactoring of mSystemDecorRect and
mLastSystemDecorRect which can be moved from WindowState to
WindowStateAnimator and made private there.

Bug: 24913782
Change-Id: Idbea99ba04e9449d0563d0c02636f8b4b63087f7
2015-12-07 18:32:02 -08:00
Jeff Sharkey
6a6cdafaec APIs to obtain SharedPreferences paths.
Needed for apps that want to migrate SharedPreferences from CE to DE
storage.  Note that a device will only ever enter a CE mode with a
factory reset, so apps should only be using these APIs when they
want to migrate files to a consistent location on non-FBE devices
for simplicity.

Bug: 25503089
Change-Id: Ic846215da1617d116a048e036415ac7ad523b770
2015-12-07 19:25:25 -07:00
Fyodor Kupolov
79aeb92f4d Merge "Added SynchronousUserSwitchObserver" 2015-12-07 18:55:09 +00:00
Felipe Leme
21d4b20f23 Merge "Changed ActivityManager.requestBugreport() to take a 'progress' parameter." 2015-12-07 18:02:40 +00:00
Wale Ogunwale
5f986095be APIs for activity to know when its windowing/pip modes change
Added APIs that allow activities to ask the system if they are currently
in multi-window or picture-in-picture mode and also get notified when
their modes change.

Bug: 25509834
Bug: 25683717
Change-Id: I4b8c316a49940bd6a8b31a93b345f9fd725a4721
2015-12-07 07:40:56 -08:00
Filip Gruszczynski
3696301ada Merge "Update client configuration when resizing without crossing size threshold." 2015-12-07 02:17:47 +00:00
Felipe Leme
4cc863338d Changed ActivityManager.requestBugreport() to take a 'progress' parameter.
When progress is set to 'true', it calls the new, enhanced
'bugreportplus' service, while when 'false' it calls the regular
'bugreport' service.

'bugreportplus' is more user-friendly (it shows a system notification
with the progress, allow user to cancel, etc...), at the cost of
consuming more resources. As such, the "Take Bug Report" UI will be
changed to offer the user a combo with these 2 options, but for now it's
always going to be 'bugreportplus'

BUG: 26034608
Change-Id: I21a6b5b092a85614e91d523b8f4df1fb00e49b3b
2015-12-05 10:30:18 -08:00
Filip Gruszczynski
ca66481244 Update client configuration when resizing without crossing size threshold.
Even though the activity won't be relaunched and won't receive a
callback about the resize, we still need to update it's configuration.
Otherwise when the application queries for it, it will receive wrong
data.

Bug: 23904868
Change-Id: I601e91b8e71691c1cb5edb2734894441c4fde8e2
2015-12-04 17:14:52 -08:00
Chong Zhang
75b3720c50 Fix app over lockscreen being cropped by docked stack
When secure apps are launched over lockscreen, the bounds should always
be fullscreen. Also docked stack and divider shouldn't be visible while
lockscreen is shown.

bug: 25837786
Change-Id: I0bc681cdb46404fb79e9332d1f82fee51f338da9
2015-12-04 15:06:47 -08:00
Filip Gruszczynski
8294f82562 Merge "Put PIP windows above transition animations." 2015-12-04 20:50:23 +00:00
Filip Gruszczynski
114d5ca711 Put PIP windows above transition animations.
PIP activities are already on top of everything else, but during
animation we increase the layer of the animated window for the duration
of the animation and it may cover the PIP. By forcing the same
adjustment on PIP windows we will keep them above animating windows.

Bug: 26015827
Change-Id: I8f7a87f41fed24b3e520fb599a94cf24cc2eeb50
2015-12-04 12:49:42 -08:00
Julia Reynolds
c030986883 Merge "Topics can now have an Importance." 2015-12-04 20:37:28 +00:00
Julia Reynolds
5d25ee7a00 Topics can now have an Importance.
Bug: 22451710
Change-Id: I627121da6c4b85492715a8e8a099656dca52b734
2015-12-04 15:20:34 -05:00
George Mount
0b2664913f Merge "Revert "Revert "Choose the correct Fragment to pull a Transiton from.""" 2015-12-04 18:02:28 +00:00
George Mount
ac97ba0c4c Merge "Revert "Revert "Give transitioning fragment a context prior to retrieving transition""" 2015-12-04 18:02:18 +00:00
George Mount
233c97c26f Revert "Revert "Choose the correct Fragment to pull a Transiton from.""
This reverts commit c30d875c7f.

Change-Id: Ica7c9b6d1dc6553aae893d2ce07bedef7da7dfe5
2015-12-04 18:00:55 +00:00
Jeff Sharkey
0534ac90e5 Merge "Handle non-encryption-aware accounts and sync." 2015-12-04 16:50:38 +00:00
Filip Gruszczynski
abd1ea4b2b Merge "Run activity visibility adjustment even if there is no top running." 2015-12-04 16:42:49 +00:00
Jeff Sharkey
9d8a1048bb Handle non-encryption-aware accounts and sync.
The system can now boot in a "locked" state where only encryption
aware (EA) components can be safely started.  When in this state,
PackageManager already filters away non-EA components, but system
services like AccountManager and SyncManager need to carefully handle
these temporarily "missing" components.

As a guiding principle, all known Accounts are still present when
the device is locked, but communication with underlying non-EA
authenticators is blocked.

To keep things simple for now, all SyncManager requests are kept
dormant until the user enters the unlocked state.

The core of this logic is that RegisteredServicesCache now works
with all components regardless of EA status, which prevents us from
accidentally thinking a service was removed when the user is locked.

Bug: 25945136
Change-Id: I8714121f6236b00821769023c4df7de1c8a99944
2015-12-04 09:36:39 -07:00
George Mount
128690c07a Revert "Revert "Give transitioning fragment a context prior to retrieving transition""
This reverts commit 214f6749fc.

Change-Id: Iced45f42251a82448e4dc4392315c3864494a31a
2015-12-04 07:39:41 -08:00
Filip Gruszczynski
21199bd9a7 Run activity visibility adjustment even if there is no top running.
Ensuring visibility is triggered in unpredictable fashion, e.g. it can
be triggered by attachment of application. It can happen between an
activity stopping due to change of user, but before that operation is
finished and as a result the stopped activity will get marked as
visible even if we mark it as invisible in stop. Instead of trying the
activity as invisbile during stopping, we adjust the visibility ensuring
method to go through stack contents even if there is no top running
activity (because the top running activity is run by a different user)
and force the correct visibility.

Bug: 25958227

Change-Id: I4662667e8151fa25d947bacf33ba915389dd32e8
2015-12-03 16:19:12 -08:00
Fyodor Kupolov
680215f502 Merge "Fix instrumentation context initialization" 2015-12-04 00:12:00 +00:00
Keun-young Park
b88dd9412e Merge "allow locking UI mode and block launching car dock for automotive" 2015-12-03 21:31:23 +00:00
keunyoung
a771049b2e allow locking UI mode and block launching car dock for automotive
- add config to lock UI mode change: When this is enabled,
  request to change car mode will be ignored. Apps can check
  the config using UiModeManager.isUiModeLocked()
- add config to lock day / night mode: When this is enabled,
  apps cannot change day / night mode without having
  MODIFY_DAY_NIGHT_MODE permission.
  Apps can check the config using UiModeManager.isNightModeLocked()
- add config to disable car dock intent launch for home key
  and mode change
- All new configs have default values which keeps the current behavior.
  Car products should override the configs to get desirable behavior.

bug: 22700993
Change-Id: Ic0e58f3428151e0b1c19a2e9a7d6ded32ff962a6
2015-12-03 13:05:35 -08:00
George Mount
d78c5d7c70 Merge "Revert "Give transitioning fragment a context prior to retrieving transition"" 2015-12-03 19:11:11 +00:00
George Mount
895eaa453e Merge "Revert "Choose the correct Fragment to pull a Transiton from."" 2015-12-03 19:10:08 +00:00
George Mount
214f6749fc Revert "Give transitioning fragment a context prior to retrieving transition"
This reverts commit 2b2d23aa70.

Change-Id: Ib3010b4ba3c3d003d5143d9ea63d331c9c2d304e
2015-12-03 19:09:59 +00:00
George Mount
c30d875c7f Revert "Choose the correct Fragment to pull a Transiton from."
This reverts commit fbaa14bc35.

Change-Id: Ic6953554a97bf125a69209b1db973d7fc48ab31b
2015-12-03 19:09:17 +00:00
Adam Skory
a1d8f42fcd Merge "Make isAppProvidedWebUri false from setDefaultIntent()" 2015-12-03 18:29:05 +00:00
Clara Bayarri
8469b86e87 Merge "Create work challenge timeout" 2015-12-03 12:04:24 +00:00
Clara Bayarri
56878a9398 Create work challenge timeout
The work challenge should be locked whenever the device goes to sleep + admin
timeout or when the power button is pressed if the lock setting is on.

This change creates the infrastructure to lock a specific user instead of the
device and uses it in these cases. Then, the current code that brings up the
work challenge can check to only show it if the user is locked.

Change-Id: I89b4342b1458d97734d7afa66be52bf04ec3a3d4
2015-12-03 12:01:39 +00:00
Neil Fuller
568f4de11a Merge "Fix @code escapes" 2015-12-03 09:44:01 +00:00
Keun-young Park
aa8b1c35ad Merge "Revert "allow locking UI mode and block launching car dock for automotive"" 2015-12-03 02:11:20 +00:00
Keun-young Park
3b741e03b3 Revert "allow locking UI mode and block launching car dock for automotive"
This reverts commit 1746369a6b.

Change-Id: I4989e99b8f648145d0dbfe18e557102939e7d1e3
2015-12-03 02:11:00 +00:00
Keun-young Park
ef3ca438c9 Merge "allow locking UI mode and block launching car dock for automotive" 2015-12-03 01:45:12 +00:00
Adam Skory
a5381085d3 Make isAppProvidedWebUri false from setDefaultIntent()
Just assign mUri directly instead of calling setUri()
to avoid flipping mIsAppProvidedWebUri to true exactly
when it shouldn't be.

Also, make sure the boolean gets un/parceled.

Bug: 25952056

Change-Id: I973e585d04a73c2b7eab5975ea7f2b447b270c26
2015-12-02 17:43:19 -07:00
Fyodor Kupolov
6005b3f87b Added SynchronousUserSwitchObserver
This class provides a synchronous version of onUserSwitching, which does not
require notifying a callback.

Bug: 25816558
Change-Id: Id31bb79bf10b5afd72dfca28cf4bea817e726f6f
2015-12-02 16:40:11 -08:00
Fyodor Kupolov
af38b8ea3e Fix instrumentation context initialization
Previously, when a user was not the system user, an instrumentation context
was not properly initialized. Its ApplicationInfo should had been initialized for
the current user id .

Bug: 25981683
Change-Id: I7b934bb6de42be15a613ac26fd5377c9de1682cc
2015-12-02 16:16:07 -08:00
John Reck
c8aad06efe Merge "Nuke HardwareRenderer abstract base" 2015-12-02 23:54:01 +00:00
John Reck
51aaf906f9 Nuke HardwareRenderer abstract base
Bug: 17303292

Change-Id: I4a272ea4f695f4f9993e8be640fdd8530b691be0
2015-12-02 15:46:11 -08:00