Commit Graph

6656 Commits

Author SHA1 Message Date
TreeHugger Robot
25d9d08a8a Merge "Fix crash in IntentForwarderActivity" into rvc-dev am: f9a02be500
Change-Id: Ia0f9de5e647cc678a3cdf847911c8062546150dd
2020-04-21 19:06:30 +00:00
TreeHugger Robot
f9a02be500 Merge "Fix crash in IntentForwarderActivity" into rvc-dev 2020-04-21 18:52:54 +00:00
Miranda Kephart
b041c1a837 Merge "Add screenshots logging" into rvc-dev am: 44cc1e274b
Change-Id: I399d940c094ceab6c9996449505499bff71493a8
2020-04-21 17:08:15 +00:00
kholoud mohamed
149e0fe89e Fix crash in IntentForwarderActivity
The crash was caused by trying to resolve an instant
app which is not allowed on the main thread, fixed it by
resolving on a background thread.

Fixes: 146141583
Test: atest IntentForwarderActivityTest
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: I250d682cf90870c7360eb66529be8c91fac266b1
2020-04-21 18:06:03 +01:00
Miranda Kephart
44cc1e274b Merge "Add screenshots logging" into rvc-dev 2020-04-21 16:58:54 +00:00
Mark Renouf
19be640d6f Merge "Scroll Capture Framework" into rvc-dev am: 03f9a814a5
Change-Id: Ie9cc6da06f1d900a3750750df9f70fa4a9868d52
2020-04-20 19:23:54 +00:00
Mark Renouf
03f9a814a5 Merge "Scroll Capture Framework" into rvc-dev 2020-04-20 19:20:13 +00:00
TreeHugger Robot
23d07666b4 Merge "Apply intensity settings to composed vibration effects" into rvc-dev am: 896cdcca42
Change-Id: I38e330bd5728b767525b5d2c8ef4133a92c54c8b
2020-04-20 18:29:12 +00:00
TreeHugger Robot
896cdcca42 Merge "Apply intensity settings to composed vibration effects" into rvc-dev 2020-04-20 18:11:30 +00:00
TreeHugger Robot
17588e48ee Merge "Use startActivityAsCaller instead of startActivity." into rvc-dev am: 1161f28ddb
Change-Id: Idb65dcfa29e475cacb20d0c77784d74b6936a1d4
2020-04-20 17:43:04 +00:00
TreeHugger Robot
1161f28ddb Merge "Use startActivityAsCaller instead of startActivity." into rvc-dev 2020-04-20 17:36:59 +00:00
arangelov
e7b713474b Use startActivityAsCaller instead of startActivity.
Also make canForward return null for ACTION_CHOOSER.

Fixes: 154225763
Test: manual
Test: atest IntentForwarderActivityTest
Change-Id: If035607a751af857a39f42e45633a35b44e3e83e
2020-04-20 17:04:07 +01: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
TreeHugger Robot
1bfa924804 Merge "Try to reland Ib3ee007bc" into rvc-dev am: 7f801fe0d1
Change-Id: I554f07ee937c1afbfb294e3de718e01aee4e2879
2020-04-20 00:42:44 +00:00
TreeHugger Robot
7f801fe0d1 Merge "Try to reland Ib3ee007bc" into rvc-dev 2020-04-20 00:29:45 +00:00
Miranda Kephart
7b2c313da7 Add screenshots logging
Bug: 150710005
Test: manual
Change-Id: I54a37eb0a62234c6c53fc0f3c80e18e9ee269f12
2020-04-17 13:28:23 -04:00
Joshua Duong
c5724f3543 Merge "Fix PendingIntent hijacking for adb notifications." into rvc-dev am: 9a419cda53
Change-Id: I8f96b2aa8ca127380891f9a0a790224f092e9118
2020-04-17 16:17:42 +00: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
Michael Groover
e8b18053bf Merge "Update PM#checkSignatures to support pre-key rotation behavior" into rvc-dev am: 42183bf508
Change-Id: Ia24fa82c3d0a36d50b66a081b14cc1af9d50d70c
2020-04-17 15:40:00 +00:00
Michael Groover
42183bf508 Merge "Update PM#checkSignatures to support pre-key rotation behavior" into rvc-dev 2020-04-17 15:36:09 +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
Michael Groover
a4a01127d8 Update PM#checkSignatures to support pre-key rotation behavior
When key rotation was added in P all of the existing signature methods
were updated to support pre-key rotation behavior (eg GET_SIGNATURES
returns the first key in the signing lineage), but checkSignatures
was not updated to support similar behavior. This commit updates
checkSignatures to check the oldest signer in the lineage, if either
of the reqested packages has one, if the existing signature check fails.
This allows a developer to compare their app signed with a rotated key
against both an app signed with the previous key as well as an app
signed with only the new key.

Bug: 153910385
Test: atest PackageManagerTests
Test: atest PackageManagerTest
Change-Id: Id0af68bab2b85dc91643551b1f5934c2b8df317f
2020-04-16 18:35:39 -07:00
TreeHugger Robot
efa9b48055 Merge "Add TEST_MAPPING to overlay test directories" into rvc-dev am: 30cefb3391
Change-Id: I58fe1c5ab0158fac9bd6cb98a5c11b978612e916
2020-04-16 23:30:02 +00:00
TreeHugger Robot
30cefb3391 Merge "Add TEST_MAPPING to overlay test directories" into rvc-dev 2020-04-16 23:09:26 +00:00
TreeHugger Robot
d63719912a Merge "Revert "Fix InstallOverlayTests fail to install overlay"" into rvc-dev-plus-aosp 2020-04-16 20:27:52 +00:00
TreeHugger Robot
16ec3b2c46 Merge "Show other profile tab if 0 apps in current profile and >1 in the other." into rvc-dev am: 2dda126b01
Change-Id: Ib35d6903f21be73ee049a30083eafba9fd7fefef
2020-04-16 20:17:23 +00:00
TreeHugger Robot
2dda126b01 Merge "Show other profile tab if 0 apps in current profile and >1 in the other." into rvc-dev 2020-04-16 20:03:45 +00:00
Dan Shi
b1c1626292 Revert "Fix InstallOverlayTests fail to install overlay"
Revert submission 10998826-invalidate_idmap

Reason for revert: b/153875232
Reverted Changes:
Ic8274031c:Fix InstallOverlayTests fail to install overlay

Change-Id: Iff04010c930a250f7357ca812ec2e38d8bc7de09
(cherry picked from commit 8b99b82397)
2020-04-16 19:02:35 +00:00
arangelov
2c6115af27 Show other profile tab if 0 apps in current profile and >1 in the other.
Currently if we have 0 browser apps in work profile and >1 in personal,
and we try open a link from the  work profile, the personal profile
intent resolver is launched. We handle this gracefully by showing the
work tab and the no apps found empty state screen, instead of the
cross profile intents disabled.

Other changes in this commit:
- Handle all empty state screens from a single method
- All empty state screens are now shown from ResolveActivity#onPostListReady.
This was needed to guarantee consistency when showing the header.
- Always create the header exactly once for the lifetime of the intent
resolver/share sheet. Before it was re-created when swiping back to
the initial tab.
- Always show the header text when the tabbed view is enabled.

Fixes: 148536209
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest

Change-Id: I737f1e8f864ae1108af7ec3ba8a1fa0f10b383b0
2020-04-16 19:07:43 +01:00
Shu Chen
f4d56c5846 Merge "Prevents multi touch among TextView and handle reviews." into rvc-dev am: 9b6af1dcc5
Change-Id: Id56052c3dd95719ad570f6ffd4d249e263018fca
2020-04-16 15:43:57 +00:00
Shu Chen
9b6af1dcc5 Merge "Prevents multi touch among TextView and handle reviews." into rvc-dev 2020-04-16 15:32:32 +00:00
Orion Hodson
18f7afccb6 Merge "Add explicit dependencies on jni_headers" am: c0fe0ae29f am: 6963d8e1c8
Change-Id: I2fdf3826653466d65e3d63fa896d1ec23c5716cd
2020-04-16 10:58:50 +00:00
Orion Hodson
6963d8e1c8 Merge "Add explicit dependencies on jni_headers" am: c0fe0ae29f
Change-Id: I8c84a9de389c0f82c307d835344038373d75f61a
2020-04-16 10:45:48 +00:00
Orion Hodson
63f06b738d Add explicit dependencies on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Also remove unnecessary jni.h includes from PathParser.{h,cpp}.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
2020-04-16 08:26:14 +00:00
Shu Chen
eb8b1ba3df Prevents multi touch among TextView and handle reviews.
- First touch on TextView blocks secondary touches on handles.
 - First touch on handles blocks later touches on TextView but doesn't block secondary touches on other handles.

Bug: 150995597
Test: manually tested & automation tests:
  atest FrameworksCoreTests:EditorCursorDragTest
  atest FrameworksCoreTests:TextViewActivityTest
Change-Id: I7717fc061fc81514fc1dad0d3acbc73e683516cf
2020-04-16 13:58:10 +08:00
Rhed Jao
8fcba0353e Fixes long press the a11y shortcut no response
An a11y service targeting sdk version > Q and requesting a11y button
should be turned on by the Settings when it's assigned to the a11y
shortcut by the user. An a11y button callback is sent to the a11y
service when the user long press the a11y shortcut.

This issue happened when an disabled a11y service is assigned to the
a11y shortcut, and upgraded to the target sdk version > Q. Framework
fails to send the callback and no response when user long press the
shortcut.

Turns on the a11y service and show up a toast to fix this issue.

Bug: 153517972
Test: atest AccessibilityShortcutControllerTest
Change-Id: Ie4fc9bbeaf08ba674cfe6382eab214b2a15c004c
2020-04-16 12:14:23 +08:00
Ryan Mitchell
36f52880ee Add TEST_MAPPING to overlay test directories
This changes add TEST_MAPPING files to the directories containing
overlay tests so changes to the test will be tested during presubmit.

Bug: 153631240
Test: presubmit
Change-Id: I6de870f8870d49f5325827c476b9cfbae9a59066
2020-04-15 11:14:59 -07:00
TreeHugger Robot
1f6f9a6c75 Merge "Start sharesheet in the same profile instead of switching to other profile." into rvc-dev 2020-04-14 13:15:56 +00:00
Riddle Hsu
aec74e1a62 Merge "Do not unparcel bundle from application in LaunchActivityItem" into rvc-dev 2020-04-13 10:12:56 +00:00
TreeHugger Robot
82dc6147f1 Merge "Update the set of cursor drag tests that run in presubmits" into rvc-dev 2020-04-13 07:33:05 +00:00
TreeHugger Robot
5b3e4d946f Merge "Make internal printing tests compatible with helpers" into rvc-dev 2020-04-10 23:15:19 +00:00
Benjamin Gordon
65bab93fcc Make internal printing tests compatible with helpers
WorkflowTest and IPrintManagerParametersTest extend BasePrintTest from
CtsPrintTestCases, which means they now try to load a helper when
BasePrintTest.setUp() runs.  Add the helper installer target preparer
and package to their build files so that these can be found as expected.

With UiDevice being removed from BasePrintTest, also move getUiDevice()
over into the internal tests directly so that they can continue using it.

Bug: 153727434
Test: atest PrintSpoolerOutOfProcessTests android.test.IPrintManagerParametersTest
Change-Id: I7ff580c4288c83a69e319ff3668dcb98b11e4f41
2020-04-10 14:57:22 -06:00
Riddle Hsu
3c3e0c659a Do not unparcel bundle from application in LaunchActivityItem
The bundle fields may contain custom Parcelables. And Bundle#size
will call unparcel that causes BadParcelableException from
LaunchActivityItem#hashCode and LaunchActivityItem#equals.

Since the bundle fields of LaunchActivityItem may not be significant
for being the accurate identity of the item, the bundle fields can
be treated roughly (empty or not) to avoid unparceling.

Fixes: 153737846
Test: atest FrameworksCoreTests:TransactionParcelTests#testLaunch

Change-Id: I7ec55bbfcffcd47cfb586ede8053ab411891902d
2020-04-11 02:21:10 +08:00
TreeHugger Robot
4914d4cd4c Merge "Add tests for RRO of APK-in-APEX." into rvc-dev 2020-04-10 18:19:26 +00:00
Ryan Mitchell
6cb79cdfb7 Merge changes from topic "invalidate_idmap" into rvc-dev
* changes:
  Fix InstallOverlayTests fail to install overlay
  Test that upgrading target apk invalidates idmap
  Invalidate idmap when target updates
2020-04-10 15:50:15 +00:00
Nikita Dubrovsky
cac7080163 Update the set of cursor drag tests that run in presubmits
Bug: 152948704
Test: Ran test locally and presubmits
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: Ice1b3bf49cf556353f6b7c0b14fde0ebad3cc83e
2020-04-09 23:06:38 -07:00
Gavin Corkery
90a08384be Add tests for RRO of APK-in-APEX.
Add tests to ensure that 1) an APK-in-APEX can overlay a /system APK
2) an APK-in-APEX can be overlaid be a /system APK. This is done
by installing the overlay APK or the target APK inside a test APEX.

Bug: 147731966
Test: atest OverlayRemountedTest
Change-Id: Id2c331f124994f55cd936b98ec2f27c9d3265424
2020-04-09 14:42:08 -07:00
Ryan Mitchell
5900a1d3c5 Fix InstallOverlayTests fail to install overlay
There is a key signing problem in general-tests so move all overlays
to device-tests.

Bug: 141998755
Bug: 153631240
Bug: 153630797
Test: atest InstallOverlayTests
Change-Id: Ic8274031c8bd0aca5a6b7ccfee53b047334ab060
2020-04-09 14:17:17 -07:00