Commit Graph

103237 Commits

Author SHA1 Message Date
Chalard Jean
33accffcef Merge changes from topic "networkagent_api" into rvc-dev
* changes:
  Update NetworkAgentConfig API for council comments
  Update the NetworkAgent API for council comments
2020-03-27 06:20:37 +00:00
Kenny Root
f377275542 Merge "Resume-on-Reboot: change SystemApi calls slightly" into rvc-dev 2020-03-27 05:14:10 +00:00
Winson Chung
fa6a50484b Merge "Skip excluded MW mode tasks from recents and running tasks" into rvc-dev 2020-03-27 02:37:10 +00:00
Andrii Kulian
363edf449a Merge "Report bounds instead of size in WindowMetrics" into rvc-dev 2020-03-27 01:08:37 +00:00
Matt Pietal
e1e4e04ffe Merge "Controls UI - Support remaining confirmation dialogs" into rvc-dev 2020-03-26 23:06:36 +00:00
Dmitri Plotnikov
f7b0b5a373 Merge "Propagate exception thrown by ContentProvider.canonicalize" into rvc-dev 2020-03-26 23:03:31 +00:00
Ricardo Correa
cc25d392fe Merge "Revert "Include an AppOp to allow dialer role app to record and play audio into calls"" into rvc-dev 2020-03-26 22:23:54 +00:00
Todd Kennedy
fb590035e1 Merge "Define permission for installer API v2" into rvc-dev 2020-03-26 21:50:17 +00:00
Kenny Root
625bcd2eeb Resume-on-Reboot: change SystemApi calls slightly
In response to feedback, remove boolean returns and rely on exceptions
to provide detail descriptions.

Test: make # using a test app that calls the API using old signature
Test: atest FrameworksServicesTests:RecoverySystemServiceTest
Bug: 150205125
Change-Id: I95930078df9c88194f21b38ff7d96b425db47d56
2020-03-26 12:23:11 -07:00
Ricardo Correa
acdc827501 Revert "Include an AppOp to allow dialer role app to record and play audio into calls"
This reverts commit e96b5668b3.

Reason for revert: Feature has been postponed
Bug: 151761909

Change-Id: I7db5fb79d52b3da33b84bb07d1f612be760299c2
2020-03-26 11:57:01 -07:00
Matt Pietal
ea87e741f1 Controls UI - Support remaining confirmation dialogs
Add support passphrase and ack dialogs. Passphrase should use the
exact same text and dialog as the PIN dialog, only defaulting to text
input.

Bug: 152517004
Test: Controls Mock App supports launching all dialog types
Change-Id: I3ebd51d656818f8edad9b70ccc8f0b89d6d8acc6
2020-03-26 14:55:20 -04:00
Adam He
cc45f332a4 Merge "Fix single field highlighting for autofill." into rvc-dev 2020-03-26 18:46:29 +00:00
Alex Johnston
7bd3e833ce Merge "Make FRP APIs callable by Settings" into rvc-dev 2020-03-26 12:58:48 +00:00
TreeHugger Robot
e5d60ed552 Merge "Do not mount whitelisted package in storage data and obb dirs" into rvc-dev 2020-03-26 11:01:12 +00:00
Alex Kershaw
59da30ff38 Merge "Add hidden API to clear all cross-profile app-ops" into rvc-dev 2020-03-26 10:52:39 +00:00
Charles Chen
0cb6d3fd3d Merge "Rename createBaseActivityResources to createBaseTokenResources" into rvc-dev 2020-03-26 02:40:47 +00:00
Dmitri Plotnikov
da4f3c8353 Propagate exception thrown by ContentProvider.canonicalize
Test: atest FrameworksCoreTests:android.content.ContentResolverTest
Fixes: 149184281
Change-Id: Id200748c9d54222aaf669209a43cbaa5675d8331
2020-03-25 18:34:11 -07:00
Jing Ji
52f4d8d9f2 Merge "Update doc for ApplicationExitInfo.getDefiningUid" into rvc-dev 2020-03-26 00:43:33 +00:00
Menghan Li
fea8d184c2 Merge "Accessibility Service & Shortcut Redesign - Remove “volume key shortcut” setting (5/n)" into rvc-dev 2020-03-26 00:21:50 +00:00
Hui Yu
56e3510bda Merge "Add isUidActiveOrForeground() for camera/audio to use." into rvc-dev 2020-03-25 23:47:51 +00:00
Ahaan Ugale
56cfc32424 Merge "Don't filter pinned inline suggestions." into rvc-dev 2020-03-25 22:20:21 +00:00
Kevin Chyn
127e3957d6 Merge changes I704914b2,I51560dfc,I866e84b2 into rvc-dev
* changes:
  Allow BIOMETRIC_CONVENIENCE to register with BiometricService
  Improve AuthService logging
  Only BIOMETRIC_STRONG HATs should be sent to KeyStore
2020-03-25 22:10:14 +00:00
TreeHugger Robot
d60a2bd945 Merge "Make OP_LEGACY_STORAGE stickiness configurable" into rvc-dev 2020-03-25 21:16:01 +00:00
TreeHugger Robot
368c03efeb Merge "Expand javadoc based on API Council comment." into rvc-dev 2020-03-25 20:54:57 +00:00
Adam He
e2dbbce0dd Fix single field highlighting for autofill.
Bug: 150953184
Test: manual verification
Change-Id: I0519fe7c1d1d08cbee4c1703c1ad263a6eb7ef20
2020-03-25 13:30:24 -07:00
Alex Johnston
103f93a7e6 Make FRP APIs callable by Settings
Background
* If the device is an organization-owned managed
  profile device and a FRP policy is set, the
  factory reset protection data is no longer
  erased from factory reset in Settings.

Changes
* Added isNotEmpty method to FRP policy.
* Allow Settings to call
  getFactoryResetProtectionPolicy
  by checking for the MASTER_CLEAR permission.

Bug: 148847767
Test: manual testing
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I04f178255dd215579087c33b675b40eed7a6eac7
2020-03-25 20:16:28 +00:00
Todd Kennedy
66ed8dff37 Define permission for installer API v2
The package installer v2 APIs were marked as @SystemApi merely as
a convenience for development. These APIs may change in the next
version of Android and their usage must be strictly controlled.

Bug: 151716357
Test: Manual. Use old Shell and see that incremental installation fails with a SecurityException
Test: Manual. Request INSTALLER_V2 permission for shell and see that incremental installation succeeds
Change-Id: I9612dc145eadda20083bcc43e7a35ef3cd90aa40
2020-03-25 12:57:05 -07:00
Rob Carr
f7de7b6811 Merge "SurfaceControlViewHost: Enable HARDWARE_ACCLERATION by default" into rvc-dev 2020-03-25 19:44:16 +00:00
Alex Kershaw
ec19b8d075 Add hidden API to clear all cross-profile app-ops
Reset the INTERACT_ACROSS_PROFILES app-op for all apps on the device
when creating a new work profile. This ensures that user grants for
previous work profiles (perhaps with a different admin) are not saved
and also not restored with backup-and-restore.

Also, clear the shared preference storing which oem-whitelisted apps the
user has granted. This ensures that the user sees them all again
during work profile provisioning.

Fixes: 151145623
Test: atest com.android.managedprovisioning.task.CreateManagedProfileTaskRoboTest
Change-Id: I5f5c5aea1c36bd17a74c02e1b6fa9b4047f15003
2020-03-25 18:21:19 +00:00
Tiger Huang
d10a12cf27 Merge "Make canBeImeTarget be compatible with legacy behavior" into rvc-dev 2020-03-25 17:36:56 +00:00
Dmitri Plotnikov
f903ef10e5 Merge "Propagate exception thrown by ContentProvider.getType" into rvc-dev 2020-03-25 17:24:31 +00:00
Hui Yu
9b52815e71 Add isUidActiveOrForeground() for camera/audio to use.
Currently CameraService calls isUidActive() before allowing the camera
access.

When start/resume activity, WindowManagerService start/resume the
activity, then post a runnable to DiaplayThread and
ActivityManagerService to update UidRecord's
proc state, because the thread switch, the latency before proc
state update is undetermined.

When CameraService calls ActivityManagerService.isUidActive(), the proc
state may not have been updated and camera access is denied.

isUidActiveOrForeground() check isUidActive() first, if false,
check isUidForeground() which is actually to check with WindowManagerService if
the uid is foreground, which is equivalent to ActivityManagerService's uid
active, just updated earlier.

Bug: 151185692, 151777097, 109950150
Test: manual test.
Change-Id: Iffed63293dbdb466e7955fe765ad2aa23a20b3ed
2020-03-25 10:06:14 -07:00
Eugene Susla
2f54a864d5 Merge "Switch auto-revoke manifest flag to a tri-state" into rvc-dev 2020-03-25 17:03:32 +00:00
Ricky Wai
2cd955e79d Do not mount whitelisted package in storage data and obb dirs
We now pass 2 booleans from AM to zygote about:
- If CE and DE data dirs need to be mounted
- If storage data and obb dirs need to be mounted

And also, separate whitelisted package from same uid packages, as same
uid packages do not need to be mounted in storage data and obb dir case,
it's needed to be mounted for CE and DE data dirs only. Otherwise
whtelisted packages will also be mounted in storage data and obb dirs,
which apps should not have access to it.

Bug: 151218156
Test: atest AdoptableHostTest
Change-Id: If7c20a7ed3b845d8657c937469161cb7ed3da07f
2020-03-25 16:40:46 +00:00
Winson Chung
e5ab0170f8 Skip excluded MW mode tasks from recents and running tasks
- Skip multi-window mode tasks with the exclude-from-recents flag from
  the visible recent tasks list
- Expose a method in LauncherApps to be able to start a shortcut with
  additional intent flags (to add the exclude-from-recents flag)
- Remove unused ActMan path (only ActTaskMan call is used now)
- Refactor the call to get the running tasks, there are currently only
  two usages of getFilteredTasks(), one is to get all the tasks, the
  other is really to get tasks that we will end up using for transitioning
  into the task in recents.

  As such, we can remove the individual ignore flags (it would get more
  complicated if we wanted to filter based on logic like MW mode +
  excluded recents only), and instead have a boolean that filters the
  running tasks based on whether they would ever show in recents at all,
  with the exception of the home and recent tasks.

Bug: 152133859
Test: atest WmTests:RunningTasksTest
Test: atest WmTests:RecentTasksTest
Change-Id: Ia4f5fd37228c72ce449490f948e923afba821bb2
Signed-off-by: Winson Chung <winsonc@google.com>
2020-03-25 09:29:29 -07:00
TreeHugger Robot
aa9b7407da Merge "Don't include the data dir in zygote library paths." into rvc-dev 2020-03-25 16:27:52 +00:00
Winson Chung
7da77f4141 Merge "Ensure previous background color is reapplied when showing a SurfaceView" into rvc-dev 2020-03-25 16:20:58 +00:00
shafik
76735f666a Make OP_LEGACY_STORAGE stickiness configurable
OP_LEGACY_STORAGE is sticky for apps targeting <= Q.
This change makes this behaviour configurable via DeviceConfig, by
introducing a new property "legacy_storage_op_sticky" to existing
namespace "storage_native_boot". If the property is set to true, then
we get the default behaviour (app-op sticky for SDK<=Q). If it's set to
true, then the app-op is not sticky for SDK<=Q.

Apps targeting > Q remain unaffected: always not sticky.

Test: manual:
    * adb shell dumpsys appops --package com.android.vending
    * Observe LEGACY_STORAGE mode=allowed
    * adb shell device_config put storage_native_boot legacy_storage_op_sticky false
    * adb reboot
    * adb shell dumpsys appops --package com.android.vending
    * Observe LEGACY_STORAGE mode=ignored
Bug: 151735608
Change-Id: I06d115a0c85c44b5a6d1054f74a00d8fa674dfa7
2020-03-25 15:49:10 +00:00
Torne (Richard Coles)
465c5fb2a3 Don't include the data dir in zygote library paths.
When creating a LoadedApk in a zygote context (app zygote or WebView
zygote), don't add the app's data dir to the list of paths the dynamic
linker is allowed to load libraries from, because the linker's attempt
to canonicalize the path causes SELinux access denials. The process
can't access the data directory at all, so cannot load libraries from
there in any case.

Fixes: 149481620
Test: check for avc denials from webview_zygote
Change-Id: I9aceecaf6067e748cc2251782b0f41661cbb35d8
(cherry picked from commit e1579d4d14)
2020-03-25 14:24:24 +00:00
Chalard Jean
1d2d35d049 Update NetworkAgentConfig API for council comments
Bug: 152238712
Test: FrameworksNetTests NetworkStackTests
Change-Id: Idca9f243a5c955f4caa30921ee520e1a93b0d11a
2020-03-25 22:43:13 +09:00
Chalard Jean
f1dec6101b Update the NetworkAgent API for council comments
Bug: 152238712
Test: FrameworksNetTests NetworkStackTests
Change-Id: I9a2691f783f4449348c3f767568e05620f0b9df5
2020-03-25 22:35:41 +09:00
TreeHugger Robot
fc099117fc Merge "BluetoothHearingAid System APIs now throw an exception if a null BluetoothDevice is passed in" into rvc-dev 2020-03-25 13:35:10 +00:00
Chalard Jean
09b1ee6077 Merge "Allow MANAGE_TEST_NETWORKS to register limited agents" into rvc-dev 2020-03-25 13:15:46 +00:00
Martijn Coenen
1152370510 Merge "Add (hidden) fixupAppDir() API." into rvc-dev 2020-03-25 12:56:47 +00:00
TreeHugger Robot
b04ab6ceb1 Merge "Fix false positive of activity leak in NexusLauncherTests" into rvc-dev 2020-03-25 11:36:11 +00:00
Chalard Jean
09c48e4a2d Allow MANAGE_TEST_NETWORKS to register limited agents
This puts in force some restrictions against test networks,
and in exchange relaxes the restrictions around registering
a network agent that provides a test network.
Test networks can only ever have transport TEST, and have
only a few capabilities available to them.

This is useful in particular to test CTS. See aosp/1253423
for first, basic usage of this capability.

Test: IpSecManagerTunnelTest
Test: new CTS aosp/1253423
Bug: 139268426

Change-Id: Ibd162792a7ab02fcbb06130f21a825a386678c05
(cherry picked from commit 2c129e97cc)
2020-03-25 10:43:26 +00:00
Galia Peycheva
389580c7da Merge "Create ACTIVITY_TYPE_DREAM" into rvc-dev 2020-03-25 10:23:47 +00:00
Shu Chen
27daeb0307 Merge "Calculates the slop values per upper/lower line height." into rvc-dev 2020-03-25 09:54:48 +00:00
Bernardo Rufino
7afc8b101b Merge "Gate toast block and remove warning" into rvc-dev 2020-03-25 09:32:40 +00:00
Aaron Huang
9c9366b2df Merge "API review: make exception class and Builder final" into rvc-dev 2020-03-25 09:29:33 +00:00