Commit Graph

23265 Commits

Author SHA1 Message Date
Julia Reynolds
ddfeaa18f7 Merge "Fix blockable system notifications" into tm-dev 2022-05-12 11:55:40 +00:00
Kholoud Mohamed
e563a237aa Merge "Add missing enterprise updatable strings in SysUI" into tm-dev 2022-05-12 11:44:21 +00:00
Ruslan Tkhakokhov
a3a657350a Merge "Make BackupTransport more resilient" into tm-dev 2022-05-12 09:11:13 +00:00
TreeHugger Robot
e10b6c4df4 Merge "Add excludedPackages parameter to broadcast" into tm-dev 2022-05-12 01:46:39 +00:00
Nate Myren
7a9cf44cfe Merge "Note RECEIVE_AMBIENT_TRIGGER_AUDIO in the SoundTrigger" into tm-dev 2022-05-11 22:00:35 +00:00
Julia Reynolds
756a475be5 Fix blockable system notifications
Notifications can be non-blockable if their app has the
permission fixed or if the app holds certain roles.

Calculate that on device boot and role change, and use the same
source of truth for all UIs. As a bonus, we can remove some
systemui binder calls.

Test: SystemUiTests & FrameworkUiServicesTests
TesT: verify that 'usb debugging connected' notifs are non blockable
but magnification ones are, in systemui and settings
Fixes: 231662091

Change-Id: I980718ab61196901d976f9ea8ee035eafc021fc8
2022-05-11 21:37:44 +00:00
Pavel Grafov
20bd378d55 Merge "Allow profile owners to protect packages." into tm-dev 2022-05-11 20:17:32 +00:00
Jonathan Scott
7b11af45d1 Merge "Revert "RESTRICT AUTOMERGE Add feature flag to disable resource updatability APIs"" into tm-dev 2022-05-11 20:04:06 +00:00
Kholoud Mohamed
00c0a92877 Revert "RESTRICT AUTOMERGE Add feature flag to disable resource updatability APIs"
This reverts commit 50f529a1e1.

Reason for revert: b/232270123

Change-Id: Iddf33e62e733bfeafc93e15c90c4978087a28829
2022-05-11 19:15:49 +00:00
Evan Severson
1968e5df71 Add excludedPackages parameter to broadcast
This parameter is useful for when a broadcast's intent is not targeting
specific package and it is not wanted to be delievered to a specific
one.

Test: Install two apps and create shell command argument to exlude
        packages, verify the correct packages can receive or get
	skipped. Verified with manifest and registered receivers.
Bug: 231635380
Bug: 210118427

Merged-In: I9a331f71c7052b294d4eada0f0f658dba989d881
Change-Id: I9a331f71c7052b294d4eada0f0f658dba989d881
2022-05-11 18:48:35 +00:00
Tom Chen
c6caf1cfdc Merge "[DO NOT MERGE] T Subcard logging - Media Card code path" into tm-dev 2022-05-11 17:14:44 +00:00
Kholoud Mohamed
e875e822a9 Merge "RESTRICT AUTOMERGE Add feature flag to disable resource updatability APIs" into tm-dev 2022-05-11 16:42:45 +00:00
TreeHugger Robot
d0f6ad2f30 Merge "Reland: Change input injection security model" into tm-dev 2022-05-11 13:12:38 +00:00
Ayush Sharma
7e71b424c1 Merge "Add string for set separate work lock link" into tm-dev 2022-05-11 12:56:44 +00:00
Ruslan Tkhakokhov
3f82689d2b Make BackupTransport more resilient
Currently, if the transport implementation throws an exception, the
framework will wait for response for the full timeout duration (10
minutes) before aborting the operation (see attached bug).

1. Add exception handlers to the transport wrapper that runs on the
   remote side (i.e. transport implementation side) - while exceptions
   are no longer propagated to system_server with introduction of async
   transport, we'd still like to know when one occurs to stop waiting
   for response (instead of relying on timeout).
2. Reduce the 10-minute timeout to 5 minutes - our data shows this is a
   reasonable value.

Bug: 229670840
Test: 1. Manual (test B&R of any app)
      2. atest CtsBackupHostTestCases
Change-Id: Id97fa470fae65efc0ad587615a6e9edfd1e5f298
2022-05-11 11:40:39 +00:00
kholoud mohamed
759a42f723 Add missing enterprise updatable strings in SysUI
Bug: 231592687
Fixes: 231592329
Fixes: 231576660
Test: manual
Change-Id: I45a087e83b2116917b1681e3e21c5db40cdf4167
2022-05-11 09:07:17 +00:00
kholoud mohamed
50f529a1e1 RESTRICT AUTOMERGE Add feature flag to disable resource updatability APIs
Bug: 225178429
Test: manual
Change-Id: I21c5fd224911a8e3f921a8f0c88aea292377e9d5
2022-05-11 09:06:23 +00:00
Prabir Pradhan
0f9ea02be0 Reland: Change input injection security model
This reverts commit 6b3c6cae3f.

Changes from revert:
- Explicitly maintain the same behavior as previous versions of Android,
  where injection is allowed into all window if the caller has the
  INJECT_EVENTS permission, even if it is targeting a certain uid. This
  fallback will be removed separately in b/228161340.
- Clear the calling identity before checking if the injection source has
  a permisssion to avoid hitting blanket-checks in PackageManager that
  denys permissions in some cases, such as if the permission check call
  is coming from an instant app (b/228319794).
- Leave the existing IInputManager#injectInputEvent method signature
  unchanged, and add a new input method injectInputEventToTarget to
  perform targeted injection. This makes it so that tools or apps
  relying on the @UnsupportedAppUsage injection method will not be
  broken by a change in the method's signature (b/228583652).

Bug: 207667844
Bug: 194952792
Test: Run tests affected by b/228319794 and its duplicates using
cts-tradefed, so that they are also run as instant apps.
Test: Test scrcpy tool works locally

Change-Id: I503e4f087501e3aecf2c18b4b1d27e51ecda59ac
Merged-In: I503e4f087501e3aecf2c18b4b1d27e51ecda59ac
2022-05-10 18:40:32 +00:00
Cecilia Hong
2ec2deea7d Merge "Fix the UI template data parcel reading." into tm-dev 2022-05-10 15:50:32 +00:00
Ayush Sharma
27c411877c Add string for set separate work lock link
Bug: 206083998
Bug: 231296099
Test: Manual
Change-Id: I3e2a4b3b403738184271b8639102e69520bb6776
2022-05-10 14:01:57 +01:00
Pavel Grafov
91edfc163b Allow profile owners to protect packages.
Changed how protected packages are stored in package manager:
* previously they were stored in a map from DO package into
  a list of protected packages. This isn't expressive enough
  to allow POs: the same PO package on different users may
  protect different packages.
* now they are stored in a map from userId into a list of
  protected packages. In case when the DO sets the policy
  the userId will be UserHandle.USER_ALL, otherwise it will
  be the calling user.

Bug: 218639412
Test: atest UserControlDisabledPackagesTest
Change-Id: I2d1d33acad035610c8db365f69b7a15faa03a2d5
Merged-In: I2d1d33acad035610c8db365f69b7a15faa03a2d5
2022-05-10 10:09:13 +00:00
Cecilia
f6eebf40f8 Fix the UI template data parcel reading.
Update the UI template data's parcel r/w with #readParcelable and #writeParcelable so it works for the BaseTemplateData's subclasses.

Bug: 231401631
Test: Tested locally
Change-Id: I64b0dd8cb781acd0f2badba7f87454ae9f72eb28
2022-05-10 02:44:58 +00:00
Chaohui Wang
4f4e8dd340 Merge "Add validation TOO_SHORT_WHEN_ALL_NUMERIC" into tm-dev 2022-05-10 02:44:48 +00:00
Joanne Chung
070275dcae Merge "[DO NOT MERGE] Remove selection toolbar code from build time" into tm-dev 2022-05-10 00:59:33 +00:00
Nate Myren
bd934eba0f Note RECEIVE_AMBIENT_TRIGGER_AUDIO in the SoundTrigger
This op gets around the background restrictions on RECORD_AUDIO, when
used for SoundTrigger detection
In addition, moves the precise logic for soundtrigger RECORD_AUDIO
checks out of the soundtrigger system

Fixes: 230430779
Test: manual
Change-Id: I6d63c99e2d31e3f668070ac82afed71ff6672c9e
Merged-In: I6d63c99e2d31e3f668070ac82afed71ff6672c9e
2022-05-09 23:35:37 +00:00
Julia Reynolds
af7982277b Merge "Remove notification permission feature flag" into tm-dev 2022-05-09 20:16:09 +00:00
Antoan Angelov
866cd169bf Merge "Parse extras bundles from NFC tags" into tm-dev 2022-05-09 19:01:12 +00:00
Josh Hou
607108532a Merge "[Panlingual] Add the link for the LocaleConfig" into tm-dev 2022-05-07 07:16:15 +00:00
arangelov
b6aced1722 Parse extras bundles from NFC tags
Bug: 231432017
Test: atest DevicePolicyManagerTest
Change-Id: Icdf597401fd7ce6dba84b8d7ce0aade4a86c4517
2022-05-07 08:04:06 +01:00
Tom
49e76804b8 [DO NOT MERGE] T Subcard logging - Media Card code path
Test: N/A, media path not triggered during manual testing
Bug: 226974246

Change-Id: I9b87ad09e0b16f1250d723a3eb708879e2e1de8e
2022-05-06 19:28:22 +00:00
Evan Severson
f209ae03e9 Merge "Allow system server uid to bypass location restriction" into tm-dev 2022-05-06 14:54:52 +00:00
TreeHugger Robot
10ba4dab0c Merge "Fix error in javadoc" into tm-dev 2022-05-06 09:24:43 +00:00
Alex Johnston
7b1e39d5c1 Merge "Update DevicePolicyManager network logging docs" into tm-dev 2022-05-06 08:08:43 +00:00
Evan Severson
cad40dc9b1 Allow system server uid to bypass location restriction
Blocking system server from giving itself location restriction doesn't
make much sense.

Test: Disable, reboot, observe bootloop, apply patch, build, flash,
          observe successful boot
Bug: 231281927

Change-Id: Ic869da4847e4f39896861f3bf6e83f6f6c76ea62
2022-05-05 12:45:50 -07:00
Alexander Roederer
d7356c9e08 Merge "Adds explanation of MessagingStyle fields" into tm-dev 2022-05-05 16:41:30 +00:00
Josh Hou
25145ea25f [Panlingual] Add the link for the LocaleConfig
Add the link in the java doc to guide developers how to use the LocaleConfig

Bug: 214154050
Test: Verify the link can be accessed successfully
Change-Id: I19042b485bdf69b8bd8a6465176226109ce1d338
2022-05-05 23:21:37 +08:00
Joanne Chung
ade911b9c7 [DO NOT MERGE] Remove selection toolbar code from build time
The feature punts to QPR so disable or remove code from the build
time.

Bug: 222185402
Test: build pass and can boot to home
Test: make sure the toolbar using local implementation

Change-Id: Idad82c3c46ddce0731a26f4599de01eecb0e52c3
2022-05-05 18:09:42 +08:00
Kholoud Mohamed
e1bcab3b51 Merge "Add missing settings strings" into tm-dev 2022-05-05 08:14:57 +00:00
Joanne Chung
5ab99b0a21 Merge "Re-enable the removed-from-presubmit hotword tests (framework part)" into tm-dev 2022-05-05 01:17:42 +00:00
Julia Reynolds
0be19ec3c5 Remove notification permission feature flag
And the related obsolete code.

Test: SystemUITests, framework services tests, NotificationManagerTest
Fixes: 231344755
Change-Id: Id14941f82305b0216f2a12221d4195f8afcc65ab
2022-05-04 17:59:02 -04:00
arangelov
ca67582c42 Fix error in javadoc
Javadoc stated that org-owned provisioning modes won't receive
the IMEI and serial number, but that's incorrect. That actually
applies to personally-owned.

Bug: 187112267
Test: compiled
Change-Id: I257d1b45b2921891b1d8e6869fb77ce281d2ce90
2022-05-04 18:13:38 +01:00
kholoud mohamed
39334d9df5 Add missing settings strings
Bug: 226183482
Test: manual
Change-Id: Ic8496452fb12998e3854463e515e5f2382cf29dc
2022-05-04 17:43:23 +01:00
Chaohui Wang
fabf6dcd44 Add validation TOO_SHORT_WHEN_ALL_NUMERIC
To distinguish the requirement between all numeric and not all numeric
when COMPLEXITY_HIGH.

Note:
The second param of applyComplexity() changed back from
withNonNumericCharacters to isPin.
This was changed from isPin to withNonNumericCharacters in Change
I3227d4d8e6825b5c4ea525828d7e09f52702065b without changing the caller.
This currently not causing any issues because applyComplexity() only
used by KeyguardManager.getMinLockLength(), which currently never be
called with COMPLEXITY_HIGH.

Fix: 227149118
Fix: 173167839
Test: manual & robolectric
Change-Id: I7e0d4a1edf42327452b7d9a564258b26865c056e
2022-05-05 00:09:25 +08:00
Jonathan Scott
ef3ac99de6 Merge "Add missing Settings constants." into tm-dev 2022-05-04 12:54:26 +00:00
Joanne Chung
74a5f8d1a9 Re-enable the removed-from-presubmit hotword tests (framework part)
Bug: 231374504
Test: atest --test-mapping frameworks/base/core/java/android/app
Test: atest --test-mapping frameworks/base/services/voiceinteraction
Test: atest --test-mapping \
frameworks/base/core/java/android/service/voice

Change-Id: I5bba0fb61eb676ae2b096c92c70f99b6d730af96
2022-05-04 20:41:47 +08:00
TreeHugger Robot
a3ca84f805 Merge "Add hidden constants to allow the role holder updater to specify the failure strategy" into tm-dev 2022-05-03 20:50:09 +00:00
Alexander Roederer
65c6cf6e08 Adds explanation of MessagingStyle fields
Adds explanation of MessagingStyle fields, and corrects some
typographic errors that lead to some javadocs not being rendered
completely.

Bug: 159367102
Test: Only documentation change
Change-Id: I751a15d0abf35cdcb7ad2caacf954bdeec23a394
2022-05-03 13:41:12 +00:00
Vadim Caen
29347308d7 Update deprecation documentation for onBackPressed
Add some detail about migrating to OnBackInvokedDispatcher and the
reason behing the deprecation of onBackPressed methods.

Fixes: 227563202
Test: Documentation change only
Change-Id: Ifc2dd88cb9600efae84cd353549811e7b07ae4bc
2022-05-03 13:51:15 +02:00
arangelov
28fea115ad Add hidden constants to allow the role holder updater to specify the failure strategy
If the role holder updater fails to update the role holder, it can
specify how the platform should handle the failure. It can either
fail provisioning, or it can carry on using the platform-driven
provisioning.

Bug: 230749552
Test: compiled
Change-Id: Id24b24e5d7386d9806efa232f8c71287c9b7704b
2022-05-03 12:34:20 +01:00
Alex Johnston
cd0abb8603 Update DevicePolicyManager network logging docs
Include the correct API level

Bug: 228445895
Test: NA
Change-Id: I97a1d44484eb640fd627c7ddcc67eeced8ef07b2
2022-05-03 09:53:29 +01:00