Commit Graph

19874 Commits

Author SHA1 Message Date
Ashwini Oruganti
4469d60ce5 Merge "Relax the PI mutability flag requirement for apps under instrumentation" 2021-01-21 19:55:45 +00:00
Kholoud Mohamed
4299ba40d7 Merge "Add new API createAndProvisionManagedProfile in DPM" 2021-01-21 18:17:00 +00:00
TreeHugger Robot
a8786df7e1 Merge "Correct IntentService docs" 2021-01-21 17:25:47 +00:00
Ashwini Oruganti
6fa883e146 Relax the PI mutability flag requirement for apps under instrumentation
This gives us some buffer time to help transition all the test apps.
See go/immutable-pendingintents for more context.

Bug: 160794467
Test: TH
Change-Id: I2265dc8a5e86ac76e615e659169f8891e8a7ed75
2021-01-21 09:10:57 -08:00
Kholoud Mohamed
1fd29fb751 Add new API createAndProvisionManagedProfile in DPM
Refactored the PO provisioning logic out of Managed
Provisioning into a new SystemAPI,
this new API will now be called by MP
and CTS tests, allowing us to get rid of silent provisioning.
Most of the code in ManagedProfileProvisioningHelper has been
copied over from the MP tasks with slight modifications to
call internal methods instead of public APIs for example.
The main is difference is a newly added broadcast
ACTION_MANAGED_PROFILE_CREATED to notify MP to take a snapshot
of current system apps and cross profile packages.

Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Bug: 176973247
Change-Id: I3e234733f400e088a87fcc8b2985eafbb63ef539
2021-01-21 15:06:55 +00:00
Wale Ogunwale
17d13191a1 Merge "Add support for ActivityOptions#setLaunchRootTask" 2021-01-21 13:42:32 +00:00
Michael Groover
af1fafe936 Merge "Add StrictMode check for unsafe intent launching" 2021-01-21 01:06:20 +00:00
Treehugger Robot
df24f2b2d9 Merge "Update OWNERs for SystemUI related files" am: c235d21e22 am: 28314791ca am: d3c6961f23
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554781

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifeb5de8253ccd3c27ad69b325200d5b7dd1e38d2
2021-01-20 23:24:07 +00:00
Ashwini Oruganti
a227fb58d3 Merge "Enforce that a PendingIntent has an explicit mutability flag on creation." 2021-01-20 22:41:22 +00:00
Treehugger Robot
d3c6961f23 Merge "Update OWNERs for SystemUI related files" am: c235d21e22 am: 28314791ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554781

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I01b3060f02f5930185e08b4bbf80a65583b9d2c6
2021-01-20 22:12:02 +00:00
TreeHugger Robot
47eb18a540 Merge "Make DecoratedCustomViewStyle notifications consistent." 2021-01-20 21:06:01 +00:00
Jeff Sharkey
6728d4f92c Add StrictMode check for unsafe intent launching
Exported components that are not guarded by a signature permission
can receive Intents from any other app on a device. If an app unparcels
and launches an Intent from the Intent delivered to this unprotected
component then a malicious actor can potentially craft an Intent that
could launch hidden components, grant URI permissions, etc. This
commit adds a StrictMode check to report if a component launches an
Intent unparceled from the delivered Intent.

Bug: 160796858
Test: atest StrictModeTest
Change-Id: I763b8a965f91f5b433ce2f4b619e10ef12f5c296
2021-01-20 13:05:09 -08:00
Wale Ogunwale
b819178d2f Add support for ActivityOptions#setLaunchRootTask
Allows a caller to set the root task for the launching activity.

Bug: 176061049
Test: Existing test pass.
Change-Id: Id101ba8784c8e4151fa5958e6ec2e57e572f0e87
2021-01-20 12:20:04 -08:00
Garfield Tan
0854032df3 Merge "Notify moveTaskToBack to TaskStackListeners." 2021-01-20 18:39:07 +00:00
Chloris Kuo
c8d49fcef8 Merge "Add NAS#onNotificationClicked API and TestAPI for cts test" 2021-01-20 18:34:17 +00:00
Julia Reynolds
ac5a4c4868 Update OWNERs for SystemUI related files
Change-Id: Ide8f8bcdea46b431d1f401f1da9514d577856e0f
2021-01-20 18:28:33 +00:00
Philip P. Moltmann
52ec389661 Merge "Describe how data access auditing works internally" 2021-01-20 17:58:03 +00:00
Hui Yu
6f5d17de8e Merge "BOOT_COMPLETED broadcasts are temp allowlisted to start FGS." 2021-01-20 17:16:00 +00:00
Jeff DeCew
56a643892e Make DecoratedCustomViewStyle notifications consistent.
Until now, we showed the collapsed state of DecoratedCustomViewStyle in two different ways depending on the target of the app.  In particular, we forced an awkward top line of views above the custom view for apps that didn't target S to ensure the context of the "subtext" was not lost from those notifications.  However, that context is available on expansion, and we think it's better if all apps get the same, more visually consistent behavior, regardless of the targeted SDK. 

Bug: 163626038
Change-Id: Ie50320566a97c8c05148857a6c4283a8870a833d
Test: manual
2021-01-20 17:05:01 +00:00
Alex Johnston
36df85a2ac Merge "Disable IME on the personal profile" 2021-01-20 16:41:06 +00:00
TreeHugger Robot
795872a444 Merge "Fix granting default roles timeout." 2021-01-20 16:02:01 +00:00
Jeff DeCew
98668dc59c Merge changes from topic "promote_big_picture"
* changes:
  Unhide the API to promote the picture
  Add (still hidden) API to promote the big picture to the collapsed state
2021-01-20 15:15:02 +00:00
TreeHugger Robot
b4707f9a04 Merge "Option to skip profile password requirement during password enrolment" 2021-01-20 14:40:24 +00:00
Hai Zhang
907dcf8fb8 Fix granting default roles timeout.
The RoleControllerManager takes a Handler for service connection
callbacks, and that Handler has to be a thread other than the main
thread inside system server because we need to block the main thread
before necessary permissions are granted via role.

However, since a recent change that exposed RoleControllerManager APIs
on RoleManager instead to hide this implementation detail from API, we
are creating the RoleControllerManager instance upon RoleManager
creation and implicitly initializing it with the main thread
Handler. This may result in the RoleControllerManager getting the main
thread handler instead of the desired foreground thread handler if
someone else in the system server created RoleManager first, and that
would create a deadlock when we block the main thread.

So revert to the original timing for RoleControllerManager creation by
creating it lazily, so that it gets the correct handler as the only
user of it inside system server is RoleManagerService, and other
services who only need the RoleManager won't affect
RoleControllerManager.

Fixes: 177251364
Test: manual
Change-Id: I649a23fa3b88fbd9120b3de408eee8a590d50a17
2021-01-20 04:57:45 -08:00
Ashwini Oruganti
9b9d10ff89 Enforce that a PendingIntent has an explicit mutability
flag on creation.

This was previously a log.e, this change enforces this requirement
except when an app is under instrumentation.
See go/immutable-pendingintents for more context.

Bug: 160794467
Test: atest PendingIntentTest
Change-Id: I6506dd311f2e440ad74fdf4f5aa447ea471a02f4
2021-01-19 22:48:44 -08:00
TreeHugger Robot
3f8337ff57 Merge "Add APIs that can notify client ui translation state." 2021-01-20 04:43:54 +00:00
Christopher Tate
32b80b500f Correct IntentService docs
Extends Service, not a base class of it.

Bug: 147564984
Test: build reference docs (m offline-sdk-docs)
Change-Id: Idf0a52d59062be36827e27eea076c744152a676c
2021-01-19 14:24:10 -08:00
Guojing Yuan
9dd8bfc9bc Merge "Separate FINE and COARSE location ops" 2021-01-19 22:07:26 +00:00
Hui Yu
bc503754fd Merge "DeviceIdleController updates AMS with temp allowlist type." 2021-01-19 21:52:26 +00:00
Hui Yu
40f1d90379 BOOT_COMPLETED broadcasts are temp allowlisted to start FGS.
Broadcast receiver ACTION_BOOT_COMPLETED, ACTION_LOCKED_BOOT_COMPLETED and
ACTION_PRE_BOOT_COMPLETED are temp allowlisted to start FGS for a duration
 of 10000 milliseconds.

The temp allowlist duration can be changed by device_config command, for
example:
adb shell device_config put activity_manager boot_time_temp_allowlist_duration 10000

Bug: 175253292
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
Change-Id: I0ff5b405b75a39a65ddb742382a970499ed6546b
2021-01-19 12:45:42 -08:00
Chloris Kuo
dde50e8d10 Add NAS#onNotificationClicked API and TestAPI for cts test
Bug: 177032312
Test: atest NotificationListenerServiceTest
Test: atest NotificationManagerServiceTest
Change-Id: Ia11693c39c184a3c26c099acbc5dc6a3d5e8acd2
2021-01-19 12:20:34 -08:00
Philip P. Moltmann
7500cb33e5 Describe how data access auditing works internally
Test: Docs only
Change-Id: I77fbf423d1c567c64ddd0105f293a972460e46a9
2021-01-19 10:43:18 -08:00
Miranda Kephart
302cd6f87b Merge "Add shared transitions from screenshot to markup" 2021-01-19 18:38:47 +00:00
Alex Johnston
e066d89b22 Disable IME on the personal profile
Background:
* On organization-owned devices with managed profiles,
  the work admin needs to be able to restrict
  IMEs on the personal side.
* They should be able to restrict IMEs without having
  visibility on the personal side. This is done by
  introducing the ability for the admin to set the
  permitted IMEs on the parent profile.

Changes:
* Update DPM permitted input methods apis to be
  callable on the parent profile.
* Update RestrictedLockUtilsInternal to check the
  permitted input methods on the parent profile

Manual test steps:
* Set up organization-owned device and download
  IME apps on the personal profile
* Download TestDPC
* Select prefence Set input methods on parent
* Select allow only system IMEs and check Settings to see
  all non-system IMEs are disabled.
* Select allow all IME apps and check Settings to see
  no IME apps are disabled.

Bug: 170459562
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.settingslib.RestrictedLockUtilsTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPermittedInputMethods
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPermittedInputMethodsLogged

Change-Id: Iecd19adb6d3ca064a8d7f9ff0c1c41aa64bd6ace
2021-01-19 18:33:45 +00:00
Garfield Tan
ae4bcbb2a8 Notify moveTaskToBack to TaskStackListeners.
Bug: 170700733
Bug: 177440073
Test: Builds.

Change-Id: Ibd66bbd006a156c443f78b14b24baaa955cebd16
2021-01-19 10:24:26 -08:00
Iavor-Valentin Iftime
6638b0d2c8 Merge "Add start/stopProfile @SystemApi" 2021-01-19 18:18:55 +00:00
Hui Yu
19b558678d DeviceIdleController updates AMS with temp allowlist type.
1. add a "type" parameter to AMS.updateDeviceIdleTempWhitelist() which is
called by DeviceIdleController.
2. The default temp allowlist type is TEMPORARY_WHITELIST_TYPE_FOREGROUND_SERVICE_ALLOWED
which allows BG-FGS launch.
3. AMS.tempWhitelistUidLocked() already has a type parameter. Other API
to add temp allowlist can also add type parameter other than the
default.

Bug: 175244558.
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java

Change-Id: Ib42c445c15966bd260964782a7254ed2a7ffa405
2021-01-19 10:01:12 -08:00
Saumya Pathak
c7640aa6d0 Merge "Adding StorageStats API to get external cache size" 2021-01-19 17:20:23 +00:00
Rubin Xu
5eab037be5 Option to skip profile password requirement during password enrolment
Add a new extra for ACTION_SET_NEW_PARENT_PROFILE_PASSWORD which will
allow the flow to not enforce password requirement coming from the
profile side. This is to enable better password enrolment flow when
the DPC is guiding the user to enrol both a personal and work lock.

Bug: 169832516
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Change-Id: Idb33418f3e532dffc96ccb907f5cae0b6185173e
2021-01-19 15:36:05 +00:00
Julia Reynolds
10395bf408 Merge "Add retention policy to delete channels" 2021-01-19 14:54:56 +00:00
Ahaan Ugale
feb36772c7 Add APIs that can notify client ui translation state.
The initial APIs for ui translation. There is no implementation in
this change, we will implement it in the next CL.

Bug: 172969740
Bug: 176871912
Test: manual. build pass and build success.

Change-Id: I4ae0bc7a695076a87bed73e458396312d87f48c5
2021-01-19 19:09:23 +08:00
Jeff DeCew
16a62a9ac5 Unhide the API to promote the picture
Fixes: 177698229
Test: atest NotificationTemplateApi30Test
Test: atest CtsAppTestCases:NotificationTemplateTest
Change-Id: Id8c9d957a00ab441539d2ecb2e7463beebc07a84
2021-01-18 19:40:37 -05:00
Jeff DeCew
090d5b0c0d Add (still hidden) API to promote the big picture to the collapsed state
Bug: 177698229
Test: atest NotificationTemplateApi30Test
Test: atest CtsAppTestCases:NotificationTemplateTest
Change-Id: I9df6edb4cc7c49430e3c0f3c231d44c1fceab440
2021-01-18 19:40:36 -05:00
Martijn Coenen
7d6f488c29 Merge "Make releaseSomeActivities() a oneway call." am: 2da2fdc519 am: 76398b631a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552466

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8089ca93bcafa65dde7e7db141d1a5306afec151
2021-01-18 14:45:56 +00:00
Saumya Pathak
d2486196e6 Adding StorageStats API to get external cache size
Test: atest StorageHostTest and also manually using StorageTestApp
to use the API and display the cache size.

Bug: 175016452
Change-Id: Iff0503c1643ee5fc501037e413aa4b5461ca3388
2021-01-18 13:28:29 +00:00
Martijn Coenen
5363b0671d Make releaseSomeActivities() a oneway call.
This is called from a GC handler hook in BinderInternal, from the
finalizer thread. It's a call from an app process into system_server. On
some devices, we observed this call taking a long time, causing
TimeoutExceptions on the finalizer thread.

Since this work is not critical, and when the GC runs is anyway
unpredictable, make releaseSomeActivities() oneway instead.

Bug: 118997212
Test: TH
Change-Id: I6b06917493a09a2fba63502c4bd1a203c184a62c
Merged-In: I6b06917493a09a2fba63502c4bd1a203c184a62c
2021-01-18 09:46:10 +01:00
TreeHugger Robot
77e33e1a9e Merge "Limit UI context verification to UI related APIs" 2021-01-18 07:21:14 +00:00
Charles Chen
9ca5f902ca Limit UI context verification to UI related APIs
This CL relaxed the UI context checks to only apply on UI related
APIs in WallpaperManager.

Test: build & run
Bug: 176958992

Change-Id: I390e865e31fde48bad6bbddb4203e4c997a1400a
2021-01-18 12:37:06 +08:00
Hyunyoung Song
16db752947 Merge "Fix SearchAction parceling error" 2021-01-17 06:05:03 +00:00
arangelov
f446e9fc1d Add EXTRA_PROVISIONING_RETURN_BEFORE_POLICY_COMPLIANCE extra
This extra allows the provisioning initiator to determine
whether provisioning should be split into two (provisioning
part and DPC setup part) or be a single flow.

If set to true, it is the responsibility of the provisioning
initiator to resume provisioning. This is basically the
setup wizard.

Fixes: 177330679
Test: this extra will be testsed in ManagedProvisioning code
Change-Id: If8b301ef676bb8b15d974ddc898420978de08f84
2021-01-16 01:47:54 +00:00