Commit Graph

11260 Commits

Author SHA1 Message Date
Andrew Solovay
d10e384d6c resolve merge conflicts of a3e34fe9fe to pi-dev-plus-aosp
Bug: None
Test: Eyeballed (comment-only change).
Change-Id: Ia644cde66376b2bddeb27bb2a147b3266037aa2c
Exempt-From-Owner-Approval: Docs-only change
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 22:50:39 +00:00
Andrew Solovay
a3e34fe9fe Merge "docs: Replacing {#link with {@link" into pi-dev 2018-10-04 20:06:59 +00:00
Andrew Solovay
a44f2c075b docs: Replacing {#link with {@link
Several java files had the typo {#link (for cross-references to other
Javadocs) instead of the proper {@link format. This was confusing the
new doc publish tool (Mivi) since that's the format used for {# Django
comments #}.

Fixed a couple of links that had other errors (which prevented building
once the {# -> {@ was done) and other typos.

Replaced throughout the frameworks/base project; I'll need a separate CL
for the AndroidX fixes.

Staged to:

go/dac-stage/reference/android/app/Instrumentation.html
go/dac-stage/reference/android/bluetooth/BluetoothAdapter.html
go/dac-stage/reference/android/bluetooth/BluetoothDevice.html
go/dac-stage/reference/android/bluetooth/BluetoothServerSocket.html
go/dac-stage/reference/android/inputmethodservice/InputMethodService.html
go/dac-stage/reference/android/view/KeyCharacterMap.html
go/dac-stage/reference/android/view/KeyEvent.html
go/dac-stage/reference/android/media/AudioManager.html
go/dac-stage/reference/android/net/wifi/WifiConfiguration.html

(Other files were not in the public Javadocs.)

Bug: 111925950
Test: make ds-docs
Exempt-From-Owner-Approval: Docs-only change
Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 18:20:51 +00:00
Phil Weaver
79625e978c Merge "Fix a11y cache correctness bug" into pi-dev
am: 3fbe56647c

Change-Id: Ifb19caaf010adfa2d1ca57f767e4be830b09e4bd
2018-10-03 12:09:18 -07:00
Phil Weaver
3fbe56647c Merge "Fix a11y cache correctness bug" into pi-dev 2018-10-03 18:23:47 +00:00
kopriva
978a89cfcb Merge "docs: bug 72853855, wrong parameter" into pi-dev
am: 1f86e2f4ca

Change-Id: I95b3d8fe6ca585a5dc4168ced763ae1a9a70feb7
2018-10-01 12:03:55 -07:00
kopriva
b350c7e53c docs: bug 72853855, wrong parameter
Test: make ds-docs

Bug: 72853855

Change-Id: Id6e64cba2af10488b677daabb5e113f278aa0f95
Exempt-From-Owner-Approval: Docs-only change
2018-09-29 14:22:07 -07:00
Felipe Leme
bc75159db6 Merge "Fixed when the CompatibilityBridge is attached to an activity." into pi-dev
am: 45fda27211

Change-Id: I420b0392602e0889862c7d77e62b614e2c5617bf
2018-09-24 15:22:37 -07:00
TreeHugger Robot
45fda27211 Merge "Fixed when the CompatibilityBridge is attached to an activity." into pi-dev 2018-09-24 22:04:27 +00:00
kopriva
f6b27fbff0 Merge "docs: fixing several minor documentation bugs" into pi-dev
am: 82b0d17b39

Change-Id: Ieb1447c0d7cda629338de8d6e03f46670d8ed0b0
2018-09-20 16:55:47 -07:00
Phil Weaver
2f69c16c3d Fix a11y cache correctness bug
If two views change, their common ancestor can send
a subtree_changed event. But the cache is dropping
events that come from views that it hasn't cached.

Now clearing the cache entirely when a node not in
the cache sends a subtree changed event, since we
don't know which nodes are descendents and which
may have changed.

I'm not thrilled with this change, since it may
degrade performance, but I want to fix the correctness
problem quickly.

Bug: 111554539
Test: atest AccessibilityCacheTest
Change-Id: Ib32d3622cddd7001663943eff71e823d21f5e500
(cherry picked from commit a4002c8daf)
2018-09-20 23:46:25 +00:00
kopriva
f07a46058c docs: fixing several minor documentation bugs
Test: make ds-docs

Bug: 36949243
Bug: 116169695
Bug: 37001248
Bug: 37044885
Bug: 37053166

Change-Id: I844a8978518cd7214bf9d068d602902dfa7e8246
Exempt-From-Owner-Approval: Docs-only change
2018-09-20 11:20:27 -07:00
daqi
4d5ba15e69 Merge "Set InputMethoMananger#mCurRootView to null when window dismissed" am: 7bd18423f6
am: 9c5a6e2c6c

Change-Id: I6198c9d52c19e48f61bb4d488018c067d4b80108
2018-09-19 19:35:27 -07:00
daqi
9c5a6e2c6c Merge "Set InputMethoMananger#mCurRootView to null when window dismissed"
am: 7bd18423f6

Change-Id: Ie0127bd83b714c540bcf387a3fc74d01bd60eb13
2018-09-19 19:22:12 -07:00
Felipe Leme
5cd660d5e9 Fixed when the CompatibilityBridge is attached to an activity.
The AccessibilityManager is a singleton, so we need to update it everytime
an activity is resumed.

Test: manual verification with Chrome (CTS test is an overkill here)
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything

Fixes: 112690889
Change-Id: If011db203dee96ec511da80f4e49395c0340f482
(cherry picked from commit ce40498dc2)
2018-09-19 17:55:06 -07:00
Treehugger Robot
7bd18423f6 Merge "Set InputMethoMananger#mCurRootView to null when window dismissed" 2018-09-20 00:35:25 +00:00
daqi
dff365ef4d Set InputMethoMananger#mCurRootView to null when window dismissed
InputMethodManager#sInstance is a long live static object so we have to
set its field with right value, otherwise any object referenced by it
cannot be gc including potential activity context.

Now InputMethodManager#mCurRootView is set to null in
InputMethodManager#onPreWindowFocus which is invoked when app's
ViewRootImpl received ViewRootImpl#W#windowfocusChanged from WMS.
However, in the ViewRootImpl#W#windowfocusChanged, mViewAncestor is a
weak reference which get() may returns null sometimes.
One scenario is the ViewRootImpl#W#windowfocusChanged is called after
ActivityThread#handleDestroyActivity. The activity is destroyed and its
ViewRootImpl get GC'd. Then InputMethodManager#onPreWindowFocus won't
get called and InputMethodManager#mCurRootView won't be set to null.

And it is a proper time to set InputMethodManager#mCurRootView to null
when the window it served dismissed.

Fix: 116078227
Test: Break at ActivityThread#handleDestroyActivity and ViewRootImpl#W#windowfocusChanged

Change-Id: I8fabb30f14bcb2cd7019e29b6642b4562d49d248
Signed-off-by: daqi <daqi@xiaomi.com>
2018-09-20 08:30:40 +08:00
kopriva
9b641cbc71 docs: fixed instances of typo in 'overridden'
am: debd4ee72d

Change-Id: Idde6240486463dee51cdc27b8cd066a80fb869e0
2018-09-13 14:57:25 -07:00
kopriva
debd4ee72d docs: fixed instances of typo in 'overridden'
This affects several files beyond those mentioned in the bug.

I didn't fix some instances because the files had code
problems that blocked presubmit checks.

Test: make ds-docs

Bug: 37094741

Change-Id: I642f0384fef2b267ebc970bae1b4fb90bae667e7
Exempt-From-Owner-Approval: Docs-only change
2018-09-13 11:40:59 -07:00
Yohei Yukawa
0561f2c570 Merge "Restrict IMM.notifyUserAction() with targetSdkVersion <= P" am: ec52757ecb
am: 81be3fdc66

Change-Id: Ied8670c7902c047ba523094e8374f9f8ad750621
2018-09-12 15:28:06 -07:00
Yohei Yukawa
81be3fdc66 Merge "Restrict IMM.notifyUserAction() with targetSdkVersion <= P"
am: ec52757ecb

Change-Id: Ia35a97362a467b452abf8649d3ac30b61a410560
2018-09-12 14:39:44 -07:00
Yohei Yukawa
5b83a80aab Restrict IMM.notifyUserAction() with targetSdkVersion <= P
With my change [1] in Android N, applications no longer need to
manually call this hidden API even when directly implementing
InputConnection interface without extending BaseInputConnection [2].

So far applications that we have confirmed to be using this hidden API
is Chromium and browsers that are supposed to be built on top of
Chromium source code [3].  Actually my change [1] was per request from
Chromium team and Chromium does not use this hidden API on Android N
and later devices [4].

Moving forward, with this CL applications that target API 29 and later
are no longer allowed to use this hidden API since we see no actual
use case of this hidden API on Android N and later devices so far.

If you have any reason to continue relying on this hidden API, please
leave a comment in Bug 114740982.

 [1]: I571d6cc9c6e461d8994aa7496e7e18be13766411
      159dd47db3
 [2]: This scenario had not been suppored until Android N.
      See also other CLs that are tagged with Bug 24688781.
 [3]: https://cs.chromium.org/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapperImpl.java?rcl=525c72b0f4694d6b3f93bcc7797d0411c2fa683c&l=113-128
 [4]: crbug.com/551193

Bug: 114159783
Bug: 114740982
Test: compile
Merged-In: I41d6419438cef92cce81cc33d9db00dd2ee89d33
Change-Id: Iac81f49413605271fccc0b8aec3e6ed95925f061
2018-09-11 13:34:36 -07:00
Adrian Roos
6a403d8d5b Merge "Cutout: Add developer setting to mask the display cutout" into pi-dev
am: c05c2d1e48

Change-Id: I728ce64b53d02f5a75f04071a04f5e6d0f61987c
2018-08-21 13:11:53 -07:00
Adrian Roos
c05c2d1e48 Merge "Cutout: Add developer setting to mask the display cutout" into pi-dev 2018-08-21 19:51:58 +00:00
Adrian Roos
8c28c7c2d9 Cutout: Add developer setting to mask the display cutout
Adds an option to mask the cutout by effectively shrinking the logical display
such that developers can test apps as if the device did not have a notch.

Bug: 112876936
Test: Go to Settings > Developer Options > Simulate display with cutout > "No cutout". Cutout should be hidden. Rotate screen, take screenshots, screenrecord, screen off animation should all work as expected.
Change-Id: I5cdb201734d238bf3785ab55843114e4b5b4ee41
2018-08-21 21:47:51 +02:00
Mathew Inwood
532fa6656d resolve merge conflicts of 597229d681 to stage-aosp-master
am: ec73e7514f

Change-Id: I9e65a3550b6ee6e266410519db2fcb41f666ad80
2018-08-21 02:48:25 -07:00
Mathew Inwood
ec73e7514f resolve merge conflicts of 597229d681 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I0807ae67e0ed3e84f17af962dc8b7a3152f8103f
Merged-In: I4147b038ed7adf0311ee9918b44766f82a057eaf
2018-08-21 09:31:16 +01:00
Felipe Leme
dde594d606 Merge "Improved AutofillManager and Activity dump() methods:" into pi-dev
am: c9443e3894

Change-Id: I1fc878c1ff3dbd204c619c1514e989399dd51895
2018-08-20 18:38:29 -07:00
TreeHugger Robot
c9443e3894 Merge "Improved AutofillManager and Activity dump() methods:" into pi-dev 2018-08-21 01:18:09 +00:00
Felipe Leme
7fa1e0b408 Merge "Log AutofillClient on CompatibilityBridge.onAccessibilityEvent()." into pi-dev
am: db7648f374

Change-Id: Iba6484c33a6c272304be097a773b96d0d6f45550
2018-08-20 13:56:24 -07:00
TreeHugger Robot
db7648f374 Merge "Log AutofillClient on CompatibilityBridge.onAccessibilityEvent()." into pi-dev 2018-08-20 20:29:21 +00:00
Felipe Leme
cf612f44ab Merge "Log CompatibilityBridge.onAccessibilityEvent()" into pi-dev
am: e4d35b6dc0

Change-Id: I62f3895c3fb448faad084507615f7a09a5b5af96
2018-08-20 12:32:02 -07:00
TreeHugger Robot
e4d35b6dc0 Merge "Log CompatibilityBridge.onAccessibilityEvent()" into pi-dev 2018-08-20 19:07:10 +00:00
Mathew Inwood
e5ad598d11 Add @UnsupportedAppUsage annotations
For packages:
  android.view.textservice
  android.view.textclassifier.logging
  android.view.textclassifier
  android.view.inputmethod
  android.view.autofill
  android.view.accessibility
  android.view

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ie4663ebd4640b2893e575e599582d2c9530da313
Merged-In: I4147b038ed7adf0311ee9918b44766f82a057eaf
2018-08-20 14:52:19 +01:00
Laura Davis
6497c5bd21 Merge "Docs: Inserted links to relevant guide pages." into pi-dev
am: 283f55f7de

Change-Id: I1a42ff1b3485e35e152b354039aa5c072e0a1e70
2018-08-17 15:14:38 -07:00
Felipe Leme
4226033998 Improved AutofillManager and Activity dump() methods:
- Print compatibility mode info and activity token on AutofillManager.dump().
- Add --autofill option on Activity so it just dump autofill state.

Also fixed checkstyle import warnings on ActivityManagerShellCommand.

Bug: 112417431
Bug: 112584717

Test: adb shell dumpsys activity top --autofill

Change-Id: Id56b56a5d7e591d5204663a1da1322a15f8ef3aa
(cherry picked from commit b546ca7916)
2018-08-17 14:18:37 -07:00
Felipe Leme
3438421295 Log AutofillClient on CompatibilityBridge.onAccessibilityEvent().
This is useful to identify cases where a browser used a trampoline activity to
launch its rendering activity.

Bug: 112584717
Bug: 112690889

Test: adb logcat AutofillManager

Change-Id: I5e58cd8c8dc67ddeed8aa0996233dca9b89cc0d3
(cherry picked from commit 7d4461d133)
2018-08-17 13:55:58 -07:00
Felipe Leme
a9aacf9bfd Log CompatibilityBridge.onAccessibilityEvent()
Altough these are super spammy, they're super valuable when debugging why
compat mode doesn't work.

Bug: 112417431
Fixes: 112584717

Test: adb logcat AutofillManager

Change-Id: I1574b51b1c6caf783038b82ff207986b726b2e8b
(cherry picked from commit 5d35d3d2d6)
2018-08-17 13:54:38 -07:00
Laura Davis
43e75d98d8 Docs: Inserted links to relevant guide pages.
This is the proof of concept for adding relevant
links in API pages to narrative content.
The design doc is hosted at:
https://docs.google.com/document/d/1Y6bFua27Gs7ONZ27gz0nHz3Djv0WND_V_rX-XvbeB3U/edit?usp=sharing

Test: make ds-docs

Bug: 112478848
Change-Id: Ic3842629c802fe89582d4d7b4a153e54d4ba1713
2018-08-16 16:57:18 -07:00
Joshua Baxter
8b3e98c424 Merge "docs: fixed typo" into pi-dev
am: ce01dba2b7

Change-Id: I096c86efb2a34567b2a79cbe5b3a8dbe6b64800c
2018-08-13 16:04:10 -07:00
Joshua Baxter
ce01dba2b7 Merge "docs: fixed typo" into pi-dev 2018-08-13 22:46:02 +00:00
Mathew Inwood
035dabc2cb resolve merge conflicts of 6987a91e7c to stage-aosp-master am: 5346961615
am: 04f16736ae

Change-Id: I056f6db65b8cadf6e4a74f3ea92183b0c6328620
2018-08-03 02:51:15 -07:00
Mathew Inwood
04f16736ae resolve merge conflicts of 6987a91e7c to stage-aosp-master
am: 5346961615

Change-Id: I2bcb356c7cbd76067202b27ec6db7f1eeef17aa3
2018-08-03 02:41:47 -07:00
Mathew Inwood
5346961615 resolve merge conflicts of 6987a91e7c to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I773bda19dc7b32c01bf064bf78b517896e8df991
Change-Id: I2c9bd92522932175856fb72ca5cce2c1999f4a1e
2018-08-03 09:00:19 +01:00
Tiger Huang
8541887897 Merge "Don't flash system bars while showing an immersive app on lockscreen" into pi-dev
am: 11768fd80f

Change-Id: Ia6a5c56e2603c6e6fe06e7da1dd7dcade3465cd0
2018-07-27 16:17:18 -07:00
Mathew Inwood
8452828b5b Add @UnsupportedAppUsage annotations
For packages:
  android.view.animation

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I52f3e770dd1e8240e67c897e7788bd928145f583
Merged-In: I773bda19dc7b32c01bf064bf78b517896e8df991
2018-07-27 16:06:00 +01:00
Tiger Huang
926f7d815c Don't flash system bars while showing an immersive app on lockscreen
Before applying this patch, when a show-when-locked immersive app is
showing, the system bars would quickly show and hide, which are
redundant to the user.

The root cause is that, for nav bar, we have a policy to show nav bar
if the width and height of status bar are MATCH_PARENT and status bar
has no PRIVATE_FLAG_KEYGUARD. When keyguard is becoming status bar,
its keyguard flag would be removed first, and then the height would
be changed to the bar height. So the nav bar would be shown between
these events. For status bar, we force showing it when it is expanded
by checking its width and height are MATCH_PARENT or not.

To fix the issue, this change introduces a new private flag which
indicates that the status bar window is now in an explicit expanded
state. We check this flag instead of checking the width and height of
status bar.

This change also fix a bug that: when AOD is enabled, if the
foreground app has FLAG_SHOW_WHEN_LOCKED, FLAG_TURN_SCREEN_ON, and
FLAG_FULLSCREEN, clicking on the power key would make it show the app
again instead of AOD. (not 100%, but chances)

Bug: 80147982
Test: 1. go/wm-smoke
      2. Launch a show-when-locked turn-screen-on immersive app on
         AOD, and see if any system bar flashes.
      3. Launch a show-when-locked turn-screen-on immersive app on
         lockscreen, and see if any system bar flashes.
      4. a. Enable AOD in Settings.
         b. Open a show-when-locked turn-screen-on immersive app.
         c. Click on power key, and see if AOD shows.
      5. Launch an immersive app and drag down the status bar, see
         if nav bar keeps there as long as status bar is expanded.

Change-Id: Ie885d504eb73ae8a86736b2c3ed4fb03eb9f739e
Merged-In: Ie885d504eb73ae8a86736b2c3ed4fb03eb9f739e
(cherry picked from commit 3404601e07)
2018-07-26 05:31:16 +00:00
youngmin0822.lee
762b60ce74 Merge "don't call setSize() when creating SurfaceControl" am: 57e98b19be
am: e332fe4b3d

Change-Id: I384dd4a03db135c703e3672037212a970d222689
2018-07-24 22:14:56 -07:00
youngmin0822.lee
e332fe4b3d Merge "don't call setSize() when creating SurfaceControl"
am: 57e98b19be

Change-Id: Iec44550e5c18fa7d3005c8c79e607fc1bc656c13
2018-07-24 22:01:41 -07:00
Jorim Jaggi
7823ee73ee Move allocateBuffers to RT
Such that it gets executed after setSurface, in order that
mReqUsage has the correct flags set.

Test: Take trace, ensure that allocateBuffers actually allocates
in the right format/usage by ensuring that dequeueBuffer doesn't
trash them immediately again.
Bug: 111517695
Change-Id: I94b402d7b29d565155a77a2d09106246261712d2
2018-07-17 17:34:49 +02:00