Commit Graph

104250 Commits

Author SHA1 Message Date
Hongwei Wang
3da602b640 Merge "Set isInPictureInPictureMode earlier" into rvc-dev 2020-05-28 20:41:43 +00:00
Hongwei Wang
e37b84d19e Set isInPictureInPictureMode earlier
Per https://developer.android.com/guide/topics/ui/picture-in-picture
After app requests enterPictureInPictureMode and receives onPause
callback, it will continue playback if isInPictureInPictureMode is true.

However, with ag/11273366, isInPictureInPictureMode will now return true
after the new configuration is dispatched to app, which happens after onPause.
This may cause app, following the guidance, to cease playback in PiP mode.

Fixes this by setting the internal mIsInPictureInPictureMode earlier
right in enterPictureInPictureMode

Video: http://go/recall/-/aaaaaabFQoRHlzixHdtY/fVRqG7UWoKkQQhFxPkzcUt
Bug: 156924033
Test: manually enter PiP from Twitch
Change-Id: I8e0865076fcb756cfa5db39901f460ab5ad69b99
2020-05-28 11:41:39 -07:00
TreeHugger Robot
aaec0d4ac3 Merge "Generate ACTION_CANCEL event when screen turned off by proximity sensor." into rvc-dev 2020-05-28 18:35:08 +00:00
Louis Chang
77db95ce85 Merge "Revert "Only add divider when it need to show"" into rvc-dev 2020-05-28 14:45:46 +00:00
TreeHugger Robot
9cf7941324 Merge "Insets: Allow animations when setting SYSTEM_UI_LAYOUT_* flags" into rvc-dev 2020-05-28 14:14:15 +00:00
Adrian Roos
2e2631572a Insets: Allow animations when setting SYSTEM_UI_LAYOUT_* flags
Test: atest android.server.wm.WindowInsetsAnimationTests#testAnimationCallbacks_withLegacyFlags
Fixes: 155955734
Change-Id: Idb35218abb4e17688bfb985abb97ae739a60136b
2020-05-28 14:33:38 +02:00
Maciej Żenczykowski
b2603a3193 NetworkStats: apply464xlatAdjustments - don't remove CLAT_UID
This should no longer be needed after all the cleanups.

Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I289d935f84b616ed857ef4c5a7427d57c282d00c
Merged-In: I289d935f84b616ed857ef4c5a7427d57c282d00c
2020-05-28 02:44:20 -07:00
Maciej Żenczykowski
d09cef39c5 NetworkStats: apply464xlatAdjustments - remove useBpfStats parameter.
Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0121a4ac7ee824adc5930bab786d550b2f00b05b
Merged-In: I0121a4ac7ee824adc5930bab786d550b2f00b05b
2020-05-28 02:44:10 -07:00
Louis Chang
bf1a597b20 Revert "Only add divider when it need to show"
This reverts commit 91bba497c3.

Reason for revert: unblock wm presubmit

Fix: 157629296

Change-Id: I04fd8b79de025d7c531ac03218a7590e6a32e1be
2020-05-28 09:43:53 +00:00
Maciej Żenczykowski
d1dd2f9cf3 NetworkStats - no need for xt_qtaguid clat bw fixups
This is due to the previous addition of the ip6tables raw PREROUTING
drop rules for incoming ipv6 clat traffic pre-translation to ipv4.

Since we no longer double account, we no longer need these fixups.

Test: atest bpf_module_test clatd_test libbpf_android_test libnetdbpf_test
  netd_integration_test netd_unit_test netdutils_test
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia171b7797cdc99367064d0649bf1293c71579941
Merged-In: Ia171b7797cdc99367064d0649bf1293c71579941
2020-05-28 02:43:22 -07:00
Tony Huang
8acb04e235 Merge "Only add divider when it need to show" into rvc-dev 2020-05-28 04:26:37 +00:00
TreeHugger Robot
f37b09335f Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev 2020-05-28 00:23:16 +00:00
TreeHugger Robot
5bc3e56a51 Merge "Ensure Java code verifies hinge angle sensor is wakeup" into rvc-dev 2020-05-27 23:54:07 +00:00
Songchun Fan
f2a6af4b8a Merge "[incremental] respect extractNativeLibs in native lib config" into rvc-dev 2020-05-27 22:17:23 +00:00
Songchun Fan
14f6c3c735 [incremental] respect extractNativeLibs in native lib config
Makes sure the behavior is consistent with legacy installs:

When the flag is on, the native libs will be extracted to subdirs under
lib/.
When the flag is off, the lib/ subdirs will be created but the native
libs are not extracted.
When the flag is off, check if the native libs are uncompressed and well
aligned.

Test: atest android.extractnativelibs.cts.CtsExtractNativeLibsHostTest
BUG: 157173358
Change-Id: Idb57fd7ca1115f787faf5cde3056c32ff3f60890
2020-05-27 22:16:57 +00:00
Julia Reynolds
1e8ce29af7 Merge "Clarify conversation policy" into rvc-dev 2020-05-27 20:43:59 +00:00
TreeHugger Robot
a203c27aa9 Merge "webkit: Update documentation for onJsBeforeUnload callback" into rvc-dev 2020-05-27 20:43:44 +00:00
Anthony Stange
373eca4301 Ensure Java code verifies hinge angle sensor is wakeup
Previously, only the NDK enforced the default sensor type was wakeup and
if an app called the Java APIs it'd get a null value if there was only a
wakeup version of the hinge sensor.

Bug: 157581504
Test: Run on emulator and verify that getDefaultSensor returns the
sensor instance

Change-Id: Ica13c70a456780891f366394848e4c649f6ea70b
2020-05-27 16:02:16 -04:00
Mehdi Alizadeh
c95be6995a Merge "Adds cacheFlags parameter to cache/uncacheShortcuts() methods" into rvc-dev 2020-05-27 19:23:39 +00:00
Changwan Ryu
a56c69eae0 webkit: Update documentation for onJsBeforeUnload callback
Fix documentation to clearly indicate that the default behavior is to
show WebView's own default dialog, and also describe the default
behavior more clearly and how to customize it.

Bug: 154014645
Test: m -j offline-sdk-docs seems not broken
Change-Id: I7d1e10c5d406ed739fb3963b9099791cfce95063
2020-05-27 12:09:32 -07:00
Collin Fijalkovich
4edffac782 Merge "Add performance counters to cacheinfo dumps." into rvc-dev 2020-05-27 18:24:04 +00:00
Adrian Roos
792dc29a6e Merge "InsetsController: Maintain type user animation when restarting input" into rvc-dev 2020-05-27 18:09:16 +00:00
Adrian Roos
c7577d48c0 Merge "InsetsController: Add missing onWindowInsetsAnimationEnd when cancelling" into rvc-dev 2020-05-27 18:08:19 +00:00
Benedict Wong
8f29769362 Merge "Add methods for IKEv2/IPsec test mode profiles" into rvc-dev 2020-05-27 17:31:00 +00:00
Adam Bookatz
203a17d955 Merge "Unify multiuser switcher enabled setting" into rvc-dev 2020-05-27 17:15:33 +00:00
Julia Reynolds
2fcfe23f79 Clarify conversation policy
Test: make
Fixes: 157482114
Change-Id: Icb6993a4c2c651465cadfa31c1d1915b7352994c
2020-05-27 12:47:10 -04:00
Cody Kesting
9e09e8a7fa Merge "Forward unknown Data Stall types to Connectivity Diagnostics." into rvc-dev 2020-05-27 16:03:38 +00:00
Heemin Seog
58169786a6 Merge "Add climate bar insets" into rvc-dev 2020-05-27 15:38:32 +00:00
Taran Singh
e20c25ddc6 Merge "Add Insets dumps and IME debug logs" into rvc-dev 2020-05-27 15:12:30 +00:00
Taran Singh
85661e3f9e Add Insets dumps and IME debug logs
Add more dumps and logs to better help debug IME insets better
Logging can be enabled by setting InsetsController.DEBUG to true.

Bug: 154348613
Test: manually build and flash.
      Verify showing and hiding IME shows logs.
      verify adb shell dumpsys window windows has new dumps

Change-Id: Iad0a21d81a22d6acfaaf5c5ca8b5131eec411e79
2020-05-27 15:12:07 +00:00
Alex Johnston
155d909a08 Merge "Per-profile user restrictions in org-owned managed profile" into rvc-dev 2020-05-27 13:12:43 +00:00
Louis Chang
e500c6773b Merge "Do not always report configuration change to activity" into rvc-dev 2020-05-27 04:17:14 +00:00
Alex Buynytskyy
4e5ff2eb7d Merge "Lifecycle: detecting blocked and unhealthy." into rvc-dev 2020-05-27 04:15:54 +00:00
Tony Huang
91bba497c3 Only add divider when it need to show
By previous memory patch, the divider will always call update when
enter split when means it always add divider view when showing. So
we can reduce some update call to avoid any unnecessary surface
memory allocate.

Fix: 150190730
Test: Check split mode rotate normally and dump SF to check divider
      memory status
Change-Id: Ibccd0b998d299968ee6d68127c801fae656d2127
2020-05-27 11:25:05 +08:00
Collin Fijalkovich
88aa314afa Add performance counters to cacheinfo dumps.
Tracks the number of hits, misses, refreshes, and invalidations on a
per-cache basis, and makes that information available through dumpsys
cacheinfo.

Bug: 157175501
Test: adb shell dumpsys cacheinfo
Change-Id: Icabdd82acda2edc54d787d0a2d15a33ba18fd668
2020-05-26 18:47:42 -07:00
TreeHugger Robot
80a18c0a7b Merge "Camera: Extend FEATURE_CAMERA_CONCURRENT to old API levels" into rvc-dev 2020-05-27 00:45:04 +00:00
Adam Bookatz
d626fd310c Unify multiuser switcher enabled setting
This does the following:
1. The multiuser switcher (in Settings and SysUI)
is now disabled by default. In order for it to be enabled
one of the following must be true:
  a. the user has explicitly toggled it on in Settings
  b. a new user gets created (via any means)
  c. config_showUserSwitcherByDefault overrides this default

2. Even if a new user is added, if the user had explicitly
*disabled* the switcher, the switcher still won't be enabled.

3. SystemUI and Settings (et al.) all use
UserManager.isUserSwitcherEnabled as the source of
truth in this regard.
No one else reads USER_SWITCHER_ENABLED directly.

4. If the switcher is enabled, then SystemUI will show the
switcher avatar, even if there are no other users on the device,
as long as new users can be created. This way, if the user
has enabled the switcher, the user can use the avatar to add
guest/secondary users (which would not be possible if enabled
status was tied solely to the existence of other users).

Bug: 137943217
Bug: 141372193
Bug: 149973281
Bug: 130270878

Test: manual: Settings > Multiuser doesn't turn on the systemui avatar
Test: manual: Settings > Multiuser is initially disabled
Test: manual: adb shell pm create-user A, does turn on sysui avatar
              even if the user didn't enable, but not if they disabled

Change-Id: Ia440b4db78792da76f94322a563d93db0c68e933
2020-05-26 23:01:55 +00:00
Sarah Chin
8300a64490 Merge "Add Setting for NR screen off indications" into rvc-dev 2020-05-26 21:56:42 +00:00
Heemin Seog
d79e4f49d2 Add climate bar insets
This can be used to support a 3rd kind of system bar to inset the
applicaiton space.

Bug: 152763889
Test: manual
Change-Id: I3ba75886e94a9fe80a0d1a920749d152dda64031
2020-05-26 14:26:25 -07:00
TreeHugger Robot
58c7846f6a Merge "WindowlessWindowManager: Set size when creating surface" into rvc-dev 2020-05-26 20:41:22 +00:00
Adrian Roos
a2d2ba7e61 InsetsController: Maintain type user animation when restarting input
When the IME restarts input, it re-requests to show itself. If the app is
already animating, we should maintain that animation instead of cancelling
it.

Fixes: 155962435
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I57618e43b2cddc55e5dfc32111abbbd82cc6ed48
2020-05-26 20:22:05 +00:00
Alex Buynytskyy
8ef61aebee Lifecycle: detecting blocked and unhealthy.
Part 1: interfaces and PM implementation.

Bug: 153874006
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: I312dd919d2bb552bea3d72fb49fd1579882da14b
2020-05-26 19:34:39 +00:00
Adrian Roos
a79b8851f7 InsetsController: Add missing onWindowInsetsAnimationEnd when cancelling
Fixes a few issues around cancelling insets animations:

- dispatch the onEnd callback when the animation gets cancelled
- When using the CancellationSignal, we need to properly cancel the
  animation, and not just the controller - otherwise we never actually
  remove it from mRunningAnimations.
- Now that cancellation dispatches to apps, make sure they do not
  restart a different animation of the same type we just cancelled

Bug: 156740834
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I4c36470a816ff8e3b92cd03090b8e947a2234f13
2020-05-26 21:26:25 +02:00
Robert Carr
5d9d2ddca2 WindowlessWindowManager: Set size when creating surface
When we set the buffer size from relayout window, there is a race
condition where the client may then submit its first buffer but the
transaction hasnt applied yet on the SF side and so the buffer is
rejected. Setting a defualt size when creating fixes this. Luckily
SurfaceControlViewHost size is known at add time, since we force the
window size based on the values passed in to the SurfaceControlViewHost API.

Bug: 157153874
Test: Existing tests pass
Change-Id: I2566844aea81df92f1694f43254a480fc3b3c019
2020-05-26 11:29:39 -07:00
Collin Fijalkovich
adfe0e9193 Merge "Cache isUserUnlockingOrUnlocked Binder calls" into rvc-dev 2020-05-26 17:49:51 +00:00
Michael Groover
2046776127 Merge "Address edge cases for signing certificate lineages in sharedUids" into rvc-dev 2020-05-26 16:07:57 +00:00
Alex Johnston
97b68a53fb Per-profile user restrictions in org-owned managed profile
Background
* Some user restrictions should be per-profile
  instead of per-device to allow for more
  granularity.
* For this reason, the profile owner of an
  organization-owned managed profile should
  apply user restrictions the same way as the
  profile owner on the personal user
  (instead of the device owner).

Changes
* Move per-profile user restrictions from
  PROFILE_OWNER_ORGANIZATION_OWNED_GLOBAL_RESTRICTIONS
  to PROFILE_OWNER_ORGANIZATION_OWNED_LOCAL_RESTRICTIONS
  in UserRestrictionsUtils
* Update UserManager javadocs
* Update DevicePolicyManagerTest

Bug: 148453838
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDevicePolicyManagerParentSupport
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testUserRestrictionSetOnParentLogged
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testUserRestrictionsSetOnParentAreNotPersisted
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPerProfileUserRestrictionOnParent
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPerDeviceUserRestrictionOnParent
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testCameraDisabledOnParentIsEnforced
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testCameraDisabledOnParentLogged
Change-Id: I431f7b9bf45a24b77f62899794561d6098f2a54b
2020-05-26 14:32:01 +01:00
Mehdi Alizadeh
a3d22cec32 Adds cacheFlags parameter to cache/uncacheShortcuts() methods
Bug: 155135890
Test: atest ShortcutManagerTest1 ShortcutManagerTest11 \
            ConversationInfoTest DataManagerTest \
            NotificationManagerServiceTest
Change-Id: Idda777ba032546bd616ee3079b9c8dc8676dc589
2020-05-26 03:30:55 +00:00
Stanislav Zholnin
86b0b984cf Remove UidAtomTests from presubmit due to failures.
Test: manual

Bug: 155714228
Change-Id: I661c6503c387a00803bb949e3e8ca431045dd266
2020-05-25 19:01:34 +00:00
Anton Hansson
78b956deb1 Merge "Remove nullablility annotations from module-lib" into rvc-dev 2020-05-25 12:09:26 +00:00