Commit Graph

103825 Commits

Author SHA1 Message Date
Robert Carr
ae8e0aea36 BLAST: Avoid JNI call on creation
JNI calls aren't free and we don't need to burn one
to call update with the values we just passed in.

Bug: 152501005
Test: Existing tests pass
Change-Id: Iaf272edb03d4ec195b75e9ef7e6c122604025dcb
2020-04-27 12:54:11 -07:00
Mehdi Alizadeh
082d0c47b7 Merge "Adds unit tests for ShortcutChangeCallback APIs" into rvc-dev 2020-04-27 19:34:25 +00:00
Chavi Weingarten
5d2781b772 Merge "Added takeScreenshot API to WindowOrganizer" into rvc-dev 2020-04-27 18:59:49 +00:00
TreeHugger Robot
756662fb2f Merge "Inform receivers of restart attempt previous visibility" into rvc-dev 2020-04-27 18:29:46 +00:00
Diego Vela
7c59c63943 Merge "Update Documentation for onActivityResult." into rvc-dev 2020-04-27 17:58:29 +00:00
Aran Ink
82e9872732 Merge "Add dismissImmediate to ListPopupWindow to prevent window leaks in GlobalActionsDialog." into rvc-dev 2020-04-27 17:57:15 +00:00
Mehdi Alizadeh
666796b0fa Merge "Include cache-only and pinned-only shortcuts as Sharing shortcuts as well" into rvc-dev 2020-04-27 17:47:23 +00:00
Rob Carr
9005cdcf01 Merge "BLAST: Two start-up optimizations" into rvc-dev 2020-04-27 17:20:42 +00:00
Taran Singh
88191952ec Merge "Add test for ImeInsetsSourceConsumer" into rvc-dev 2020-04-27 17:08:05 +00:00
chaviw
5ef1e93671 Added takeScreenshot API to WindowOrganizer
Added requests to take screenshot of a Window that's organized
by the client. The resulting screenshot will be attached to a
SurfaceControl and reparented to the requested window's parent. The
client will be responsible for showing, setting z order, etc. They can
also re-parent to another place in the hierarchy. The default is to
parent to the window's parent since that's usually where a screenshot is
placed.

Test: Builds
Bug: 152114574
Change-Id: I5c829e029f3528fdb382842e9f0474097e01cb2e
Merged-In: I5c829e029f3528fdb382842e9f0474097e01cb2e
2020-04-27 16:45:27 +00:00
TreeHugger Robot
bac5755dad Merge "Allow tests for more PermissionControllerManager methods" into rvc-dev 2020-04-27 16:16:28 +00:00
Evan Rosky
8d1c24e0a5 Inform receivers of restart attempt previous visibility
This way receivers like recents know whether the activity
was already visible before a restart attempt.

Bug: 154575664
Test: added test. Can also launch a running activity into
      split-primary and it won't expand it.
Change-Id: If59ee1615fa36bbe3af9412194a7f96b9377528a
2020-04-27 09:13:31 -07:00
Diego Vela
6e99bfcd6c Update Documentation for onActivityResult.
Update doc to be more accurate about when onActivityResult is called

Bug: 140608415
Test: n/a
Change-Id: If44b02719e18b3107b064d749396d896bed08f86
2020-04-27 15:10:18 +00:00
TreeHugger Robot
77576fe964 Merge "CEC: Make HDMI CEC volume control configurable" into rvc-dev 2020-04-27 12:26:23 +00:00
Alex Johnston
c5e9a48db8 Merge "Add factory reset protection policy Test API to DPM" into rvc-dev 2020-04-27 11:04:46 +00:00
Marvin Ramin
da665a67f1 CEC: Make HDMI CEC volume control configurable
Add API (backed by Setting) to enable/disable volume changes via HDMI
CEC for HDMI CEC source devices.
This state is persisted via Settings.

If volume control is disabled, no incoming HDMI CEC commands related to
volume will be processed. If disabled, no HDMI CEC volume control
messages will be sent by the device.

Test: atest com.android.server.hdmi
Bug: 149800547

Merged-In: I83ae9b423122b540b9adb156fb1c6f5964dd6105
Change-Id: I83ae9b423122b540b9adb156fb1c6f5964dd6105
2020-04-27 12:35:56 +02:00
Charles Chen
413ce328e5 Merge changes Ida26b961,I1d416b9c into rvc-dev
* changes:
  Fix error in DecorView's ViewConfiguration
  Fix DecorView error about non-visual context
2020-04-27 08:57:58 +00:00
Charles Chen
6661575791 Fix DecorView error about non-visual context
This error showed because DecorContext uses application context
to get WindowManager. This CL changes to use PhoneWindow to obtain
WindowManager instance. Also refactor ctr to obtain context from
PhoneWindow.

Bug: 152806048
Test: manual - enable strict mode and check the error log not shown.
Test: atest DecorContextTest
Test: atest MemoryTests#testActivityRecreation
Change-Id: I1d416b9cdb015c9bc3553571041f3b14bb9da5da
2020-04-27 16:37:46 +08:00
TreeHugger Robot
6e9ee1c78f Merge "Keeps the served view of the window when focus to the next window" into rvc-dev 2020-04-27 04:40:38 +00:00
Ming-Shin Lu
6743813471 Keeps the served view of the window when focus to the next window
CL[1] intends to reset served view and restart input state when focus to
the next window, which the main idea is try to make the lifecycle of the
input connection can more aligned with the window focus change.

However, this behavior change unexpectedly breaks Gboard
TranslatesUIExtention that will closeExtensionView when
onFinishInputView -> onDeactivate called, while launching language
selection dialog.

Remove the reset logic as the lifecycle of input connection still
needs to break down.

[1]: I8d4fff94ba9313b773bc27fcbd019cc88580d3e9

Fix: 152373385
Test: To make sure not break Bug 148489857 and Bug 148788569, following
auto / manual test to verify:
 - Auto: atest FocusHandlingTest#testKeyboardStateAfterImeFocusableFlagChanged
 - Manual:
    1) Build / install EditTextVariations
    2) Select menu -> Direct-Reply, make sure Notification comes up.
    3) Tap EditText on Notification, verify soft-keyboard is visible.

Change-Id: If20cdb43ecd013c330c5e16c73e9af972bd89f33
2020-04-27 03:22:52 +00:00
Philip P. Moltmann
18247c1a8c Allow tests for more PermissionControllerManager methods
Test: atest RuntimePermissionPresentationInfoTest PermissionControllerTest
Bug: 155019930
Change-Id: I4baca0f35e7218fbf127d56fcdf1fe1855d64929
2020-04-26 17:52:41 -07:00
Ytai Ben-tsvi
f7d789b0ed Merge "Deliver internal server errors to the client" into rvc-dev 2020-04-25 01:34:06 +00:00
TreeHugger Robot
525fab26a1 Merge "Add back ActivityManagerService.onUserRemoved" into rvc-dev 2020-04-25 01:16:49 +00:00
Darryl Johnson
637fd24378 Merge "Revert "Try to reland Ib3ee007bc"" into rvc-dev 2020-04-25 00:37:46 +00:00
Darryl Johnson
87f93a5585 Revert "Try to reland Ib3ee007bc"
This reverts commit b6415618f1.

Reason for revert: Caused regression of b/149213586

Bug: 148639826
Bug: 149213586

Change-Id: I5248e03b42e3f24a6e2abb134d0bf339e77f484b
2020-04-24 23:50:53 +00:00
Ytai Ben-Tsvi
458930753d Deliver internal server errors to the client
Due to a binder limitation (b/150808347), any unexpected exception
thrown by a binder service while processing an RPC call, will be
silently discarded and the client will get back a default-initialized
result parcelable (i.e. in most cases, won't know that anything wrong
happened).

We work around this issue by throwing a ServiceSpecificException,
which does get delivered, having a special code to designate an
internal error. Errors resulting from a HAL malfunctions will result
in a HAL reboot, which leads to recovery.

Bug: 154089179
Test: Manual verification of basic error recovery scenarios by
      injecting HAL error codes and crashes.
Change-Id: Ib5dbe08a362e545501c04204bebad5ab95f5d632
2020-04-24 16:39:36 -07:00
Jing Ji
b344e0ac95 Merge "Fix test failure in testProcessStateByPulling" into rvc-dev 2020-04-24 23:05:08 +00:00
Eugene Susla
181ef8dfa1 Merge "Update auto revoke deeplink action javadoc: extra -> Uri" into rvc-dev 2020-04-24 22:27:00 +00:00
Adam Bookatz
aa59419bbd Add back ActivityManagerService.onUserRemoved
ActivityManagerService.onUserRemoved was accidentally removed in
ag/4246926. This cl adds it back.

The part of onUserRemoved that told ActivityTaskManagerService that
the user had stopped (and thereby cleaned up ATMS) was retained, but
the additional actions of AMS.onUserRemoved - namely, telling
BatteryStatsService and UserController - were accidentally removed.
Consequently, those services were never told when a user was removed.

Bug: 140645064
Test: manual verification that profile is removed in  adb shell dumpsys activity users
Change-Id: I903b06ae68d583bdb326ad3b764a63d18b5555d8
2020-04-24 22:24:05 +00:00
Aran Ink
d397b9084d Add dismissImmediate to ListPopupWindow to prevent window leaks in GlobalActionsDialog.
Fixes: 154640131
Test: Manual -- Use 'adb shell dumpsys window windows || grep "PopupWindow"' to confirm number of PopupWindows displayed (should be zero at home screen.)
Open GlobalActions. Tap the power overflow menu and check number of PopupWindows while the overflow dropdown is visible (should be 1).
Put the phone to sleep by pressing the power button. Wake phone and make sure number of PopupWindows is 0.
Repeat with Controls structure switcher dropdown and add controls dropdown.

Change-Id: I4ae2d86e981465e8e6c0adf924a6fc2eabfc88ee
2020-04-24 18:06:14 -04:00
Robert Carr
b9cf275b9b BLAST: Two start-up optimizations
1. Avoid a seperate IPC querying in to system-server
   to initialize the mUseBLAST flag.
2. Avoid calling property_get_bool with each BufferQueue
   creation.

Instead we piggy-back both values inside addWindow return values.

Bug: 152501005
Test: Existing tests pass
Change-Id: If130560a8230f8d399cf7631264d551522939faa
2020-04-24 14:42:55 -07:00
TreeHugger Robot
8f0b08f178 Merge "Migrate clients from Binder.waitForService to ServiceManager.waitForService" into rvc-dev 2020-04-24 21:16:54 +00:00
Sally Yuen
8ab42a27ce Merge "Add @TestApi to registerSystemAction and unregisterSystemAction" into rvc-dev 2020-04-24 20:12:16 +00:00
Taran Singh
8321a2a48d Add test for ImeInsetsSourceConsumer
Add test to verify that requestedVisibleAwaitingControl starts
animation. This is followup test for comment in commit
I958fc5747382109aa2f21bc1067a28746e7242d8

Bug: 154440912
Fix: 153577930
Test: atest ImeInsetsSourceConsumerTest
Change-Id: I08db27151605ac53b0575b08343b5a75dc2e5fc2
2020-04-24 11:37:30 -07:00
TreeHugger Robot
137f875360 Merge "Use waitForDeclaredService to get Lights HAL" into rvc-dev 2020-04-24 17:23:42 +00:00
TreeHugger Robot
f0de93d7b2 Merge "Use Arrays.hashCode in DeviceProductInfo" into rvc-dev 2020-04-24 14:24:25 +00:00
Robin Lee
9e1181302a Use waitForDeclaredService to get Lights HAL
We cache the reference to the HAL and use a DeathRecipient to keep track
of whether it's still good.

Adds waitForService and waitForDeclaredService to the ServiceManager
Java implementation because they were missing.

Test: atest LightsManagerTest
Test: atest LightsServiceTest
Bug: 152509747
Bug: 154631113
Bug: 154627432
Bug: 154629168
Change-Id: Ife8471f3a7e47b48bb31015ddf40f1d7fef6240f
2020-04-24 16:12:27 +02:00
Marin Shalamanov
90fd0b19f8 Use Arrays.hashCode in DeviceProductInfo
Using arrays in Objects.hash() is error prone. Instead we
call Arrays.hashCode().

Test: m services
Bug: 154302664
Change-Id: Icf00fbaa465ef60951998659ae0333b2faf7042b
2020-04-24 13:02:35 +00:00
Jing Ji
468e6c3909 Fix test failure in testProcessStateByPulling
Added a new flag "--statsd" to dumpsys procstats, it'll dump
the identical protobuf data as the one being sent to statsd;
these data is aggregated/reduced.  The tradtional "--proto"
is still supported in case the full data is needed.

Align the ProcStats's proto message definition with the statsd.

Fixed various other issues with ProcStats's dumping.

Bug: 148542701
Test: atest ProcStatsValidationTests
Change-Id: I5a22603bfbc97bfac93179289df839710364677d
2020-04-24 05:01:22 -07:00
TYM Tsai
4ddfdaf641 Merge "Filter the content of the Bundles used as extras and styling APIs" into rvc-dev 2020-04-24 08:42:56 +00:00
Paul Chang
b43fb9b839 Merge "Send intent to let calling app show UI safely without interfering the bugreport/screenshot generation." into rvc-dev 2020-04-24 08:23:21 +00:00
Shawn Lin
b578ddde3e Merge "Update the description of getWaterfallInsets()" into rvc-dev 2020-04-24 05:56:04 +00:00
Jason Hsu
ea2d4bf1fd Merge changes from topic "rhedjao_a11y_button_rollback" into rvc-dev
* changes:
  Rollback chooser menu to version Q behavior for accessibility button (2/n).
  Rollback chooser menu to version Q behavior for accessibility button (1/n).
2020-04-24 03:07:39 +00:00
Charles Chen
56dfd7c643 Merge "Revert "Fix false positive of activity leak in NexusLauncherTests"" into rvc-dev 2020-04-24 02:55:31 +00:00
Mehdi Alizadeh
e65b53e5d7 Include cache-only and pinned-only shortcuts as Sharing shortcuts as well
Bug: 154249544
Test: atest com.android.server.pm.ShortcutManagerTest1
            com.android.server.pm.ShortcutManagerTest2
            com.android.server.pm.ShortcutManagerTest3
            com.android.server.pm.ShortcutManagerTest4
            com.android.server.pm.ShortcutManagerTest5
            com.android.server.pm.ShortcutManagerTest6
            com.android.server.pm.ShortcutManagerTest7
            com.android.server.pm.ShortcutManagerTest8
            com.android.server.pm.ShortcutManagerTest9
            com.android.server.pm.ShortcutManagerTest10
Change-Id: Iacbca104e0fee91d80768bd0280db252aca2c5c0
2020-04-23 18:37:08 -07:00
Jean-Michel Trivi
1c21c7c74b Merge "Add method in Handler to remove messages with equal object" into rvc-dev 2020-04-24 00:02:55 +00:00
Eugene Susla
f33f0315ad Update auto revoke deeplink action javadoc: extra -> Uri
Test: presubmit
Bug: 153607914
Change-Id: I02816b71a898d3cac0d50f988b1fdc3427067e14
2020-04-23 16:05:03 -07:00
TreeHugger Robot
a721ccdc7c Merge changes from topic "bound status" into rvc-dev
* changes:
  DataLoader cleanup: return plain FD from Java.
  Keep only service binding in DataLoaderManager.
2020-04-23 22:50:46 +00:00
Julia Reynolds
37e724b15d Merge "Record whether apps have sent msg notifications" into rvc-dev 2020-04-23 22:19:53 +00:00
Robin Lee
3124f5c44e Migrate clients from Binder.waitForService to ServiceManager.waitForService
Change-Id: I749203ba09b63dd4aafd6e7df9b87b3fd7955689
Test: ApexManagerTest # (and manually flash a device)
Fix: 154629168
2020-04-23 21:05:46 +00:00