Commit Graph

11993 Commits

Author SHA1 Message Date
Matt Pietal
5c87e303ec Merge "Resolver - Fix NGA (voice interaction) crash in resolver" 2019-09-11 13:46:48 +00:00
Siarhei Vishniakou
0f842282bf Merge "Add uhid group to system_server" am: 3a49014ca0 am: 5cfc2c3e7f am: 5f703ccf7b
am: 02ad53d994

Change-Id: Icc061e9ac4a14f9ed122f166de19d5b4cafca6d2
2019-09-11 03:23:41 -07:00
Siarhei Vishniakou
02ad53d994 Merge "Add uhid group to system_server" am: 3a49014ca0 am: 5cfc2c3e7f
am: 5f703ccf7b

Change-Id: I178c85cbc78ddf8c95e89b23933b0a51461d4728
2019-09-11 03:16:38 -07:00
Siarhei Vishniakou
5f703ccf7b Merge "Add uhid group to system_server" am: 3a49014ca0
am: 5cfc2c3e7f

Change-Id: I63649dd5951be990d8404f3bbc53f4ece26cf030
2019-09-11 03:09:39 -07:00
Treehugger Robot
3a49014ca0 Merge "Add uhid group to system_server" 2019-09-11 09:31:23 +00:00
Treehugger Robot
980681e525 Merge "Reconcile Zygote process name code with Q release." 2019-09-10 18:48:31 +00:00
Mathieu Chartier
ed511cde16 Merge "Rename profileSystemServer to shouldProfileSystemServer" am: f7335ffb9a am: 2b3e8ad368 am: 3f75400059
am: 8690600c23

Change-Id: I8e06ce4174e091c1aa97dc976ce1ec172709628d
2019-09-10 09:11:26 -07:00
Mathieu Chartier
8690600c23 Merge "Rename profileSystemServer to shouldProfileSystemServer" am: f7335ffb9a am: 2b3e8ad368
am: 3f75400059

Change-Id: Id194bd88f4ac1cfd52e479f4f2401323dd83e596
2019-09-10 08:57:58 -07:00
Mathieu Chartier
3f75400059 Merge "Rename profileSystemServer to shouldProfileSystemServer" am: f7335ffb9a
am: 2b3e8ad368

Change-Id: I067e44ed65cda267edc60f3bf3845cb80d9b3434
2019-09-10 08:51:20 -07:00
Matt Pietal
2cf4c6c3d4 Resolver - Fix NGA (voice interaction) crash in resolver
A race condition existed whereby placeholder targets were attempting
to be published without any target information, due to bg thread
processing of resolved intents. Detect this scenario, and wait. Also
have SysUI ChooserActivity accept voice interactions in the intent
filter. Does not use DEFAULT category, as it should only ever be used
by explicit intents.

Bug: 139729579
Test: atest ResolverActivityTest
Change-Id: If8fc0c3595da47c26b1edab75bd6fc82a6dcb35e
2019-09-10 10:21:17 -04:00
Anthony Hugh
d4d88f2486 Merge "Refactor PermissionManager.SPLIT_PERMISSIONS" into qt-qpr1-dev
am: fcb2ce1503

Change-Id: I830c2580f3d141a3641e023c189c148a0a1737d0
2019-09-09 19:24:39 -07:00
Anthony Hugh
6f5eadc0d3 Refactor PermissionManager.SPLIT_PERMISSIONS
Creating a SystemConfig from a non-system process is taking 500+ ms.
This CL instead exposes the needed split permissions from system_server
to optimize performance.

Tested locally and creating PermissionManager / retrieving SystemConfig
is now less than 1 ms.

Bug: 139828734
Bug: 139485700
Fixes: 139828734
Test: Added systrace / logs to PermissionController app and traced
runtime of onGrantDefaultRoles().

Merged-In: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
Change-Id: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
(cherry picked from commit f69c71e25889d8a9d66da05ee0f386d7fb626c6c)
2019-09-09 15:49:04 -07:00
Mathieu Chartier
344e0efb4a Merge "Add phenotype property for profiling system server" am: 62b8a2a216 am: d3d25941f6
am: 0db66b5621

Change-Id: I2266241989c003af90ba7ea7b047e7e92763dbbd
2019-09-09 13:40:49 -07:00
Mathieu Chartier
0db66b5621 Merge "Add phenotype property for profiling system server" am: 62b8a2a216
am: d3d25941f6

Change-Id: Ie1a3cf73a1e43007fd54e96deccc90f2b33fe5dd
2019-09-09 13:26:07 -07:00
Mathieu Chartier
3b05e4d74c Rename profileSystemServer to shouldProfileSystemServer
Makes it clearer and addresses previous CR comment.

Bug: 139883463
Test: make
Change-Id: I7c1a1d99cf307b89ee8f2c5c906168d196b35d0e
2019-09-09 13:05:31 -07:00
Mathieu Chartier
77aca50b6f Add phenotype property for profiling system server
Added the property profilesystemserver in the RUNTIME_NATIVE_BOOT
namespace. This property is overrides the system one if it is
present.

Bug: 139883463
Test: set the property manually and verify that system server is started
Test: with profiling

(cherry picked from commit 7b31c74ddb)

Merged-In: Ifd69530e52a717a381b3f91b15a74329614906f2
Change-Id: I00594949b845a75152c7ab3c94aa84a55b072776
2019-09-09 16:25:35 +00:00
Martijn Coenen
3b8ca2e7ac Reconcile Zygote process name code with Q release.
Some Zygote code that was pushed to AOSP master is different from the
pushed Q release. In particular, a call to set the process name for a
Zygote child was missing, causing an app zygote test to fail.

Bug: 139535125
Test: atest android.app.cts.ServiceTest#testAppZygoteServices
Change-Id: I53b0bc0116f1573cb1e52a998e10346bd5601f67
Merged-In: I2bce277ff8f2de4614e19d5385fe6712b076f9c9
2019-09-09 02:39:26 +00:00
James O'Leary
6d7edf933e Merge "Add completion handler for ScreenshotHelper" into qt-qpr1-dev am: 8a91775d3f
am: 8de0b9defe

Change-Id: Ie6d578faa84c0ba0ddd4613db0025dfd80bfcfb4
2019-09-06 21:25:32 -07:00
James O'Leary
8de0b9defe Merge "Add completion handler for ScreenshotHelper" into qt-qpr1-dev
am: 8a91775d3f

Change-Id: Id8a8c4ed61c269a2731d056deab96b38e3bbd583
2019-09-06 21:10:31 -07:00
James O'Leary
8a91775d3f Merge "Add completion handler for ScreenshotHelper" into qt-qpr1-dev 2019-09-07 03:42:36 +00:00
Mehdi Alizadeh
3c19f1665b Merge "Check for component availability before all AppPrediction logic" into qt-qpr1-dev am: ae4ab469bf
am: 40a6b47ff9

Change-Id: I0d767a124368b4bfae33f3dc1a41a2b8c2217ca4
2019-09-06 18:35:18 -07:00
Mehdi Alizadeh
40a6b47ff9 Merge "Check for component availability before all AppPrediction logic" into qt-qpr1-dev
am: ae4ab469bf

Change-Id: I802a131a3503348ae107f37a380e3e78c9e0e2cf
2019-09-06 18:20:27 -07:00
Mehdi Alizadeh
ae4ab469bf Merge "Check for component availability before all AppPrediction logic" into qt-qpr1-dev 2019-09-07 00:53:30 +00:00
Mehdi Alizadeh
5cc5f713f9 Check for component availability before all AppPrediction logic
Bug: 138595943
Test: Manual test by removing the AiAi package from device
Change-Id: I9d1e5be52e8ca5fadce2d3107279fa77d488f697
2019-09-06 12:23:44 -07:00
James O'Leary
fa5bb7af25 Add completion handler for ScreenshotHelper
The Next-Generation Assistant can call SysUI to request a screenshot.
Adding an indicator that a screenshot has completed successfully enables
the Next-Generation Assistant to show the assistant UI again once the
screenshot has completed.

Bug: 137201206
Bug: 131082115
Test: Wired up SysUIG's NGA integration's touch outside handler to call
take screenshot, confirmed it behaved as expected when a touch outside
occurred.
Change-Id: Ie83af6c9dd8e93b3e18a820d79c02125a19bd62a
2019-09-06 18:11:38 +00:00
Blake Kragten
da96cb4086 Merge "Connection change and high tx power Q port Changed missed Q merge back in April" into qt-qpr1-dev
am: cf1268a5f5

Change-Id: I294286840c969fba42ff2814423ae4dbd81a8577
2019-09-06 11:03:30 -07:00
Fabian Kozynski
c28bc18621 Merge "Prototype to use details or settings panels" 2019-09-06 13:00:10 +00:00
Fabian Kozynski
99cf798e8c Prototype to use details or settings panels
Adds a device config flag to change behavior of tile press or long
press:
adb shell device_config put systemui qs_use_settings_panel <X>

0 - default
1 - use panels on long press
2 - use panels on click
3 - use old details

Currently, there's only a Wifi panel.
Also, enabling details makes it so long press on collapsed QS does
nothing.

Test: manual
Change-Id: I19cb0648fde73c7263dcde3efe603b2bc37d4af7
2019-09-05 14:06:38 -04:00
Rubin Xu
d4f9d26e89 Merge "Do not suppress severe exception when password change fails" 2019-09-05 09:45:54 +00:00
Anthony Hugh
dcd137410c Merge "Refactor PermissionManager.SPLIT_PERMISSIONS" 2019-09-05 00:53:17 +00:00
TreeHugger Robot
d8c549a0e9 Merge "Add ability to get soundtrigger props from dsp" 2019-09-04 23:59:05 +00:00
Anthony Hugh
de787d4a83 Refactor PermissionManager.SPLIT_PERMISSIONS
Creating a SystemConfig from a non-system process is taking 500+ ms.
This CL instead exposes the needed split permissions from system_server
to optimize performance.

Tested locally and creating PermissionManager / retrieving SystemConfig
is now less than 1 ms.

Bug: 139828734
Bug: 139485700
Fixes: 139828734
Test: Added systrace / logs to PermissionController app and traced
runtime of onGrantDefaultRoles().

Change-Id: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
2019-09-04 15:00:24 -07:00
Rubin Xu
6a7303d03c Do not suppress severe exception when password change fails
Redefine the return condition of LPU.saveLock{Password,Pattern}:

1. When password change fails due to the caller providing an
incorrect existing password (or password throttling is still
being enforced), treat this as a normal failure mode and return
false.
2. For all other exceptions thrown during password change,
throw it to the caller so it fails fast, instead of relying
on the caller to check the return value.

Bug: 62410009
Test: atest com.android.server.locksettings
Change-Id: I8fa6320b7134d18ed5dae1af7f6f05002100d291
2019-09-03 12:13:33 +01:00
Blake Kragten
bc75c727b7 Connection change and high tx power Q port
Changed missed Q merge back in April

Cherrypicking change into Q for better metrics.

Batterystats: "none" Data connection state should reflect only out of service

Moved only out of service to unknown type position and added other
network type.

BUG: 128629695
Test: flashed on target and tested in out of service mode. Ran
dumpsys/bugreport. adb shell dumpsys batterystats

Cellular high tx power bug

Previous implementaion was not correctly registering tx high power
sections. To fix this we can send a clear flag after we send a
+cellular_high_tx_power. We need to do this so in the volta historian
data we only see a small segment to where the tx power was at before
this.

This will generate less confusion with the cellular_high_tx_power

Bug: 127640604
Test: Compiled and flashed onto device. Tested uploading long video to
google photos. This created a high tx power use case for me to test that
the feature was reporting correctly.

Bug: 139947280
Merge-Merged-6bf8ef5
Change-Id: I6a438c9fed411a49b1f36a8085863803ff53737b
2019-08-30 15:06:03 -07:00
Yin-Chia Yeh
51d8516b7a Camera: add camera audio restriction API
Test: new CTS tests
Bug: 135676184
Change-Id: I4f28d28972b9ced0fee0afe996ef1c4f68d0d2c9
2019-08-30 14:44:46 -07:00
TreeHugger Robot
8e6a69c3a2 Merge "Allow apps to collect which appops were noted" 2019-08-30 18:53:22 +00:00
Nicholas Ambur
1aa4b4b779 Add ability to get soundtrigger props from dsp
exposes sound trigger module properties to privileged
system apps with MANAGE_SOUND_TRIGGER permission

Bug: 139071862
Test: GTS test confirmed API accessible and providing valid data
Change-Id: Iec7ba6fc59912f44341fbe8d7f99193b9ead52f0
2019-08-30 10:10:18 -07:00
Philip P. Moltmann
2b08aafc14 Allow apps to collect which appops were noted
If private user data is send to an app the data provider should note an
app-op. This change adds a new API AppOpsManager#setNotedAppOpsCollector
that allows an app to get notified every time such an private data access
happens.

This will allow apps to monitor their own private data usage. Esp. with
big, old apps, distributed teams or 3rd party libraries it might not always
be clear what subsystems access private data.

There are three different situations how private data can be accessed and
an app op is noted:

1. Private data access inside a two-way binder call.
E.g. LocationManager#getLastKnownLocation. When we start a two way
binder transaction, we remember the calling uid via
AppOpsManager#collectNotedAppOps. Then when the data providing code
calls AppOpsManager#noteOp->AppOpsManager#markAppOpNoted the noted
app-op is remembered in
AppOpsManager#sAppOpsNotedInThisBinderTransaction. Then when returning
from the binder call, we add the list of noted app-ops to the
reply-parcel via AppOpsManager#prefixParcelWithAppOpsIfNeeded. On the
calling side we check if there were any app-ops noted in
AppOpsManager#readAndLogNotedAppops and then call the collector while
still in the binder code. This allows the collector e.g. collect a stack
trace which can be used to figure out what app code caused the
private data access.

2. Very complex apps might do permissions checks internal to themself.
I.e. an app notes an op for itself. We detect this case in
AppOpsManager#markAppOpNoted and immediately call the collector similar
to case (1).

3. Sometimes private data is accessed outside of a two-way binder call.
E.g. if an app registers a LocationListener an app-op is noted each time
a new location is send to the app. In this case it is not clear to the
framework which app-action triggered this app-op-note. Hence the data
provider has to describe in a AsyncNotedAppOp object when an why the
access happened. These objects are then send to the system server via
IAppOpsService#noteAsyncOp and then the collector in the app. There are
rare cases where a private data access happens before the app is running
(e.g. when a geo-fence is triggered). In this case we cache a small
amount of AsyncNotedAppOps (in AppOpsService#mUnforwardedAsyncNotedOps)
and deliver them when the app is ready for these events (in
AppOpsManager#setNotedAppOpsCollector).

Test: atest CtsAppOpsTestCases (includes new tests covering this
                                functionality)
Bug: 136505050
Change-Id: I96ded4a8d8d9bcb37a4555d9b1281cb57945ffa9
2019-08-30 08:18:50 -07:00
Mathieu Chartier
6c0c2ad9c0 Merge "Clean up class preloading" am: 4082bc010b am: 5b2da73fa3 am: 8a3781df49 am: 47313fedf1
am: 4d7a214df6

Change-Id: I7411cf45dafe63525df871ba7052aa1540a4d951
2019-08-29 16:18:49 -07:00
Mathieu Chartier
4d7a214df6 Merge "Clean up class preloading" am: 4082bc010b am: 5b2da73fa3 am: 8a3781df49
am: 47313fedf1

Change-Id: I8c0795592ebc008a63cdef02194c76c19be9fb53
2019-08-29 15:59:28 -07:00
Mathieu Chartier
47313fedf1 Merge "Clean up class preloading" am: 4082bc010b am: 5b2da73fa3
am: 8a3781df49

Change-Id: I925808dc2e79b928692833b22d6d8667cff748dc
2019-08-29 15:40:58 -07:00
Mathieu Chartier
5b2da73fa3 Merge "Clean up class preloading"
am: 4082bc010b

Change-Id: I719d2a223a1ab17aed832b618e26091cb3e368e8
2019-08-29 15:23:26 -07:00
Mathieu Chartier
83bea97333 Clean up class preloading
Remove logic to set heap target utilization to 0.8. The default is
0.75 and this should not have any fragmentation benefit since the
GC is compacting.

Removed some unused logging and a variable.

Test: TH

Change-Id: Ife7219e94fa0aa7f489569e16248cdd23d09089a
2019-08-29 12:03:09 -07:00
Rubin Xu
6762470fc2 Merge "Make DPM.isActivePasswordSufficient() synchronous again" 2019-08-29 12:24:00 +00:00
Tobias Thierer
92d2e65f0f Merge changes from topic "bug136256059_revert" am: aff95e5e7c am: 2d7cc3acf3 am: 2cf0f7a6c3 am: 0e77247fee
am: 901f252e89

Change-Id: I89ff2c864f64f8f6498adcacba7eaed8026afcee
2019-08-29 04:14:19 -07:00
Tobias Thierer
419d70912f Revert "Tweak RuntimeInit docs around MimeMap registration." am: 89bcfa5a21 am: f4cbf933b7 am: aa9b7696d1 am: 1b41ce4701
am: 1080bcbc06

Change-Id: Iec378b5d1ab929bb892436f1f6f58c1c8fe43dd0
2019-08-29 04:14:10 -07:00
Tobias Thierer
901f252e89 Merge changes from topic "bug136256059_revert" am: aff95e5e7c am: 2d7cc3acf3 am: 2cf0f7a6c3
am: 0e77247fee

Change-Id: Iff8a4d3a293f0aa7414b69d57e9f6e216f9ff44f
2019-08-29 04:01:43 -07:00
Tobias Thierer
1080bcbc06 Revert "Tweak RuntimeInit docs around MimeMap registration." am: 89bcfa5a21 am: f4cbf933b7 am: aa9b7696d1
am: 1b41ce4701

Change-Id: I9eda7d07d5b51aefcff9f6ce798214993cac5976
2019-08-29 04:01:36 -07:00
Tobias Thierer
0e77247fee Merge changes from topic "bug136256059_revert" am: aff95e5e7c am: 2d7cc3acf3
am: 2cf0f7a6c3

Change-Id: I4d7290175f5f5b41909c5428b66439402f22d12b
2019-08-29 03:50:24 -07:00
Tobias Thierer
1b41ce4701 Revert "Tweak RuntimeInit docs around MimeMap registration." am: 89bcfa5a21 am: f4cbf933b7
am: aa9b7696d1

Change-Id: Ice18e8e9e599856e12406b1190250477e58507ab
2019-08-29 03:49:53 -07:00