Commit Graph

14883 Commits

Author SHA1 Message Date
Jeff Sharkey
358f0d4fc8 Merge changes from topic "dec5" am: c2793cf12b am: 9af6ac78b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2776a545a24f007ccb4b9ee14705978571265ef3
2020-12-08 16:43:19 +00:00
Jeff Sharkey
24d251403b Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c am: c7c4a74a78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5120a3701af3564f363900b20bca75f3ad2a854c
2020-12-08 16:43:17 +00:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
c7c4a74a78 Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0211462ecbcd9ad66f66af87e31cf12e1582fc65
2020-12-08 16:01:16 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Riddle Hsu
6f60cb3d0d RESTRICT AUTOMERGE Only update native InputApplicationHandle once am: 5e4b075554 am: d2548cf0e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513148

Change-Id: Id334939d8d90b5d50dd76c80f9aff84cd03f76e7
2020-12-04 07:36:28 +00:00
Riddle Hsu
d2548cf0e6 RESTRICT AUTOMERGE Only update native InputApplicationHandle once am: 5e4b075554
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513148

Change-Id: Ia7113107cbdac69a4744af738025e23d8cb28952
2020-12-04 07:02:35 +00:00
Riddle Hsu
5e4b075554 RESTRICT AUTOMERGE Only update native InputApplicationHandle once
This makes sure the write operation (NativeInputApplicationHandle
::updateInfo) is always called from window manager side once when
calling SurfaceControl.Transaction#setInputWindowInfo or
InputManagerService#setFocusedApplication. If the info of input
application handle is changed, a new instance will be created.
That avoids the race condition of reading the fields of the same
InputApplicationInfo instance from input dispatcher.

Bug: 171857140
Bug: 161334769
Test: WindowInputTests

Change-Id: I70de9835c7699fe6f56fc3655b0fee5c317ecc3a
2020-12-03 11:57:42 +00:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Ming-Shin Lu
344f4d7107 Merge "Add Null check for mView.findFocus() in ViewRootImpl" into rvc-qpr-dev am: 29c2b7e6e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13127785

Change-Id: Ibe6d6e31eeabd857affa6f4dcdb19d875df4309c
2020-11-26 14:01:15 +00:00
Ming-Shin Lu
d1cd540bbe Add Null check for mView.findFocus() in ViewRootImpl
Some apps like Netflix crashed while handleWindowFocusChanged but mView
somehow has became null.

It's fair to check null for mView.findFocus() since other places
in ViewRootImpl that calling this method also add null check.

Fix: 153862451
Test: atest CtsInputMethodTestCases

Change-Id: I86bd5f3193deabe28bb425a8564017f7b32b90f3
(cherry picked from commit bdaa14bf18)
2020-11-26 09:24:46 +00:00
Aurimas Liutikas
ab35d18a7c Merge "Suppress all hidden abstract methods in constructable classes." am: bdd6c53abb am: c08c4d9b02 am: 65ed2cb534
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495396

Change-Id: Icb989e4ac7190afbdb3b09552fa0055c2a742ceb
2020-11-13 03:49:22 +00:00
Aurimas Liutikas
65ed2cb534 Merge "Suppress all hidden abstract methods in constructable classes." am: bdd6c53abb am: c08c4d9b02
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495396

Change-Id: I9f9bfc14b3cb56016da352949922e3084237228e
2020-11-13 03:35:12 +00:00
Aurimas Liutikas
d23189b998 Suppress all hidden abstract methods in constructable classes.
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.

Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Merged-In: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
    no-op in terms of behavior
2020-11-13 02:56:20 +00:00
Mathew Inwood
5a448e27ed Merge "Add maxTargetSdk restriction to unused APIs." am: f8abe13db4 am: eb80316624
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1468245

Change-Id: I60222cb1879651cf283e385519b5c4d156ab68a1
2020-11-09 15:24:20 +00:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
Bill Yi
f2d4156f5b Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE
Merged-In: Ic1e07d28a41eea2ce59cc21702dae95d61adc24e
Change-Id: Ibc69b3e372167485bb70ae3277222bbe8ef7ff27
2020-11-04 13:57:54 -08:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Mathew Inwood
5f0edaaaf5 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I8285daa8530260251ecad6f3f38f98e263629ca7
Change-Id: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
2020-11-02 10:30:09 +00:00
Anton Hansson
24b4d166dd Merge "Remove @TestApi from @SystemApi symbols" am: d2d4637685 am: cbe282347e am: 14897c256d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466264

Change-Id: I859503688ea3254d5bd1b55e80cf1962286e948f
2020-10-20 20:31:58 +00:00
Anton Hansson
14897c256d Merge "Remove @TestApi from @SystemApi symbols" am: d2d4637685 am: cbe282347e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466264

Change-Id: I86daec690141893837ec58ab1d75aecc88557ff9
2020-10-20 19:45:04 +00:00
Anton Hansson
d2d4637685 Merge "Remove @TestApi from @SystemApi symbols" 2020-10-20 13:45:13 +00:00
Anton Hansson
dd7d52f963 Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-19 16:41:01 +01:00
Mark Goldstein
69c3cf0bf4 Doc: Fix typo the right way. Supersedes cl/318172931 am: d5726423ca am: 0e59503e96 am: 18d9527af6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12828332

Change-Id: I0c629ac821d9bf2ee12313f6e41044c3bd07e278
2020-10-14 22:20:47 +00:00
Mark Goldstein
18d9527af6 Doc: Fix typo the right way. Supersedes cl/318172931 am: d5726423ca am: 0e59503e96
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12828332

Change-Id: Ifd5624dcef44f9b1e65f763d732846f345c32e10
2020-10-14 22:00:34 +00:00
Mark Goldstein
7887b8160b Doc: Fix typo the right way. Supersedes cl/318172931 am: d5726423ca am: 0e59503e96
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12828332

Change-Id: I2cd5851caad56c0922ec0a1c122207ae5baa7409
2020-10-14 22:00:31 +00:00
Mark Goldstein
0e59503e96 Doc: Fix typo the right way. Supersedes cl/318172931 am: d5726423ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12828332

Change-Id: Idfff776666d9175a45cea54996d61919f7df3057
2020-10-14 21:41:47 +00:00
Mark Goldstein
d5726423ca Doc: Fix typo the right way. Supersedes cl/318172931
Bug: 170764224

Change-Id: Iaef1aa4fd3143e6e9019d06834001b3bfa3d887d

Exempt-from-owner-approval: Docs-only typo fix
2020-10-14 20:38:09 +00:00
Xin Li
986e6eeddf Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a
Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
2020-10-10 20:38:57 -07:00
Ming-Shin Lu
57a7cd005c RESTRICT AUTOMERGE Reland "Fix showing keyboard without editor focused.." am: 44ecc735ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716109

Change-Id: I798957b11099d3425c9219be3690b0f107ea3733
2020-09-28 15:36:12 +00:00
Ming-Shin Lu
44ecc735ec RESTRICT AUTOMERGE Reland "Fix showing keyboard without editor focused.."
Resolve SearchViewTest and InputMethodServiceTest failure when
landing CL[1] in QPR branch.

Also, CL[1] mentioned window focus behavior changes from R,
ignoring STATE_VISIBLE or STATE_ALWAYS_VISIBLE request doesn't enough
to fix unexpected keyboard visible issue when same window focused with
the above softInput flag without editor focus, since there is no
additional unspecified window focus to hide the current soft-input
as prior to R's behavior.

To fix that, we introduced new SoftInputShowHideReason to hide
soft-input when the same window focused without valid editor focus
after screen unlock, in order to align with the behavior prior to R.

[1]: I37ae6e30d1de581ba15131c2a90396b3a522a4d6

Bug: 161506356
Test: atest CtsInputMethodTestCases
Change-Id: Id51863a5b67d5d79d903adf43f19b52bd139e03f
2020-09-28 05:13:09 +00:00
Andrew Solovay
97b367c2d7 [RESTRICT AUTOMERGE] docs: Removing obsolee TODO am: b86df213a3 am: 9441161e17
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12663552

Change-Id: Ia6a1b39ffc137939621fcb29f50854f89d926106
2020-09-25 05:46:23 +00:00
Andrew Solovay
8d390df771 [RESTRICT AUTOMERGE] docs: Removing obsolee TODO am: b86df213a3 am: 9da05e017e am: 7015c95720
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12663552

Change-Id: Iec5085085733739a8b8e038130ac501d3608ccd7
2020-09-25 05:36:47 +00:00
TreeHugger Robot
33d7e9308e Merge "Make process level rotated config and display metrics consistent" into rvc-qpr-dev am: d6af5b5d1e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12670488

Change-Id: I1ca8add8df59a72e35ced7d0f888c662e01d7dc2
2020-09-25 05:28:24 +00:00
Andrew Solovay
7015c95720 [RESTRICT AUTOMERGE] docs: Removing obsolee TODO am: b86df213a3 am: 9da05e017e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12663552

Change-Id: I6079309dc6dc8f27463f29370a79cb97e7dfff4e
2020-09-25 05:27:36 +00:00
Andrew Solovay
9da05e017e [RESTRICT AUTOMERGE] docs: Removing obsolee TODO am: b86df213a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12663552

Change-Id: Idf8ba9c921fc02310da6906103fd8ba39c43d5be
2020-09-25 05:24:45 +00:00
Andrew Solovay
9441161e17 [RESTRICT AUTOMERGE] docs: Removing obsolee TODO am: b86df213a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12663552

Change-Id: I3009f35dd371aad17c6787e98000c43dc4cee7d3
2020-09-25 05:24:25 +00:00
TreeHugger Robot
d6af5b5d1e Merge "Make process level rotated config and display metrics consistent" into rvc-qpr-dev 2020-09-25 03:54:37 +00:00
Andrew Solovay
b86df213a3 [RESTRICT AUTOMERGE] docs: Removing obsolee TODO
The TODO was in a Javadoc comment so it was exposed in public docs.
It looks like the TODO was removed from master, and per SME, it's
okay to remove it from RVC too.

Test: make ds-docs-java
Exempt-from-owner-approval: Docs-only change
Bug: 169103613
Change-Id: I7694bbc8fde0e7366db57770ff1792a1d2f3e6c1
Merged-In: I129f96f6ed716e25c476bacbdb38799675919b9a
2020-09-24 18:13:06 +00:00
Youngjun Kwak
dcfa722f4c Merge "Map bar type to new ITYPE_{SIDE}_MANDATORY_GESTURES_INSETs" into rvc-qpr-dev am: 4d714cb8e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12641033

Change-Id: Icdd22f81cc8d75e565073ee322b2bf3c6ec0064c
2020-09-24 15:53:19 +00:00
Youngjun Kwak
4d714cb8e9 Merge "Map bar type to new ITYPE_{SIDE}_MANDATORY_GESTURES_INSETs" into rvc-qpr-dev 2020-09-24 15:19:11 +00:00
Tiger Huang
2920a61a6b Clear low profile mode while forcing client to show system bars am: 3b6bdffa44
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12683363

Change-Id: Iefd90b4aebc1c683fb99a482f5c897d7ea6b7ac4
2020-09-24 13:31:42 +00:00
Tiger Huang
3b6bdffa44 Clear low profile mode while forcing client to show system bars
Forcing client to show system bars would clear system UI flags at the
client side. SYSTEM_UI_FLAG_LOW_PROFILE would be cleared as well in
previous Android versions. This CL makes the behavior compatible.

Fix: 167892531
Test: Steps in the bug
Change-Id: I466a05120a08ac95b619eadd8291fc546d3bb450
2020-09-24 17:35:48 +08:00
Riddle Hsu
6bb2b9c716 Make process level rotated config and display metrics consistent
The application may get Resources instance from Resources.getSystem()
and context.getApplicationContext().getResources(). Since fixed
rotation is introduced that allows an activity to start in a different
rotation than the current display, when using getConfiguration() and
getDisplayMetrics() of these Resources instances, the orientation
and metrics need to be the same as current display is rotated.
Otherwise the app may show unexpected UI layout.

Although it is not recommended to use global resources/config for
activity. One of the goal of fixed rotation transform is to simulate
the app is started in a rotated environment, so this CL makes the
configuration and display metrics of system resources are consistent
with application and activity for compatibility.

About WindowProcessController and ActivityStackSupervisor:
 The process configuration passed to LaunchActivityItem may be
 associated from activity. if the sequence number of configuration
 is overridden by activity, the configuration may be ignored when
 launching the activity because the sequence number isn't larger
 than the previous process configuration. Although there will be a
 ConfigurationChangeItem later to update correct state, the app may
 get the intermediate state with old configuration and metrics.

About ResourcesManager and DisplayAdjustments:
 There are 2 new fields appWidth and appHeight added to
 DisplayAdjustments#FixedRotationAdjustments because the display
 metrics from Resources.getSystem() is independent from activity
 configuration. Only window manager knows the rotated size, so
 the values need to send to client and then ResourcesManager takes
 the adjustment to change the global display metrics.

About WindowToken:
 When fixed rotation is applied on the token, send the
 FixedRotationAdjustmentsItem first so the later configuration
 change can pick the adjustment at ActivityThread. And because the
 registration of activity configuration only occurs on add/remove
 activity, if it is only switching to another existing activity in
 different orientation, the process configuration still needs to
 be updated.

About ActivityThread:
 The code flow for a rotated activity (DA = display adjustments):
 - Launch new activity
    handleLaunchActivity: override app DA
     handleConfigurationChanged: adjust global display metrics by DA
     performLaunchActivity
      createBaseContextForActivity: override activity DA
 - Resume existing activity
    handleFixedRotationAdjustments: override app and activity DA
    handleConfigurationChanged: adjust global display metrics by DA
    handleResumeActivity

Also some minor corrections:
- Fix wrong display metrics adjustment that xdpi and ydpi should
  not be swapped because they are physical attributes.

Bug: 167564038
Test: atest DisplayAdjustmentsTests
      AppConfigurationTests#testRotatedInfoWithFixedRotationTransform
      WindowProcessControllerTests#testProcessLevelConfiguration
      DisplayContentTests#testApplyTopFixedRotationTransform

Change-Id: I60bedc7e09f54683d5e857ccc51402d5d144cd9e
Merged-In: I60bedc7e09f54683d5e857ccc51402d5d144cd9e
2020-09-24 15:09:51 +08:00
Alison Cichowlas
13edc9d085 Merge "Set the default screenshot delay to 0ms" into rvc-qpr-dev am: 96c7d2368f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12557348

Change-Id: I2540d2e1cfa574ee71f6beac4549942a16aa10d5
2020-09-23 15:48:00 +00:00
Alison Cichowlas
96c7d2368f Merge "Set the default screenshot delay to 0ms" into rvc-qpr-dev 2020-09-23 15:39:42 +00:00
Miranda Kephart
c632e0f8df Set the default screenshot delay to 0ms
Bug: 165267251
Test: manual -- ensured that the time needed to hold is 0ms if the
screenshot_keychord_delay debug value is not set, and that the
delay can still be changed using

adb shell device_config put systemui screenshot_keychord_delay <ms>

Change-Id: Iab989ecf14ef379658130adbced241e084554e63
Merged-In: Iab989ecf14ef379658130adbced241e084554e63
(cherry picked from commit bf82822698)
2020-09-23 13:58:41 +00:00
kwaky
9b2063caaf Map bar type to new ITYPE_{SIDE}_MANDATORY_GESTURES_INSETs
Bug: 167565741
Bug: 167288724
Test: atest WindowInsetsPolicy and atest SystemBarConfigs all passing

Change-Id: I767a423bc2437021af02c01a84fa3e1834413c1e
2020-09-22 11:05:56 -07:00
Heemin Seog
9779c9e133 DO NOT MERGE Ensure mapping between internal and public insets am: ae42535e1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12547244

Change-Id: I518091fb946ce0492acbb65396f743f8ca96ae10
2020-09-21 16:00:33 +00:00