Commit Graph

20586 Commits

Author SHA1 Message Date
TreeHugger Robot
8d8d75af36 Merge "Revert "Use the existing wallpaper command API to send wake/sleep events to the wallpaper."" into sc-dev 2021-04-17 08:53:40 +00:00
Yuncheol Heo
a35b769999 Revert "Use the existing wallpaper command API to send wake/sleep events to the wallpaper."
This reverts commit bde980759e.

Reason for revert: b/185615919

Change-Id: I4906f109de478361790e459c117bd5d6a88a778c
2021-04-16 21:15:06 +00:00
Almaz Mingaleev
e2b7cb3df2 Merge "Add copy builder to TimeZoneCapabilities." into sc-dev 2021-04-16 17:45:54 +00:00
Josh Tsuji
11b83652e9 Merge "Use the existing wallpaper command API to send wake/sleep events to the wallpaper." into sc-dev 2021-04-16 14:59:23 +00:00
Josh Tsuji
bde980759e Use the existing wallpaper command API to send wake/sleep events to the wallpaper.
This is already used for similar events such as icon drops and user taps. Using it to indicate that the user has woken/slept the device (and passing along location information) makes sense!

This does require an API modification to add the new string constants to WallpaperManager. This change is being requested by 1P apps (the Live Wallpapers, which are not bundled with the OS and thus can't use system APIs).

Bug: 169693662
Test: locally with modified wallpaper, it receives events
Change-Id: I0cc1bc70dbea509a049b08f8119ed875ffc2e8d5
2021-04-16 14:58:24 +00:00
Almaz Mingaleev
8533c0b3ca Add copy builder to TimeZoneCapabilities.
This method is added to change capabilities
more easily in Robolectric's TimeManager shadow class.

Bug: 159891384
Test: atest core/tests/coretests/src/android/app/time/*
Change-Id: I10b964666e93af9c2c4ead50088773a77521db65
2021-04-16 14:51:51 +00:00
Stanislav Zholnin
ea9ab1d98c Merge "Deduplicate discrete events for different attribution tags." into sc-dev 2021-04-16 10:08:16 +00:00
Stanislav Zholnin
16f0115c0e Merge "Deduplicate discrete operation before delivering result." into sc-dev 2021-04-16 09:16:45 +00:00
Donald Chai
1430546720 Merge "Fix typo" am: 6b5e6bba9b am: f3fcd261ee am: afa759cd3e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676087

Change-Id: I4314a44429c15068058251d52d3cfaa34e3213b5
2021-04-15 19:27:06 +00:00
Donald Chai
afa759cd3e Merge "Fix typo" am: 6b5e6bba9b am: f3fcd261ee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676087

Change-Id: I933a3bba4bf54759c015772455372be3a2ab64f1
2021-04-15 18:37:11 +00:00
Hongwei Wang
e7cfb0bb28 Merge "Fix back stack for PiP from multi-activity Task" into sc-dev 2021-04-15 17:34:19 +00:00
Alex Johnston
a1ef67897d Merge "PasswordPolicy.getMinMetrics PIN" into sc-dev 2021-04-15 15:21:01 +00:00
Alex Johnston
3fd4388757 PasswordPolicy.getMinMetrics PIN
* If the password quality is NUMERIC
  or NUMERIC_COMPLEX, the credential
  type should be CREDENTIAL_TYPE_PIN

Bug: 184103377
Test: atest com.android.server.devicepolicy.PasswordPolicyTest
      atest android.app.admin.PasswordMetricsTest
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
      CtsVerifier > Device owner tests > policy transparency test
      > set password quality
Change-Id: Ibad35d22c34b6cd9ed34b2e671b38503becd7da5
2021-04-15 15:20:12 +00:00
Ashwini Oruganti
aeb5dbf1c5 Merge "Enforce the PI mutability flag requirement for test apps" into sc-dev 2021-04-15 15:13:23 +00:00
Stanislav Zholnin
f2a4eb5908 Deduplicate discrete events for different attribution tags.
Test: in development
Bug: 176965672
Change-Id: Ia9fa0eefaba21d93eb9c28163939fb0490a008d6
2021-04-15 12:33:30 +01:00
Stanislav Zholnin
54a17ad39d Deduplicate discrete operation before delivering result.
Before returning result from the API, we go through the list
of all AttributedOpEntries and those which have the same
timestamp are merged into single AttributedOpEntry without
losing any information (it is still possible to query
AttributedOpEntry with different flags / uidstates and get
all the same information).

This CL addresses issue with duplication due to accesses
with different flags / uidstates.

Test: in development
Bug: 176965672
Bug: 183961838
Change-Id: I319dd321a3bfddf0855c10213c49824e9599eb66
2021-04-15 11:23:43 +01:00
Charles Chen
ac8d924dc3 Merge "Introduce WindowProviderService" into sc-dev 2021-04-15 05:43:08 +00:00
Charles Chen
49cd50b3fd Introduce WindowProviderService
A Window Provider Service is a Window-Context-like Service which handles
UI
components and is able to obtain the latest configuration.
The differences between a Window Context and a Window Provider Service
is that:
1. It is always associated with the primary display before
   attachWindowToken() or WM#addView is called. It is suggested to
render UI
   components after calling the APIs mentioned above.
2. A window context registers the listener in constructor and
   unregisters it in finalize(), while a window provider service
   registers the listener in onCreate() and unregisters in onDestroy().
3. Like the API Context#createWindowContext(int windowType, Bundle
options),
   the users of a Window Provider Service need to override
provideWindowType and
   provideOptions to pass the attributes.
4. When there's a configuration updates from the server side,
   the Service#onConfigurationChanged callback will be invoked.(TBD)
It is suggested to use window context when possible. This class is to
migrate the
Service to show UI components to the window context concept. We can't
migrate them
to WindowContext directly because developers are used to use this kind
of Service as
the container of UI components and may change its property at runtime.
An example is that keyboard developers may apply a new theme by
InputMethodService#getResources#setTheme(newTheme).

Bug: 159767464
Test: atest WindowContextTests#testWindowProviderServiceLifecycle

Change-Id: I7d537fd2d128efa28aa6e771d77aa105fb497672
2021-04-15 02:45:36 +00:00
Jeff DeCew
fe8298fde3 Merge "Fix notification background color" into sc-dev 2021-04-14 23:33:43 +00:00
Donald Chai
979191a80b Fix typo
Change-Id: I2fccfa4d88e157eccaa822105484ae56297bc1c9
2021-04-14 23:26:30 +00:00
Hongwei Wang
7f64b14478 Fix back stack for PiP from multi-activity Task
Details in design doc go/pip-and-back

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/g8lbXnC8ln0t54ARxfPELo
Bug: 184758170
Test: ensure back stack works for Netflix, see video
Test: atest PinnedStackTests
Test: atest RootWindowContainerTests
Change-Id: I9e2f8d0d50dd107ff30fd7afe6273d8347aac803
2021-04-14 15:00:31 -07:00
Ashwini Oruganti
8b71ad9ab4 Merge "Add an excludedPermission arg to filter the set of apps that a broadcast gets sent to" into sc-dev 2021-04-14 20:30:06 +00:00
Jeff DeCew
451f3ff377 Fix notification background color
This color isn't shown; merely used for color contrast calculations

Test: manual
Bug: 184982648
Change-Id: I6b2b49287f282fd748f075181cfa37217491b012
2021-04-14 14:33:02 -04:00
Antoan Angelov
f78b620609 Merge "Update EXTRA_PROVISIONING_SUPPORTED_MODES values to flags" into sc-dev 2021-04-14 14:08:19 +00:00
Jeff DeCew
42cef834c7 Merge "Clean up MessagingLayout notifications" into sc-dev 2021-04-14 12:47:24 +00:00
Pavel Grafov
7ecbda5d91 Merge "API review: change getKeyPairGrants return type" into sc-dev 2021-04-14 09:58:49 +00:00
Paul Hu
68c58b9ccd Merge "Add [get|set]MaxManifestReceiverApiLevel to test api for CTS" into sc-dev 2021-04-14 04:52:38 +00:00
Bill Yi
4167bf213c Merge RQ2A.210405.006 to aosp-master - DO NOT MERGE
Merged-In: I735b41ed53ce7d374b5d36c4aee79f73d0334234
Merged-In: I9999bfe514fffa9f300643e74942db5ae556670a
Change-Id: If4b670a158e561d8feb03e12aef2d295c5109d43
2021-04-13 19:36:45 -07:00
Jeff DeCew
f9139ded2a Merge "Add CallStyle.setIsVideo(boolean)" into sc-dev 2021-04-14 00:37:12 +00:00
Suprabh Shukla
9da117df72 Merge "Suspend dialog improvememts" into sc-dev 2021-04-13 23:57:38 +00:00
Zhen Zhang
c7c816a951 Merge "Rename API based on API review" into sc-dev 2021-04-13 20:07:53 +00:00
Charles Chen
030a75463e Merge "Enable WindowContext to associate with WindowToken" into sc-dev 2021-04-13 14:29:44 +00:00
Charles Chen
a5b660e386 Enable WindowContext to associate with WindowToken
This CL instroduces WMS#attachWindowContextToWindowToken
and the corresponding API in WindowContextController to make
WindowContext able to associate with a WindowToken.

Test: atest WindowContextControllerTest
Test: atest WindowManagerServiceTests#testAttachWindowContextToWindowToken*
Bug: 159767464

Change-Id: I807a67fba149cbdc4267442bab0b64e6a95bd4b5
2021-04-13 15:55:49 +08:00
Riddle Hsu
a77a0600cf Merge "Remove obsolete test APIs of split screen" into sc-dev 2021-04-13 02:20:37 +00:00
Suprabh Shukla
346118543b Suspend dialog improvememts
Finishing the suspend dialog when the package for which it was shown
gets unsuspended for any reason.

Also, attributing any interaction with this dialog to the suspending
package, as the system is showing the dialog on its behalf.

Test: Manual, from an unrooted shell:
adb shell pm suspend com.android.chrome
Tap to start chrome and wait for the dialog to appear. Then:
adb shell pm unsuspend com.android.chrome
The dialog should disappear. Further,
adb shell dumpsys usagestats
should show USER_INTERACTION for com.android.shell.

Bug: 169137795
Fixes: 180336589
Change-Id: I70b6f23e2994d8802335e35932ed09209754697c
2021-04-12 19:10:31 -07:00
paulhu
4c7720ba86 Add [get|set]MaxManifestReceiverApiLevel to test api for CTS
Bug: 185184155
Test: m update-api
Change-Id: I73087f071e9cff7fd88e137eac8993738589772c
2021-04-13 09:41:30 +08:00
Meng Wang
6517e68d15 Merge "Revert "PasswordPolicy.getMinMetrics PIN"" into sc-dev 2021-04-12 23:22:21 +00:00
Meng Wang
3c167fe9ca Revert "PasswordPolicy.getMinMetrics PIN"
This reverts commit 8dd5021359.

Reason for revert: DroidMonitor: Potential culprit for Bug 185150796 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: 185150796
Change-Id: Ie6809d9e20b5c32c076e7a790095c65a2295781a
2021-04-12 22:26:57 +00:00
Ashwini Oruganti
cfd031a9fb Enforce the PI mutability flag requirement for test apps
We relaxed the enforcement for apps under instrumentation to give us some buffer time to help transition all the test apps. This change enforces the mutability flag requirement even for apps under instrumentation.

Bug: 178092897
Test: TH
Change-Id: Idb7ac5ea5bb84f52f7da058f6a43e3397e6f4601
2021-04-12 22:17:50 +00:00
Ashwini Oruganti
a919259285 Add an excludedPermission arg to filter the set of apps that a broadcast
gets sent to

This adds an API to allow sending a broadcast to an app that has permission FOO but not permission BAR.
Earlier, a lack of this option was causing a double send problem for broadcasts, which should now be resolved.

Test: manual
Bug: 183537857
Change-Id: I13287d63e039164694be4daa832bb23709990054
2021-04-12 21:58:51 +00:00
Felipe Leme
6ebf3703f2 Merge "Documents that wipeData() is allowed for apps with MASTER_CLEAR permission." into sc-dev 2021-04-12 20:29:04 +00:00
Chloris Kuo
cfab1005d3 Merge "NAS Settings Migration" into sc-dev 2021-04-12 17:16:57 +00:00
Alex Johnston
60e65b4b6f Merge "PasswordPolicy.getMinMetrics PIN" into sc-dev 2021-04-12 15:45:06 +00:00
Mady Mellor
02b75bb425 Merge "API Update: extra_is_bubbled -> Activity#isLaunchedFromBubble" into sc-dev 2021-04-12 14:53:01 +00:00
arangelov
7bfdde8171 Update EXTRA_PROVISIONING_SUPPORTED_MODES values to flags
This addresses API council feedback.

SUPPORTED_MODES_ORGANIZATION_OWNED is now
FLAG_SUPPORTED_MODES_ORGANIZATION_OWNED.
SUPPORTED_MODES_PERSONALLY_OWNED is
FLAG_SUPPORTED_MODES_PERSONALLY_OWNED.
SUPPORTED_MODES_DEVICE_OWNER is
FLAG_SUPPORTED_MODES_DEVICE_OWNER.

SUPPORTED_MODES_ORGANIZATION_AND_PERSONALLY_OWNED is now
FLAG_SUPPORTED_MODES_ORGANIZATION_OWNED |
FLAG_SUPPORTED_MODES_PERSONALLY_OWNED.

Note that these new flags have the same exact values as
the original values, so no changes are needed to be done
for the provisioning trigger.

Fixes: 179709752
Test: atest ManagedProvisioningTests
Test: atest ManagedProvisioningRoboTests
Change-Id: I1845837e752df5750083dc3bf31cbc356f4d24b7
2021-04-12 15:10:09 +01:00
Eran Messeri
b056b2c7bc Merge "Rename Enterprise Network Preference to Preferential network service" into sc-dev 2021-04-12 13:02:25 +00:00
Pavel Grafov
a049f622da API review: change getKeyPairGrants return type
Currently getKeyPairGrants returns Set<Set<String>> which is used
to encode the fact that packages that share UID will always have
access to a given key together. This change makes this UID explicit
by changing return value to Map<Integer, Set<String>>.

Bug: 184018067
Test: atest MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Test: atest MixedDeviceOwnerTest#testKeyManagement
Change-Id: I571e67bda1709ddb48012003de055c7211edb786
2021-04-12 12:08:23 +01:00
Riddle Hsu
f6da995b05 Remove obsolete test APIs of split screen
The methods setTaskWindowingMode and resizePrimarySplitScreen
can be replaced with the methods of WindowContainerTransaction
and TaskOrganizer.

Bug: 174040691
Test: CtsWindowManagerDeviceTestCases

Change-Id: I975457887a87464456675010c7531738fa5f62f4
2021-04-12 17:47:37 +08:00
Eran Messeri
9ac9fe53bf Merge "Address API review for admin-granted permissions" into sc-dev 2021-04-11 11:44:26 +00:00
Jimmy Shiu
4c6e5036b7 ADPF: PerformanceHintManager API implementation
Test: Manual test, run bouncy ball
Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest
Bug: 158791282
Change-Id: Ia0bf2b06675b8cf57cdf1668ee90e98026416439
Signed-off-by: Wei Wang <wvw@google.com>
2021-04-10 10:21:17 -07:00