Commit Graph

103717 Commits

Author SHA1 Message Date
TreeHugger Robot
6b74050d48 Merge "Add currentUiModeSupportsErrorDialogs() into ActivityTaskManager." into rvc-dev 2020-04-21 18:35:44 +00:00
Miranda Kephart
44cc1e274b Merge "Add screenshots logging" into rvc-dev 2020-04-21 16:58:54 +00:00
Yuncheol Heo
5d9b2710da Add currentUiModeSupportsErrorDialogs() into ActivityTaskManager.
The method will be used in AnrTests to check if the system can support ANR Dialog or not.

Bug: 149510025
Test: atest AnrTests
Change-Id: I7a78be06fcf3c4882931aaea1d330b2cebdc2d84
2020-04-21 16:24:22 +00:00
Martijn Coenen
29d6a24fbf Merge "Don't update quota for non-emulated volumes." into rvc-dev 2020-04-21 12:22:48 +00:00
Martijn Coenen
1b981a3aea Don't update quota for non-emulated volumes.
Since they don't support quota. Also, don't throw an exception if we
can't find a volume for the passed-in path, but warn instead: the volume
may be unstable and have disappeared by the time we do this.

Bug: 152618535
Test: boot emulated image; verify no crashes when inserting media on
      public storage
Change-Id: I0e6b8f5c9f9f35b80b7bd5f6255a70e210a30474
2020-04-21 12:51:47 +02:00
Jason Hsu
9e0ada13c8 Merge "Return empty for empty string in AccessibilityShortcutInfro#loadHtmlDescription" into rvc-dev 2020-04-21 09:41:59 +00:00
Jason Hsu
61f191f198 Merge "Allow one of description or htmlDescription attribute provided for AccessibilityShortcutInfo" into rvc-dev 2020-04-21 09:41:14 +00:00
TreeHugger Robot
ce0f9f7628 Merge "Support multiple requiredSystemProperty in overlay" into rvc-dev 2020-04-21 07:05:32 +00:00
TreeHugger Robot
afe3e11c65 Merge "Check for null mBlastBufferQueue" into rvc-dev 2020-04-20 23:22:49 +00:00
Sally Yuen
fdea871287 Merge "Support sending KEYCODE_HEADSETHOOK KeyEvent from an a11y service" into rvc-dev 2020-04-20 22:31:04 +00:00
chaviw
ab581a4c04 Check for null mBlastBufferQueue
If there is a sync transaction, but blast is not enabled,
mNextDrawUseBLASTSyncTransaction will be true, but mBlastBufferQueue
will be null. This will cause a NPE when trying to call
mBlastBufferQueue.setNextTransaction

Test: Use sync transaction without blast
Fixes: 154527936
Change-Id: Ibff2de7fc7460f882acaceb0182c68ea4b05afb7
2020-04-20 12:48:19 -07:00
Julia Reynolds
03d5c91379 Merge "Update default for conversations in DND" into rvc-dev 2020-04-20 19:44:13 +00:00
sallyyuen
867c6d2786 Support sending KEYCODE_HEADSETHOOK KeyEvent from an a11y service
Add a private global action to be made public in S. A service can
trigger the event by calling performGlobalAction(10) in R.

Note: Currently 10 is being used by SystemActions for the Accessibility
shortcut. Update ag/10921262 to avoid a conflict.

Bug: 154038741
Test: Tested with modified TalkBack and Youtube play/pause
Change-Id: I3ca5d25948bfb3eb8520030484cb466ec7188784
2020-04-20 12:21:21 -07:00
Mark Renouf
03f9a814a5 Merge "Scroll Capture Framework" into rvc-dev 2020-04-20 19:20:13 +00:00
TreeHugger Robot
896cdcca42 Merge "Apply intensity settings to composed vibration effects" into rvc-dev 2020-04-20 18:11:30 +00:00
Julia Reynolds
96c9c4f967 Update default for conversations in DND
Including a one time reset of dogfooders/dev preview users

Test: manual - value is reset on first boot
Test: manual - change value, reboot, value is maintained
Fixes: 154234926
Change-Id: I5e4b338d6d7cc30dec1b12d31c3f1461c6f664cc
2020-04-20 13:52:53 -04:00
Stanislav Zholnin
ae4605eee8 Merge "Allow listening for noted Ops if app is sampled for Stack trace collection." into rvc-dev 2020-04-20 15:21:10 +00:00
Michael Wachenschwanz
dcc388ab44 Merge "Add permission check to UsageStatsManager#isAppInactive" into rvc-dev 2020-04-20 15:15:35 +00:00
Mark Renouf
a927929d99 Scroll Capture Framework
This is an implementation of long screenshots supporting
interactive, incremental capture of scrolling content using
a cooperative API between the app process and the system.

Design goals:

 - Provide for tile based incremental screenshots of scrolling content
 - Support existing apps without developer action
 - Provide support for non View-based Apps & UI toolkits

Bug: 148131831
Test: atest \
      FrameworksCoreTests:android.view.ScrollCaptureClientTest \
      FrameworksCoreTests:android.view.ScrollCaptureTargetResolverTest \
      FrameworksCoreTests:com.android.internal.view.ViewGroupScrollCaptureTest \
      FrameworksCoreTests:android.view.ScrollViewCaptureHelperTest \
      WmTests:com.android.server.wm.DisplayContentTest

Merged-In: I6c66a623faba274c35b8fa857d3a72030a763aea
Change-Id: I6c66a623faba274c35b8fa857d3a72030a763aea
2020-04-20 15:07:59 +00:00
Lais Andrade
bf7a301ab0 Apply intensity settings to composed vibration effects
Use the existing maxAmplitude and gamma adjustment values to apply the
relative scaling of default vibration intensity settings and user
settings on top of the PrimitiveEffect#scale value.

As a consequence, the relative scaled amplitude of a OneShot or Waveform
vibration effect should match the scaled PrimitiveEffect#scale value.

Fix: 154089649
Test: atest FrameworksCoreTests:VibrationEffectTest
Change-Id: I3ca0042a42675289a2ed8110c9dc3798055ebf4a
2020-04-20 15:02:15 +00:00
jasonwshsu
066a544d06 Return empty for empty string in AccessibilityShortcutInfro#loadHtmlDescription
* Follow the behavior to return empty if given string is empty
	- AccessibilityServiceInfo#loadDescription
	- AccessibilityServiceInfo#loadHtmlDescription
	- AccessibilityShortcutInfo#loadDescription
	- AccessibilityShortcutInfo#loadHtmlDescription

Bug: 154092127
Test: manual test
Change-Id: I77f455945c569c81cb00127a7913bae4db1b3d1c
2020-04-20 14:57:40 +00:00
Linus Tufvesson
3bfec32633 Merge "Make ActivityViews backing virtual display private" into rvc-dev 2020-04-20 14:00:28 +00:00
jasonwshsu
72dfaf89d7 Allow one of description or htmlDescription attribute provided for AccessibilityShortcutInfo
* Only two of them are empty should throw parser error

Bug: 154092127
Test: manual test
Change-Id: I038dbb054f4302b9f5e2c3246fb9539c77533339
2020-04-20 21:59:24 +08:00
Jeongik Cha
9ccdd32880 Support multiple requiredSystemProperty in overlay
As-is: Only one requiredSystemProperty is allowed
To-be: It supports several requiredSystemProperty

Here is format for multiple fields.
  android:requiredSystemPropertyName="rw.num,rw.char"
  android:requiredSystemPropertyValue="1,a"

Test: m
Test: Make two overlay with different condition
      Check if it works properly depending on condition
      If there is no overlay package matching the condition, both aren't
      applied

Bug: 137628879
Merged-In: I4c8c4a1304dc52d6568767d90e3dcbf6acef024a
(cherry picked from commit 5e6a87013f)
Change-Id: If3765218c96f8922c155e18e99b0f4bb6a032ff1
2020-04-20 08:11:45 +00:00
Joanne Chung
4661207775 Merge "Fix app crash if the selection is from reverse direction." into rvc-dev 2020-04-20 05:55:46 +00:00
TreeHugger Robot
7f801fe0d1 Merge "Try to reland Ib3ee007bc" into rvc-dev 2020-04-20 00:29:45 +00:00
Lee Shombert
9bca3a380d Merge "Disable binder caches in unit tests" into rvc-dev 2020-04-19 19:07:24 +00:00
Stanislav Zholnin
d4968a0221 Allow listening for noted Ops if app is sampled for Stack trace collection.
Bug: 136134050
Test: manual verification
Change-Id: I86a70e7b0bbcb114bd28bf5ab90bbf1c625f333a
2020-04-18 21:11:22 +01:00
TreeHugger Robot
4e16915321 Merge "Cleaning up resources on mount destruction." into rvc-dev 2020-04-18 06:35:35 +00:00
Alex Buynytskyy
9a54579ac5 Cleaning up resources on mount destruction.
DataLoaderStub's lifetime is controlled externally, but we want to
release resources ASAP.

Bug: b/153874006
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: I34035f36d1fe4ed0e4916014d859feb7fe2c0a09
2020-04-17 22:07:10 -07:00
Hui Yu
4db77a9749 Merge "Move noteAppWidgetTapped call into AppWidgetHostView." into rvc-dev 2020-04-18 04:03:52 +00:00
TreeHugger Robot
872afaeaeb Merge "Fixed Task#getVisibility to take into account task hierarchy" into rvc-dev 2020-04-18 02:23:41 +00:00
Nicholas Ambur
01b4d5cb13 Merge "add KeyphraseEnrollmentInfo to TestApi" into rvc-dev 2020-04-18 02:04:45 +00:00
Lee Shombert
6747eaa8e5 Disable binder caches in unit tests
Bug: 152451909

Unit tests often execute server code in the context if a test process.
Such a process does not have the same permissions as formal system
processes.  In particular, such a process does not have permission to
invalidate binder caches.

This change disables all binder cache code in the current process.
This means caching is disabled and invalidation never occurs.  There
are no permission violations and the test process is also unable to
affect (through cache invalidation) the actual system processes.

Test: Ran a list of atests.  Two had security violations before the
change but were okay after the change:
 * FrameworksServicesTests
 * UserSystemPackageInstallerTest
 Ran additional tests to verify no regressions:
 * PlatformScenarioTests
 * PtsChreTestCases
 * BluetoothInstrumentationTests
 * UserLifecycleTests

Change-Id: I011ee1eb39b2d52c69b6d5164b64f7418d2bbdd4
2020-04-17 16:37:50 -07:00
TreeHugger Robot
dd08939ba8 Merge "RESTRICT AUTOMERGE: Autocork package invalidations" into rvc-dev 2020-04-17 23:26:42 +00:00
TreeHugger Robot
e185aca339 Merge changes If07d6938,I32f9b89a,Ife4f8c4e into rvc-dev
* changes:
  RESTRICT AUTOMERGE: Add a facility for time-based cache corking
  RESTRICT AUTOMERGE: Cork permission and package cache around bulk permission update
  RESTRICT AUTOMERGE: Cork package information cache invalidations during boot
2020-04-17 23:25:02 +00:00
TreeHugger Robot
dd4cd092b3 Merge "SurfaceView: Remove dead code" into rvc-dev 2020-04-17 22:52:27 +00:00
Nicholas Ambur
d3c1f27b0c add KeyphraseEnrollmentInfo to TestApi
KeyphraseEnrollmentInfo is used for testing the system enrollment
application support within GTS.

Bug: 153264697
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases \
-t com.google.android.assist.gts.KeyphraseModelManagerTest# \
testAllSystemKeyphrasesAndLocales

Change-Id: I66558cf849f2815f2c917d128f9f9cc0673750ef
Merged-In: I66558cf849f2815f2c917d128f9f9cc0673750ef
2020-04-17 22:12:13 +00:00
Wale Ogunwale
0db64ac043 Fixed Task#getVisibility to take into account task hierarchy
Also, correct some uses of getRootHomeTask()

Fixes: 153086746
Bug: 154331729
Bug: 80414790
Test: atest WmTests:ActivityStackTests#testGetVisibility_MultiLevel
Change-Id: I8b9a38879a0b4e6c72686312b414319b8b086cd1
2020-04-17 15:05:34 -07:00
Robert Carr
b3ca38fb99 SurfaceView: Remove dead code
While debugging SurfaceView transaction usage I noticed this
code was unconditionally dead. Notice the else statement
only contains the single if statement within, so it could
be written as else-if. But then notice the condition of this
rewritten else-if is contained within the original if and
so it can never be entered.

Bug: 153120755
Test: Existing tests pass
Change-Id: I032b17911a9c71a1e3d09e3933e6f6a3d86dffb6
2020-04-17 14:14:33 -07:00
Winson Chiu
c7cd73aa00 Merge "Optimization: remove duplicated flags computations for getInstalledPackages" into rvc-dev 2020-04-17 21:04:18 +00:00
TreeHugger Robot
061f46b9bd Merge "Make setWallpaperZoomOut call oneway" into rvc-dev 2020-04-17 20:35:31 +00:00
Santiago Etchebehere
9548fd3220 Make setWallpaperZoomOut call oneway
There's no need to keep it synchronous

Bug: 154304487
Test: atest NotificationShadeWindowViewTest
Test: atest WallpaperControllerTests
Test: manual
Change-Id: I547e05fb4e2a5f2d30cfc5de354c36cd9070e65b
2020-04-17 11:53:36 -07:00
Edgar Arriaga
c7f8e75806 Optimization: remove duplicated flags computations for getInstalledPackages
Below are some test runs that show 100 iterations of getInstalledPackages ran
at activity startup of touchlatency app to demonstrate the perf cost.

R Baseline:
https://screenshot.googleplex.com/PnVi5APraJo
https://pprof.corp.google.com/?id=dc105ca9592f8367c381e2dcf7f1847d

R Optimized:
https://pprof.corp.google.com/?id=2d1d9fadc20bcc61d41bd52116bd94e3
https://screenshot.googleplex.com/OAwJnvwPqPH

Savings: 8% of system_server binder response time when the call is executed.

In terms total binder transaction time. Savings are 2% of the total
binder call time.

Exempt-From-Owner-Approval: CP to correct branch for R

Bug: 153656459

Test: atest FrameworksServicesTests:PackageParserTest
Test: atest FrameworksServicesTests:PackageParserLegacyCoreTest
Test: atest FrameworksServicesTests:ScanTests
Test: atest FrameworksServicesTests:ParallelPackageParserTest

Merged-In: I2de9cf1f754a505239d4416e1fc70bf77932c5db
Change-Id: I2de9cf1f754a505239d4416e1fc70bf77932c5db
(cherry picked from commit 7cb9e5f671)
2020-04-17 18:38:29 +00:00
Taran Singh
9641cfc0fa Support WIC.show(IME) from Activity#onCreate
In Q, app developer would've to wait for InputConnection on Editor before
showSoftInput() could be called. This made API very un-intuitive. While
WIC.show(ime) took care of some of the scenarios, it didn't handle
showing IME from onCreate() i.e. when control is not yet available.
This CL introduces a pending IME show request that waits until IME
control is available.

Test: atest WindowInsetsControllerTests#testShowImeOnCreate
Bug: 153014086

Change-Id: I93dd5790e1fb3d7841ad1323a45cd3bae2d6e9b8
2020-04-17 10:41:30 -07:00
Miranda Kephart
7b2c313da7 Add screenshots logging
Bug: 150710005
Test: manual
Change-Id: I54a37eb0a62234c6c53fc0f3c80e18e9ee269f12
2020-04-17 13:28:23 -04:00
Joshua Duong
9a419cda53 Merge "Fix PendingIntent hijacking for adb notifications." into rvc-dev 2020-04-17 16:08:57 +00:00
Joshua Duong
ec1980f86b Fix PendingIntent hijacking for adb notifications.
Use an explicit intent and set PendingIntent.FLAG_IMMUTABLE to prevent
someone from modifying the intent from PendingIntent.send(...).

Bug: 153356209

Test: atest AdbNotificationsTest
Test: In bug, install and launch the PoC apk and give it notification
permissions. Then, with USB/Wifi debugging enabled, disconnect and connect
the device to create the adb notification. the PoC apk should not have
permission to display information from
content://com.android.settings.files/my_cache/NOTICE.html.

Change-Id: Ie49aa3cf9b33168cf1435fc2427e95aac7f4609b
(cherry picked from commit 2c03881459)
Exempt-From-Owner-Approval: approved in master
2020-04-17 16:08:39 +00:00
wilsonshih
b6415618f1 Try to reland Ib3ee007bc
Don't let process configuration change application configuration,
but allow to update non-default display configuration while
initialize since the context is focus on different display.

Bug: 148639826
Test: atest PresentationTest ActivityThreadTest AppConfigurationTests
Change-Id: I16ba4eee64406d097b7ff0b7ff5c45175623663a
2020-04-17 21:31:24 +08:00
Jerry Chang
e63ae2f84f Mark more directory getter APIs @TestApi
To have a way to verify behavior of more directories, mark more
directory getter APIs @TestApi.

Bug: 148664742
Test: atest SysConfigTest#testStageWhitelist
Change-Id: I2d22412935b24ec4c33d8d1b3a7fbb7df4a08841
2020-04-17 14:50:48 +08:00