Commit Graph

6494 Commits

Author SHA1 Message Date
Rod S
b573a9d949 Update frameworks/base Emoji.java to Unicode 13.
As ICU is updated, delete special cases.

Test: atest core/tests/coretests/src/android/text/EmojiTest.java
Bug: 151964652

Change-Id: I89032c22e5464d257866d926062db34c65943572
(cherry picked from commit 31d7c155b7)
2020-03-19 23:12:53 +00:00
TreeHugger Robot
f4d1abb386 Merge "Improve strings for share sheet and intent resolvers." into rvc-dev 2020-03-19 17:39:58 +00:00
arangelov
afec9d0356 Improve strings for share sheet and intent resolvers.
Fixes: 151694643
Fixes: 150942431
Test: manual
Change-Id: Ie419e791aa1d2d2cbd32b3f091833b54b90c81eb
2020-03-19 15:46:09 +00:00
TreeHugger Robot
a895040b48 Merge "WindowInsetsAnimationController: Add additional assertions for new APIs" into rvc-dev 2020-03-19 12:15:41 +00:00
Neil Fuller
278c70832b Merge "Add command line support for testing tz detection" into rvc-dev 2020-03-19 11:17:15 +00:00
Sally Yuen
56da5ed373 Merge "Implement ACTION_LONG_CLICK for accessibility" into rvc-dev 2020-03-18 21:45:46 +00:00
Adrian Roos
02a3eb6e05 WindowInsetsAnimationController: Add additional assertions for new APIs
Bug: 151707442
Test: atest InsetsAnimationControlImplTest InsetsControllerTest
Change-Id: Ic70693329fb1d0116fc5b4d88a8d5fd499238441
2020-03-18 18:05:35 +01:00
Adrian Roos
269b162622 Merge "WindowInsetsAnimationController: Add state callback and getters" into rvc-dev 2020-03-18 16:43:10 +00:00
Adrian Roos
5d557edb44 WindowInsetsAnimationController: Add state callback and getters
Adds more comprehensive callbacks and getters for the WindowInsetsAnimationController,
to make it more straight forward to properly use.

Test: atest InsetsControllerTest PendingInsetsControllerTest
Fixes: 151707442
Change-Id: Ida55f609112396c0f6de4c5c4431e0793c2e315e
2020-03-18 12:17:19 +01:00
Andrii Kulian
10e5f36550 Merge "Don't override activity display adjustments with app config" into rvc-dev 2020-03-18 06:08:18 +00:00
Junyu Lai
3a6a98f5bb Merge changes from topics "am-ad04c8ad832c4674be35bfc5fe4280dd-rvc-dev", "sp21-api-review-feedback", "sp25-networkstats-rename" into rvc-dev
* changes:
  [SP25] Rename functions that add Entry conditionally
  [SP24] Rename functions that add Entry unconditionally
  [SP23] Address misc API review comment about NetworkStats
  [SP21] Address comments for API council review about aosp/1172143
  [SP20] Check signature permission when accessing network stats provider
2020-03-17 23:11:34 +00:00
sallyyuen
cc02ea36b2 Implement ACTION_LONG_CLICK for accessibility
Due to changes in R, the a11y framework no longer dispatches touch
events for a long press. This prevents the activation of EditText's floating menu.

We can re-enable it by implementing the proper a11y action
ACTION_LONG_CLICK. The menu itself is diffult to access through TalkBack's linear
navigation, but this is future work for a separate known issue.

Start and stop the menu for editable TextViews, which includes EditTexts.
Since touch events are no longer sent by a11y, separate the
accessibility handling from the touch handling infrastructure for long clicks in Editor.

We can't go through the main performLongClick code because it doesn't
actually start the action mode but rather sets pending, which routes
back to TextView. There's too little separation between the touch events and action logic.

Whoever touches the performLongClick code may need to also make
corresponding changes to the a11y path, but I suspect this won't happen often.

Remove the onInitializeA11yNodeInfo override for EditText because this
is handled by TextView.

Bug: 148127445
Test: Tested text fields in various apps. ag/10602004. atest
FrameworksCoreTests:TextViewActivityTest#testToolbarAppearsAccessibilityLongClick

Change-Id: I3958e5b80e6156e03c99335e0d0b671438965ebb
(cherry picked from commit 3f1203fb78)
Merged-In: I3958e5b80e6156e03c99335e0d0b671438965ebb
2020-03-17 18:30:08 +00:00
junyulai
88f89a0f02 [SP24] Rename functions that add Entry unconditionally
Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.

Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record unconditionally,
name them insertEntry.
  setIfaceValues -> insertEntry
  addEntry -> insertEntry

Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Test: m doc-comment-check-docs
Bug: 148895143
Change-Id: I801ddc49e283a254b9586700c9b597c0adb0d459
Merged-In: I801ddc49e283a254b9586700c9b597c0adb0d459
(cherry picked from aosp/1256352)
2020-03-17 14:59:31 +00:00
Eric Sandness
d204f75d49 Merge "Don't Show Work Profile Toast During Setup" into rvc-dev 2020-03-17 14:57:43 +00:00
Eric Sandness
e89d0e1ba5 Don't Show Work Profile Toast During Setup
Before device setup is complete, we shouldn't ever show the "using this
app outside your work profile" toast.  This toast is confusing in the
context of Setup Wizard.

Fixes: 150451876
Test: atest com.android.internal.app.IntentForwarderActivityTest
Test: Manually verified no toast during setup
Test: Manually verified toast appears after setup
Change-Id: I661cc18c625609726388f3705c7b893517e23323
2020-03-17 09:26:42 +00:00
Tony Mak
293bdf360a Remove local text classifier and related tests.
1. libtextclassifier and libtextclassifier-java are no longer built
   into framework/base.
2. Removed local text classifier code
3. Removed local text classifier test code.
   All of them should be already moved to libtextclassifier/tcs side.
4. Unify all the TC related log tags to "androidtc".

BUG: 147412216

Test: mts-tradefed run mts-extservices
Test: atest frameworks/base/core/java/android/view/textclassifier
Test: Sanity test: Smart selection

Change-Id: Icb1076153f51d5674c8a6c58681ffed5aa772149
2020-03-16 20:16:17 +00:00
Adrian Roos
146db0e46b Merge "Revert "Revert "WindowInsetsController: Address API feedback""" into rvc-dev 2020-03-16 17:03:31 +00:00
Khaled Abdelmohsen
2c89227525 Merge "Support multi apk stamp verification" into rvc-dev 2020-03-14 07:23:34 +00:00
Song Hu
e9851d5fad Merge "Prototype for Sharesheet direct share row append mechanism" into rvc-dev 2020-03-14 01:09:13 +00:00
Khaled Abdelmohsen
f6b1e8c3f6 Support multi apk stamp verification
Bug: 148005911
Test: atest FrameworksCoreTests:SourceStampVerifierTest
Change-Id: Iffab565a03ae57c469784baa12bec9cd130e69a1
2020-03-14 00:23:56 +00:00
Song Hu
e2deffd7bf Prototype for Sharesheet direct share row append mechanism
Use this cmd to enable the feature:
adb shell device_config put systemui append_direct_share_enabled true

Use this cmd to adjust timeout threshold (in millisecond):
adb shell device_config put systemui share_sheet_direct_share_timeout 15000

Bug: 151112858
Test: manually tested both prod flow and prototype flow on phones.

Change-Id: I328ecefc9dffad40ec412c033da54e0443f8889a
2020-03-13 13:52:24 -07:00
Andrii Kulian
8efbbe751f Don't override activity display adjustments with app config
When process configuration was applied on the client side it
accidentally applied an override to display adjustments in resources
for all ResourceImpl objects. This resulted in resources of
activities having incorrect display adjustments and reporting
incorrect display size.

This CL fixes the issue by updating the applied config with the
activity override. It also removes
ResourcesManager#applyNonDefaultDisplayMetricsToConfiguration, which
is no longer needed on the client side since the server-side is fully
multi-display aware.

Bug: 148639826
Test: ActivityThreadTest#testHandleConfigurationChangedDoesntOverrideActivityConfig
Test: AppConfigurationTests#testDisplaySizeInSplitScreen
Change-Id: Ib3ee007bcccd11451556b66274de4257cba082d4
2020-03-13 13:11:33 -07:00
Mihir Patel
b73c421753 Notifying the on-device intelligence service when view window insets have changed
bug:137800469

Test: manual
Change-Id: Ia69e273a6646fc15e289f75084a81193e71e1eef
2020-03-13 20:04:25 +00:00
Adrian Roos
5ad8cd2586 Revert "Revert "WindowInsetsController: Address API feedback""
This reverts commit 5e7097b21e
and relands Id4cb53fddcecac17b7926068046760df5130dc39

Change-Id: I348141f27efcf7c22736778fbcdde4a110e95982
Fixes: 150472709
Test: atest InsetsControllerTest
2020-03-13 19:40:34 +00:00
Joanne Chung
031fe36d35 Merge "Refine TC request classes." into rvc-dev 2020-03-13 19:35:33 +00:00
Joanne Chung
97d3a45453 Refine TC request classes.
Centrialize SystemTextClassifier fields into a class, e.g. userId,
useDefault, callingPackageName. Then all the TextClassifer request
should contain this class object. This helps to scalability if we
want to add new fields.

Bug: 149080832
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Test: atest CtsTextClassifierTestCases
Test: Manual. Check the parameters are expected when doing smart
selection, smart linkfy.
Change-Id: I224208adac333e2da7b4213f0905f6fb0abb8b2e

Change-Id: Iaef82c1d6ec8893888258820ac103f1b988eecfa
2020-03-13 13:15:39 +08:00
Jorim Jaggi
6d5c801c78 Use separate thread if app doesn't listen to animations
There is no need to introduce jank risk and run the inset
animations on the main thread if the app doesn't listen to
animation events. In that case, move the animations onto a
separate thread.

Bug: 118118435
Test: Inspect systrace
Change-Id: Ib6e4b4ce8e9dd8e27761ced6eb8d7700b6236a32
2020-03-11 22:58:59 +01:00
Neil Fuller
37aff8932f Add command line support for testing tz detection
Add support for "adb shell cmd time_zone_detector".

This allows platform developers and future host tests to simulate
clients like telephony / SettingsUI and make changes to the
TimeZoneDetectorService state to mimic various real-world situations.

Example adb shell invocations:

Withdraw a previous telephony suggestion from slot_index=0:

cmd time_zone_detector suggestTelephonyTimeZone --suggestion --slot_index 0 \
    --zone_id "_"

Make a new telephony suggestion from slot_index=0, with a quality of
TelephonyTimeZoneSuggestion.QUALITY_SINGLE_ZONE, and a matchType of
TelephonyTimeZoneSuggestion.MATCH_TYPE_NETWORK_COUNTRY_ONLY:

cmd time_zone_detector suggestTelephonyTimeZone --suggestion --slot_index 0 \
    --zone_id "Europe/London" --quality single --match_type country

Make a manual (user) suggestion as if from SettingsUI:

cmd time_zone_detector suggestManualTimeZone --suggestion --zone_id America/Los_Angeles

Bug: 140712361
Test: Various command line invocations.
Test: atest core/tests/coretests/src/android/app/timezonedetector
Merged-In: I0f16868a526d2ea4b17acbd274cb2359f93166f5
Change-Id: I0f16868a526d2ea4b17acbd274cb2359f93166f5
(cherry picked from commit 4879487862)
2020-03-11 18:44:53 +00:00
Jorim Jaggi
8dc835316a Merge "Add OnControllableInsetsChangedListener" into rvc-dev 2020-03-11 13:33:33 +00:00
Jeff Sharkey
8b0cff7108 Give hidden API behavior to legacy apps.
Starting in R, there is a new public API overload that delivers a
flags argument.  Some apps may be relying on a previous hidden API
that delivered a userId argument, and this change is used to control
delivery of the new flags argument in its place.

There are dozens of these hidden API users are in the system UID,
either in the system process or the Settings app, so we hard-code
giving them the legacy behavior, since refactoring would be messy
between internal and AOSP branches.

Also adjust incoming and outgoing method signatures to use slightly
more flexible Collection<Uri>, which has handy methods like
contains() and isEmpty().

Bug: 150939131
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If6a77449e19215cf1c60d4217e62fc04b0959bfc
2020-03-10 16:36:21 -06:00
Zimuzo Ezeozue
f46b9c9656 Merge "Add API for apps to query whether they have All Files Access" into rvc-dev 2020-03-10 17:03:16 +00:00
Jorim Jaggi
ed35b1779b Add OnControllableInsetsChangedListener
It's useful for apps to know which inset types they can currently
control, as otherwise they have to poll by calling
controlInsetsAnimation repeatedly.

This can be used when apps want to apply a custom animation
immediately during startup as soon as possible.

Fixes: 150780468
Test: InsetsControllerTest
Test: CTS will be added soon
Test: WindowInsetsActivity
Change-Id: Ic0388c11d759843d3ac9edd8ef23904c9ce05c46
2020-03-10 12:23:58 +00:00
shafik
8187065889 Add API for apps to query whether they have All Files Access
This is a fix in response to developers' feedback on DP1.
Add Environment API that enables apps to check whether they have All
Files Access special app access. The API encapsulates the actual
mechanics of the check, which are as follows:
    * First check MANAGE_EXTERNAL_STORAGE app-op,
      if it's allowed, return true. If it's denied (ignored or errored),
      return false.
    * If the mode is default, then check for MANAGE_EXTERNAL_STORAGE
      permission, if it's GRANTED (not just declared), then return true,
      else return false.

Also add test.

Test: atest EnvironmentTest # not CTS
Fix: 150115615
Merged-In: I0574827c22960bf8f074313d983f289be7142149
Change-Id: I0574827c22960bf8f074313d983f289be7142149
2020-03-10 11:47:56 +00:00
Oli Lan
e6dbe2b880 Merge "Rename ApexContext to ApexEnvironment." into rvc-dev 2020-03-10 10:20:13 +00:00
Shu Chen
45b08852ad Merge "Unifies the finger-to-cursor distance between drag cursor and drag handle." into rvc-dev 2020-03-09 23:46:42 +00:00
Shu Chen
7700342166 Unifies the finger-to-cursor distance between drag cursor and drag handle.
This cl also fixes the way to simulate the touch events in EditorCursorDragTest, with correct raw X/Y.

Bug: 150534899
Test: manual & automated tests
  atest FrameworksCoreTests:EditorCursorDragTest
  atest FrameworksCoreTests:TextViewActivityTest

Change-Id: I0e9ef73082534ab98ddeddee0218374ed6d556a2
2020-03-09 10:58:23 +08:00
Julia Reynolds
10c0d0d26c Merge "Fix handling of work profiles in notification history" into rvc-dev 2020-03-06 21:37:13 +00:00
Matt Pietal
8ebe5c222d Merge "Control API review changes" into rvc-dev 2020-03-06 19:55:03 +00:00
Julia Reynolds
fd9f8349b8 Fix handling of work profiles in notification history
Test: atest
Fixes: 150336474
Change-Id: I9ebe8986b8b66fd3b79a4be7aa203a8e1f1ad8bb
2020-03-06 12:45:21 -05:00
Fabian Kozynski
95dcd2444b Control API review changes
* Add documentation to Device types
* Replace singletons in ControlAction and ControlTemplate to getter
static functions.
* Add javadoc for MODES and FLAG_MODE in TemperatureControlTemplate.
* Removed ThumbnailTemplate instead of updated javadocs. Determined
not necessary anymore
* Remove MultiFloatAction - no longer needed
* Removed reliant sysui code

Bug: 150630500
Test: atest ControlTemplateTest ControlActionTest
Change-Id: Ic4f60c789ce959205137944380e78622d76581a4
2020-03-06 11:15:24 -05:00
TreeHugger Robot
ac8a5397bc Merge "Update strings related to intent resolver and share sheet." into rvc-dev 2020-03-06 13:48:02 +00:00
arangelov
78fd360cf6 Update strings related to intent resolver and share sheet.
Test: manual
Fixes: 149749960
Fixes: 149897521
Change-Id: I8a8273bec0e85bc9d21e863ded943e9e28e4dbd4
2020-03-06 11:58:37 +00:00
Muhammad Qureshi
398b3d1c28 Merge "Move statsd framework tests to statsd apex dir" into rvc-dev 2020-03-05 21:41:38 +00:00
TreeHugger Robot
8caff7dc81 Merge "DO NOT MERGE: Remove AppSearch from Android R." into rvc-dev 2020-03-05 21:09:00 +00:00
Muhammad Qureshi
366975292b Move statsd framework tests to statsd apex dir
Bug: 149928788
Bug: 144997156
Test: atest FrameworkStatsdTest
Test: atest FrameworksCoreTests
Change-Id: I043e22e63c8fa39c9aab73a414c8a8bd3e2f1aae
2020-03-05 10:02:47 -08:00
Oli Lan
1573877a00 Rename ApexContext to ApexEnvironment.
This renames the new ApexContext class to ApexEnvironment, at the
request of the API Council.

Bug: 150685788
Test: atest ApexEnvironmentTest
Change-Id: I4340b0c7e78d240f4e48fdc94ec9e7d60e58d35c
2020-03-05 13:47:43 +00:00
Jason Hsu
6820d68e25 Merge "Support settings activity for accessibility shortcut target" into rvc-dev 2020-03-04 12:13:42 +00:00
Khaled Abdelmohsen
e2ab8ed00e Merge "Create source stamp verifier in platform" into rvc-dev 2020-03-03 21:10:50 +00:00
Khaled Abdelmohsen
8ce84c8567 Create source stamp verifier in platform
Bug: 148005911
Test: atest FrameworksCoreTests:SourceStampVerifierTest
Change-Id: Ibdaedf0355f5dd3537a425a031e298b710aae9f7
2020-03-03 17:16:56 +00:00
Jorim Jaggi
57157ac5d8 Fix WindowInsetsController lifecycle
Provide a recording insets controller before the window gets
created, and replay the commands once a view gets attached. This
allows the client to use the controller in Activity.onCreate.

Test: WindowInsetsControllerTests
Bug: 118118435
Change-Id: I1a825ecc4367c02b27f2d08cd5442325315d4f89
2020-03-03 15:12:15 +01:00