Commit Graph

10541 Commits

Author SHA1 Message Date
Nathan Harold
28084d89ec Add a Skeleton IpSecService
-Add IpSecService with the necessary glue to connect to netd
-Add code to retrieve IpSecService from System Server

Bug: 34811227
Test: Service boots (and dumpsys works), more via b/34811227
Change-Id: I4cdcb643421141202f77a0e2f87a37012de0cd92
2017-03-29 11:38:20 -07:00
Tony Mak
26389e71c2 Introduce AMS.getLastResumedActivityUserId to fix work profile icon issue am: ec319aba34
am: 98f50894bc

Change-Id: I4e8d08e603dc86c631d5055ad51ffe31a9442ad5
2017-03-29 12:18:43 +00:00
Tony Mak
ec319aba34 Introduce AMS.getLastResumedActivityUserId to fix work profile icon issue
Problem:
Work profile status bar icon feeature is relied on two callbacks
1. onForegroundProfileSwitch  (AMS.setResumedActivityLocked)
2. appTransitionStarting (WMS)

We assume callback 1 is always called before 2, but it is not the case.
These two callbacks are triggered by two handlers in two different threads,
and hence race condition happens.

Solution:
Not rely on onForegroundProfileSwitch to update mManagedProfileFocused
flag anymore. Query getLastResumedActivityUserId in appTransitionStarting.
Also, make sure mLastResumedActivity is updated before sending message
to WMS in setResumedActivityLocked.

Test: Start a work app, observe that the work icon is shown.
Test: Start a personal app, observe that work icon is gone.
Test: Dock the work app, tap on it (give it focus), observe that work
      icon is shown.
Test: Start a work app, switch user, can see the icon is gone. Switch back,
      icon is back.

Bug: 34159089

Change-Id: I2cee141d18e8b7d5607b26dd7a2fd5bc9cd0ebb3
2017-03-29 10:03:39 +00:00
Jeff Tinker
99f82dd6d6 Revert "Make public getFragments() and onGetLayoutInflater() methods" am: 79a973f643
am: fb01ea4c11

Change-Id: I6058093e24a9a5376b7ab542df8f1f43ec5b38e9
2017-03-29 01:55:51 +00:00
Jeff Tinker
79a973f643 Revert "Make public getFragments() and onGetLayoutInflater() methods"
This reverts commit 599be3d01e.

This change is being reverted because it broke git_master build.

Change-Id: I54ab9cd3d9e08dcf870f472fda08cc44e57986d0
bug: 34703669
2017-03-29 01:25:06 +00:00
George Mount
645d5a4361 Merge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev am: c8d8c27c68
am: abea405064

Change-Id: Ib8bf2e7e6e0403f17c7f58f31a26554ca74f3272
2017-03-28 23:55:30 +00:00
TreeHugger Robot
c8d8c27c68 Merge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev 2017-03-28 23:43:23 +00:00
TreeHugger Robot
36e2483663 Merge "Add Configuration param to onMovedToDisplay" into oc-dev 2017-03-28 21:36:40 +00:00
Chad Brubaker
336ae5b616 Add ACTION_EPHEMERAL_RESOLVER_SETTINGS
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86e6)
2017-03-28 20:34:55 +00:00
Chad Brubaker
22a5cf6d9b Merge "Add ACTION_EPHEMERAL_RESOLVER_SETTINGS" 2017-03-28 20:33:35 +00:00
Evan Rosky
3473647f7d Merge "Allow ToolbarActionBar to pass-through unhandled keyShortcuts" 2017-03-28 19:38:45 +00:00
Torne (Richard Coles)
758f80ea43 Merge "Support loading a stub WebView using a donor package." into oc-dev am: 7ec7ef2ba3
am: 07cb93dc26

Change-Id: Ieadf02a034f991c3f7c6f745067eaa316a8dcbcf
2017-03-28 17:29:23 +00:00
Andrii Kulian
e5c58eefb1 Add Configuration param to onMovedToDisplay
To be consistent with other multi-window callbacks adding
Configuration param to the onMovedToDisplay, so that app
developer can handle configuration change at the same time
when it receives a notification about move.

Bug: 36649499
Test: android.server.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I80c765473bfc09ea1fb7aa4e2e77baf3b21606b8
(cherry picked from commit 2c32a11a71)
2017-03-28 17:28:17 +00:00
Andrii Kulian
3868b38999 Merge "Add Configuration param to onMovedToDisplay" 2017-03-28 17:26:41 +00:00
Chad Brubaker
aa49cb86e6 Add ACTION_EPHEMERAL_RESOLVER_SETTINGS
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
2017-03-28 10:25:36 -07:00
TreeHugger Robot
7ec7ef2ba3 Merge "Support loading a stub WebView using a donor package." into oc-dev 2017-03-28 17:11:26 +00:00
George Mount
599be3d01e Make public getFragments() and onGetLayoutInflater() methods
Bug 34703669

Test: I71856306a7bb67aacb84be17165e7e095653c20a
Change-Id: I41999d0f5e6d75afebbbf67ad5bf49fa0cca509e
2017-03-28 16:38:08 +00:00
Amith Yamasani
759922d9db Revert "Logging to track #36406078"
Not needed anymore, since the bug was found to be in the binder driver.

This reverts commit 9afb1fc495.

Change-Id: I3891866f6e30a3f3391df8005e56bf9b9777b3a6
(cherry picked from commit ab5523f337)
2017-03-28 16:35:12 +00:00
Amith Yamasani
b2b9ac2c71 Merge "Revert "Logging to track #36406078"" 2017-03-28 16:32:25 +00:00
Torne (Richard Coles)
0452670374 Support loading a stub WebView using a donor package.
Support loading a WebView package which specifies the name of a "donor"
that provides missing files. This allows a preinstalled stub WebView to
function by loading its code and assets from the preinstalled Monochrome
implementation, as long as the versions are close enough that the
manifest contents are compatible, which should be fine since
preinstalled versions will match.

To do this, we replace the stub's code paths in AppplicationInfo with
the donor's, so that all Java and native code and resources are loaded
from the donor APK at runtime instead of from the (mostly empty) stub.

To get the ClassLoader with the modified path cached as if it was the
regular path, we introduce a new "cacheKey" parameter in
ApplicationLoaders.

Bug: 21643067
Test: build "new" stub WebView upstream in chromium and test loading
Change-Id: I08cc9122b1c9def3e1206974f3e0e8973cca3419
2017-03-28 16:21:10 +00:00
Andrii Kulian
2c32a11a71 Add Configuration param to onMovedToDisplay
To be consistent with other multi-window callbacks adding
Configuration param to the onMovedToDisplay, so that app
developer can handle configuration change at the same time
when it receives a notification about move.

Bug: 36649499
Test: android.server.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I80c765473bfc09ea1fb7aa4e2e77baf3b21606b8
2017-03-27 19:25:24 -07:00
TreeHugger Robot
a2bd52aca3 Merge "Fix issue with task overlay activities not finishing." 2017-03-28 02:02:34 +00:00
Winson Chung
6954fc9a7e Fix issue with task overlay activities not finishing.
- The task overlay activity should only exist when there are activities
  present in the task.  When the last such activity is finished, we should
  remove the whole task entirely including the task overlay.
- Exposing the task overlay apis to CTS

Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I1dabe7782fb6769a90d832664e8052be158041e1
2017-03-27 13:34:53 -07:00
TreeHugger Robot
5e01870015 Merge "Unbind from service on app killed and dedup association requests" 2017-03-27 18:43:37 +00:00
Michal Karpinski
aa870a4782 Merge "Add support for key-value packages to adb backup/restore." 2017-03-27 09:28:05 +00:00
TreeHugger Robot
89000cf644 Merge "Another buggy app is already targeting O." 2017-03-26 21:56:51 +00:00
Jeff Sharkey
4498e03d2b Another buggy app is already targeting O.
Bug: 36612878
Test: builds, boots
Change-Id: I161a58bf972a0af327fb216d041a7e46d33c0d2e
2017-03-26 14:15:51 -06:00
Felipe Leme
63d9831020 Merge "Make auto-fill UI robust" 2017-03-25 00:36:48 +00:00
Johan Toras Halseth
b59a4b85ad Add support for key-value packages to adb backup/restore.
For adding CTS tests for packages having key-value backup agents, we add
support for key-value backups to the adb backup/restore command.
Previously, packages not supporting fullbackup would just be skipped on
this command. Now, by adding the -keyvalue flag to the adb backup command,
packages supporting key-value will also be added to the resulting
tarball. Similarly, if the tarball being supplied to adb restore
contains data from key-value packages, it will be restored.

This will later be utilized for writing CTS tests for such packages.

Test: adb backup -includekeyvalue -all && adb restore backup.ab

Change-Id: I7b4ccfb7072d01d29a888952145d7cce90a4f59e
2017-03-24 23:51:48 +00:00
TreeHugger Robot
bbf038bc5e Merge "Remove "Allow persistent changes to the vendor overlay theme"" 2017-03-24 22:25:20 +00:00
Felipe Leme
4753bb0c34 Make auto-fill UI robust
Now the autofill UI tracks the movement of the anchor view,
both real and virtual and while still preventing the filled
app from accessing the chooser UI. This was achieved by using
a popup window in the app process to determine the window
location and adding a window presenter interface to popup
window that controls the actual window addition, removal, and
update which is implemented by the system server.

Test: all autofill CTS tests pass

bug: 36392498
bug: 35708258
bug: 34943932
fixes: 36039182
fixes: 36493078

Change-Id: I0321913b2e2e759f4b17003bf85cb873e63a467c
2017-03-24 15:16:28 -07:00
Eugene Susla
a38fbf63fd Unbind from service on app killed and dedup association requests
1. Listen to calling package binder death stopping the scanning on that.
2. Don't restart scanning when a request with the same values was made.

Bug: 30932767
Test: 1.:
  - Using a test app start scanning and kill the app.
  - In debug mode ensure that DeviceDiscoveryService#stopScan gets triggered
2.:
  - Start scanning and rotate the device while device chooser is visible
  - Ensure no visible loss of state is happening
Change-Id: If126a2c963da90172a956fbd88e6b3dcd7ac8b01
2017-03-24 14:03:17 -07:00
TreeHugger Robot
31426a2e29 Merge "Allow system UID to call isSecurityLoggingEnabled()" 2017-03-24 19:11:17 +00:00
TreeHugger Robot
ec9aea293a Merge "Do not reuse fragment indices." 2017-03-24 15:49:57 +00:00
Kevin Schoedel
28eae8e551 Manage controller connection from VrCore to VrWindowManager.
Use VrManager as a proxy to pass the controller data file descriptor
from VrCore to VrWindowManager, since the latter is a purely native
service with no Java visibility.

This is intended to be replaced by moving the relevant parts of
VrWindowManager into VrCore (b/36506799).

Bug: 35619424
Test: manual on device
Change-Id: I9545349893ed9b23de4ba8d3cb61c7d403ad0b97
2017-03-24 15:10:29 +00:00
Bartosz Fabianowski
0ec0000c22 Allow system UID to call isSecurityLoggingEnabled()
This CL allows code running under the system UID to call
isSecurityLoggingEnabled(), so that Settings can find out whether
logging is on or off.

Bug: 36584321
Test: m RunSettingsRoboTests

Change-Id: Icf8b7d6cef0f4e23f57bcf0498ffdcf124d16d38
2017-03-24 15:17:28 +01:00
Amith Yamasani
ab5523f337 Revert "Logging to track #36406078"
Not needed anymore, since the bug was found to be in the binder driver.

This reverts commit 9afb1fc495.

Change-Id: I3891866f6e30a3f3391df8005e56bf9b9777b3a6
2017-03-24 00:53:47 +00:00
George Mount
838166d3e6 Do not reuse fragment indices.
Bug 25472591

Use a SparseArray instead of two ArrayLists to track
active fragments. This allows monotonically increasing
indexes instead of reusing indexes in the ArrayList.

Test: ran cts tests

Change-Id: I98f1b7928a0ef2373b719b76582a4c6da3425817
2017-03-23 17:28:52 -07:00
TreeHugger Robot
f26f5c7e66 Merge "Introduce AuthenticationRequiredException, and @hide RecoverableSecurityException." 2017-03-23 22:12:27 +00:00
TreeHugger Robot
15d010acda Merge "Deprecate DPM.EXTRA_PROVISIONING_EMAIL_ADDRESS" 2017-03-23 19:31:08 +00:00
TreeHugger Robot
fbb06a6e6a Merge "Fixed log warning for calling doStart() twice." 2017-03-23 18:01:18 +00:00
Mahaver
761ce77875 Deprecate DPM.EXTRA_PROVISIONING_EMAIL_ADDRESS
Bug: 34920067
Test: No tests for this API.
Change-Id: If28f9a95b3f620de5dfc1b2fa63c1d277ebde9b9
2017-03-23 17:19:00 +00:00
George Mount
550df700f1 Fixed log warning for calling doStart() twice.
Bug 36504927

The LoaderManager was performing a doStart() multiple times
and issued a warning and then returned without any problems.
This CL fixes the underlying problem of doStart() being
called multiple times so that the warning isn't logged.

Test: ran fragment cts tests
Change-Id: I4a43280fd581e08ccd911d8d05367e00382d694a
2017-03-23 09:08:49 -07:00
Jason Monk
cc5a731fd7 Remove "Allow persistent changes to the vendor overlay theme"
This reverts commit 2dc804be11.
It also removes the related calls from UiModeManager.

Fixes: 32721178
Test: make & flash
Change-Id: Id371bccec611155cc6910e46b3277c3d27fc1c79
2017-03-23 11:25:59 -04:00
TreeHugger Robot
1e81b7f166 Merge "Added LocaleList on ViewStructure." 2017-03-23 14:11:09 +00:00
Naveen Kalla
ca3d5434e8 Add API to request Bug Report with a certain title and description
ActivityManagerService will send the details to dumpstate and
BugreportProgressService will get the details from dumpstate and use
that for the notification.

Bug: 33561517
Test: Modify TelephonyMonitor to use this API and ensure that the
      notification uses that the title and description sent as arguments
      to the API. File a bug using betterBug and ensure that the
      information gets populated automatically.

Change-Id: I455f1df2278e5d569dd19c74245a0704dcf5a321
2017-03-23 12:06:04 +00:00
TreeHugger Robot
eba78e3a50 Merge "Update xattrs when creating cache directories." 2017-03-23 06:42:16 +00:00
TreeHugger Robot
ee7a7e029e Merge "Suppress SharedPreferences check for buggy apps." 2017-03-23 06:14:14 +00:00
TreeHugger Robot
f3d8d3bd58 Merge "Refactor cache behavior from "atmoic" to "group"." 2017-03-23 06:04:55 +00:00
Jeff Sharkey
83aacdee40 Update xattrs when creating cache directories.
Typically installd will create cache directories for an app, and
store those inode numbers in the parent directory.  However, when an
app deletes and recreates a cache directory, the (now invalid) inode
number is left floating around, and we could end up pointing at a
useful non-cache directory.

Fix this by updating the xattr when we create the cache directory
out in userspace.

Test: builds, boots
Bug: 34185870
Change-Id: I71526dd73230c938aceabd2c0a8e89d44cc1f169
2017-03-22 23:13:41 -06:00