Commit Graph

104042 Commits

Author SHA1 Message Date
Charles Chen
5681f3e796 Merge "Add WindowMetricsHelper" into rvc-dev 2020-05-11 10:17:37 +00:00
TreeHugger Robot
488cd2c4ff Merge "Fix consumer closed input channel cause an error occurred (1/2)" into rvc-dev 2020-05-11 05:56:35 +00:00
TreeHugger Robot
47059f7654 Merge "Make sure AmbiguousGestureMultiplier could start from 1" into rvc-dev 2020-05-11 03:08:31 +00:00
Beverly Tai
78a66d6c36 Merge "Add badge colors for dark theme" into rvc-dev 2020-05-10 18:10:15 +00:00
Jing Ji
04dc962d1d Merge "Check the isInUse with the lock held in MessageQueue" into rvc-dev 2020-05-09 04:18:39 +00:00
Alec Mouri
00f681a582 Merge "Dispatch refresh rate callbacks from DMS" into rvc-dev 2020-05-08 23:54:17 +00:00
Jing Ji
baf2d6448e Check the isInUse with the lock held in MessageQueue
Fix a potential race condtion when the same message object
is being enqueued by two threads.

Bug: 150263007
Bug: 154867444
Test: atest android.os.cts.MessageQueueTest
Change-Id: Id79448ba8719479cbdb054f2cdd172fdcbe86d47
(cherry picked from commit 96a6fec4d6)
2020-05-08 21:14:23 +00:00
Nikita Ioffe
a23a9dc83b Merge "PackageParser2: collect certificates if requested" into rvc-dev 2020-05-08 17:10:47 +00:00
Kweku Adams
86a71e6e93 Merge "Add master switch to enable/disable RESTRICTED bucket." into rvc-dev 2020-05-08 15:01:03 +00:00
Tiger Huang
d8bb9b4dd8 Merge "Prevent unnecessary updateRequestedState" into rvc-dev 2020-05-08 13:37:42 +00:00
Joanne Chung
cdbd09bbcf Merge "Prevent crash when AutofillManager.isEnabled() is called" into rvc-dev 2020-05-08 10:14:55 +00:00
Joanne Chung
ee55616ad3 Prevent crash when AutofillManager.isEnabled() is called
If we cannot get flag information from the AutofillManagerService
after the timeout, we should not crash the process, we need to
handle the enabled information properly.

Also fix NPE because of null component name while calling
AutofillManagerServiceImpl.isWhitelistedForAugmentedAutofillLocked().

Bug: 151273845
Test: atest CtsAutoFillServiceTestCases
Test: manual. Copy the text from Messenger and paste on search bar,
no crash occurred and can paste text correctly.

Change-Id: I8d7ca35226052944fd68fef60a013a65a7fb57c1
2020-05-08 16:48:52 +08:00
arthurhung
3a057251ac Make sure AmbiguousGestureMultiplier could start from 1
If a motion event classified CLASSIFICATION_AMBIGUOUS_GESTURE, it would
multiplied the AmbiguousGestureMultiplier from configuration for the
touch slop, we have to make sure this value should be start from 1 or
the touch slop could be zero and click action may fail.

Bug: 155160957
Test: manual
Change-Id: I61e1262b4f3de61214297b678956cc14fa2f24ef
2020-05-08 13:45:05 +08:00
Ryan Lin
2df7af78be Merge "Fix Voice shortcuts not working system-wide in R" into rvc-dev 2020-05-08 02:26:37 +00:00
Alec Mouri
cf3ad873dd Dispatch refresh rate callbacks from DMS
AChoreographer will consume these callbacks in lieu of going through SF
for the callbacks. This is so that DMS can update its view of display
configs before apps receive the refresh rate callback so that apps can
get consistent information.

Bug: 154874011
Test: ChoreographerNativeTest
Test: Manually verify that HWUI is receiving callbacks
Change-Id: I992c247fd16ef414f94a259bbd300bea3e4c9467
2020-05-07 19:19:23 -07:00
Nikita Ioffe
a2962fa93f PackageParser2: collect certificates if requested
This is a relatively easy and safe change that should significantly
reduce boot time.

Test: atest google/perf/boottime/boottime-test
Test: atest PackageManagerTest
Bug: 155535721
Bug: 155513789
Bug: 155525390
Change-Id: Ib5152892184d407361ce3698575075ec0138edbf
2020-05-07 21:09:21 +01:00
Alex Johnston
80542add04 Merge "Restrict creation of secondary users" into rvc-dev 2020-05-07 15:20:31 +00:00
Beverly
2b4306a8ec Add badge colors for dark theme
Test: manual
Test: atest UserManagerTest#testProfileTypeInformation
Fixes: 149669756
Change-Id: Ib3fd377a4902bbe936d574dc52bac4eae6e25dd4
2020-05-07 09:20:19 -04:00
Alex Johnston
9ace11127c Restrict creation of secondary users
Background
* Secondary users should be disabled
  when the device is an organization-owned
  managed profile device.
* This is because supporting secondary
  users would complicate the semantics of
  user restrictions.

Changes
* Add DISALLOW_ADD_USER as a base restriction
  when the device is an organization-owned
  managed profile device.
* Handle removal case when the device is no
  longer in this mode.
* Remove the ability of other admins to apply
  DISALLOW_ADD_USER.

Manual Testing Steps
* Provision an organization-owned managed
  profile device.
* Check Settings > System > Multiple users
  and verify that a user cannot be added.
* Check WP TestDPC 'Set user restrictions
  on parent' and verify 'Disallow add user'
  is not present.

Bug: 155281701
Test: Manual testing
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I83348fc8b854cef20383803124000540b5b130cb
2020-05-07 13:58:31 +01:00
Jorim Jaggi
b3c02592e1 Merge "Cancel existing animations when detaching View" into rvc-dev 2020-05-07 11:36:11 +00:00
Tiger Huang
fbfc3abfde Prevent unnecessary updateRequestedState
If the client didn't change any insets, we don't need to update the
requested state while receiving controls. The requested state at the
server side can still be up-to-date for free.

This CL also sends the requested state to window manager if the local
state is not the same as the dispatched state.

Fix: 155752039
Test: atest InsetsControllerTest
Change-Id: I676a88d3ef823d8717d03e80261e6e7a5f7e8c5f
2020-05-07 14:01:38 +08:00
Feng Cao
254545cae5 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev 2020-05-07 05:23:15 +00:00
Philip P. Moltmann
f7d1f1a40c Merge "Forward dumps from PermissionControllerManager to permissionmgr" into rvc-dev 2020-05-07 05:07:27 +00:00
Riddle Hsu
b76f9472df Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev 2020-05-07 04:51:38 +00:00
arthurhung
03d65a7274 Fix consumer closed input channel cause an error occurred (1/2)
An input channel specifies the file descriptors used to send input
events to a window in another process. And All of the file descriptors
open in the calling process shall be closed when process terminated.

The server side could receive the socket broken event when the process
terminated, we should do the unregister channel before close the file
descriptor or do it automatically without error if there is no valid
window.

- Change the order that remove window before dispose the receiver.
- Unregister input channel when windowless window removed.

Bug: 133782251
Test: open app and exit by back key or recent apps, check if any
      error log occurs.
Change-Id: I59d0084c2c771544e7ee226ce53c574f60c6b988
2020-05-07 11:11:13 +08:00
Feng Cao
b46851c964 Support re-attaching the inline suggestion view to window
* Before this change, when the inline suggestion view is detached from
  the IME window (e.g. due to layout change), the remote view content
  will not show again even after the view is reattached to the window
  on the IME side. This patch fixes it by requesting the remote view
  owner (the ext services) for a new SurfacePackage when the view is
  re-attached to the window (see javadoc of SurfaceControlViewHost for
  why this works).
* This patch also fixes the issue where the SurfaceControlViewHost was
  never released in the ext services. This is done by notifying the
  ext services (through system server) when the view is detached from
  the IME window, and then the system server will release the
  SurfaceControlViewHost if after N(=500) ms the view is not re-attached
  to a window.
* After the SurfaceControlViewHost is released, if the view is
  re-attached to the window later, a new SurfaceControlViewHost will be
  created to back the same InlineContentView.
* The current code structure also lays a foundation for a subsequent
  change to allow reusing the same remote view for inline suggestions
  during filtering.

Test: atest CtsAutofillServiceTestCases (sanity test)

Bug: 153615023
Bug: 154683107

Change-Id: Idc587e1e82a96b792c351796464821b7aad7cd89
2020-05-06 19:30:39 -07:00
Kevin Chyn
73407d6559 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941 am: c1f5869518 am: 38691f7626
Change-Id: I2179cb6e443d25c859ab6c433b11aec63153f256
2020-05-07 01:28:25 +00:00
Kevin Chyn
38691f7626 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941 am: c1f5869518
Change-Id: I1ea9173d607acdcbd03de42aa793b018c23828e3
2020-05-07 01:15:56 +00:00
Kevin Chyn
c1f5869518 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941
Change-Id: I18eb6c4cd9c42f3cc1d1051b47aafeeffb6b0c16
2020-05-07 01:02:48 +00:00
Kevin Chyn
f21b907b1b Revert "Check Read permissions when getDocumentMetadata"
This reverts commit c94646177c.

Reason for revert: 155930637

Change-Id: Id452d316d1c1721fce715474df009ebe0fb719e8
2020-05-07 00:39:46 +00:00
Philip P. Moltmann
5ab27fca5c Forward dumps from PermissionControllerManager to permissionmgr
Test: adb shell dumpsys permissionmgr
Bug: 155680199
Change-Id: Iab5da24277eb6333ef047ab84dfcb65b7c4c2ff2
2020-05-06 17:24:40 -07:00
Diksha Gohlyan
3bea45c642 Merge "Check Read permissions when getDocumentMetadata" into pi-dev am: 4371baafc1 am: ada451e47c
Change-Id: Id40f7456923144e3496df2028c771325ad1f480e
2020-05-06 23:16:07 +00:00
Diksha Gohlyan
ada451e47c Merge "Check Read permissions when getDocumentMetadata" into pi-dev am: 4371baafc1
Change-Id: Ib242d6ed7ff376a71f85a03aa06f2c0453638310
2020-05-06 23:05:34 +00:00
Taran Singh
e974c347fd Merge "Revert "Keeps the served view of the window when focus to the ne..."" into rvc-dev 2020-05-06 21:06:34 +00:00
Taran Singh
0dbd6c4bd6 Revert "Keeps the served view of the window when focus to the ne..."
Revert "Refine FocusHandlingTest"

Revert submission 11182377-fix_b_152373385

Reason for revert: Fix b/155781821
Reverted Changes:
If20cdb43e:Keeps the served view of the window when focus to ...
I50402165b:Refine FocusHandlingTest
Bug: 152373385
Bug: 155781821

Change-Id: I44469caf5a5ceaf247c4e6b0694da9da1f3c0eb1
2020-05-06 20:37:09 +00:00
Galia Peycheva
1255a2d20b Merge "Override DreamActivity enter and exit animations" into rvc-dev 2020-05-06 20:30:21 +00:00
Jorim Jaggi
31e5254daf Cancel existing animations when detaching View
Test: WindowInsetsAnimationSynchronicityTests#testShowAndHide_renderSynchronouslyBetweenImeWindowAndAppContent * 100 times
Fixes: 155602643
Change-Id: I6f736357f5a67c01a29b2c531026a3a76c321003
2020-05-06 20:36:08 +02:00
Hui Yu
a6099ac785 Merge "Revert "Add isUidActiveOrForeground() for camera/audio to use."" into rvc-dev 2020-05-06 16:59:34 +00:00
Marco Ballesio
ce9b47859d Merge changes from topic "developer option for app freezer" into rvc-dev
* changes:
  Resources and strings for freezer settings
  Settings option to enable/disable the app freezer
  ActivityManager API to check availability of app freezer
2020-05-06 16:35:44 +00:00
Kweku Adams
2d79ce5f50 Add master switch to enable/disable RESTRICTED bucket.
Adding a master on/off switch for the new bucket such that when it's off,
apps aren't be put into the bucket and any apps already in it are brought
out.

Bug: 155670438
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Test: atest SettingsProviderTest:SettingsBackupTest
Change-Id: Iaeabefa14cbaa2d07a13555ecbc29e6fbf11a29c
2020-05-06 08:51:40 -07:00
ryanlwlin
5e08c38c89 Fix Voice shortcuts not working system-wide in R
SpeechRecognizer binds RecognitionService to realize it's feature.
When RecognitionService checks the record_audio permission, itself
doesn't have the capabilities to use the permission since it's not
a foreground process. We use the addition flag to allow the bounded
process to get same capabilities.

Bug: 154954447
Test: manual test:
   1. Install Talkback with voice shortcut feature
   3. assign voice shorct function to any gesture
   2. launch any app to leave home and trigger shortcut via the gesture
Change-Id: I2f867af739c69a5ba29bb49397819cb61915e42d
2020-05-06 20:44:09 +08:00
Riddle Hsu
d948f743c2 Do not stop dream service if dream activity is relaunching
Currently DreamActivity doesn't handle any configuration changes,
and does not set fixed orientation. So the decor view will be
detached if the activity is relaunching for configuration changes.

Though it also works by making DreamActivity support handling the
changes, all implementations of DreamService may need to add the
corresponding handling. So this fix only keeps the service alive
for compatibility.

Fixes: 154474768
Test: atest DreamManagerServiceTests#testDreamNotFinishAfterRotation
Test: Enter Settings > Display > Screen saver, press "Start now".
      The dream service should not be stopped after device rotated.
Change-Id: I454f75d06c4539258eeafd8794a3cb03e0276163
2020-05-06 12:26:13 +00:00
Galia Peycheva
3cf3520d3f Override DreamActivity enter and exit animations
Fix: 153151516

Test: atest DreamManagerServiceTests
Change-Id: I4ba741512edea23e0209b176a34478045931c891
2020-05-06 10:30:27 +02:00
Galia Peycheva
95f8aba25e Merge "Add isDreaming method to DreamManager" into rvc-dev 2020-05-06 08:18:19 +00:00
Tony Huang
e13e2229ce Merge "Aviod divider surface memory allocated after boot" into rvc-dev 2020-05-06 04:39:14 +00:00
TreeHugger Robot
a83fad74b4 Merge "Migrate remaining parsePackage V1 to V2" into rvc-dev 2020-05-06 03:57:38 +00:00
Yuncheol Heo
73cc6b8f47 Merge "Migrate Tap exclusion logic to TaskEmbedder." into rvc-dev 2020-05-06 00:00:53 +00:00
Winson
3cb5610a99 Migrate remaining parsePackage V1 to V2
Uses ParsingPackageImpl to generate the PackageInfo for
PackageManager's getPackageArchiveInfo API.

This keeps the migration to v2 hidden and thus the API can
be shipped for this release and then deprecated entirely
if necessary.

Exempt-From-Owner-Approval: Has approval on previous patchsets,
    will need non-logic updates to resolve merge conflict and CP
    into rvc-dev properly

Bug: 135203078
Bug: 146575910
Bug: 153880854

Test: atest com.android.server.pm.parsing
Test: atest android.content.pm.PackageManagerTests

Merged-In: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
Change-Id: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
2020-05-05 16:35:34 -07:00
Varun Shah
2806da306b Merge "Update some ContentResolver docs." into rvc-dev 2020-05-05 23:18:55 +00:00
Yuncheol Heo
d1cfb337cf Merge "Revert "Notify the visibility change to update color views without control."" into rvc-dev 2020-05-05 22:56:42 +00:00