Commit Graph

12292 Commits

Author SHA1 Message Date
Sergey Vasilinets
0f5d4fe906 Merge "Make InputDevice.isExternal() public" 2019-02-11 15:53:30 +00:00
TreeHugger Robot
71d9277b21 Merge "Revert addition of add/removeAnimationListener" 2019-02-11 14:20:29 +00:00
TreeHugger Robot
7bd4ed2703 Merge "Close access to WindowGlobalManager.trimMemory starting with Q" 2019-02-11 00:49:11 +00:00
Sergey Vasilinets
f5c83bba8d Merge "Disallow reflection on Display.getDisplayInfo and Display.displayCutout" 2019-02-11 00:41:39 +00:00
TreeHugger Robot
e921cb7a9b Merge "Suggest ADD_CONTACT action by default" 2019-02-09 14:45:24 +00:00
TreeHugger Robot
45d5afbf30 Merge "Added maxTargetSdk and tracking bug to USE_VSYNC flag in choreographer" 2019-02-09 04:22:21 +00:00
Shep Shapard
cdc95009df Merge "Prevent reflection - ScaleGestureDetector#mMinSpan" 2019-02-09 03:28:27 +00:00
Felipe Leme
aa4eecad07 Merge changes from topics "kill_switch", "disabled_by_device_config"
* changes:
  Reverted ContentCapture kill-switch mechanism.
  Disable ContentCapture at runtime when it's disabled by DeviceConfig.
2019-02-09 01:45:06 +00:00
shepshapard
ba6dbff3f5 Prevent reflection - ScaleGestureDetector#mMinSpan
Also makes "minScalingSpan" accessible to developers
via ViewConfiguration in case developers were accessing
mMinSpan in order to simply read the value of the field,
since that was previously the only way to read the value.

Fixes: 123768938
Test: android.view.cts.ViewConfigurationTest

Change-Id: Ib179aa153f00a55b6913c7497a1e43bd101f41d3
2019-02-08 16:48:52 -08:00
Nader Jawad
21a4f7c88c Added maxTargetSdk and tracking bug to USE_VSYNC flag in choreographer
It is not clear what an application would do differently with this flag
considering that VSYNC has been enabled by default on Android for a
number of years.

Change-Id: Id307bce0beebaad63a693222dffe940d640f89cd
Fixes: 123769497
Test: N/A
2019-02-09 00:38:05 +00:00
TreeHugger Robot
6686d19fc7 Merge "Prevent access to MotionEvent#mNativePtr" 2019-02-09 00:10:50 +00:00
Felipe Leme
6c7c87bb4e Merge "Fixed sendEvent() so it can merge TYPE_VIEW_DISAPPEARED with multiple ids." 2019-02-08 22:31:25 +00:00
Abodunrinwa Toki
aa0fc10c7a Merge "TextClassifier: normalize uri for browser intent." 2019-02-08 21:39:09 +00:00
Felipe Leme
14ef461fc2 Reverted ContentCapture kill-switch mechanism.
Fixes: 121153631
Fixes: 121144410

Test: atest CtsContentCaptureServiceTestCases

Change-Id: Ic0e3fe6e93a8c2aff12eebcf9872f0082a361589
2019-02-08 10:45:50 -08:00
George Mount
bbc84a8b26 Prevent access to MotionEvent#mNativePtr
Fixes: 124051968
Test: compiled framework

Removes reflection access to MotionEvent#mNativePtr. All
necessary access to mNativePtr is available through the public
methods on MotionEvent, so access to mNativePtr is unnecessary.

Change-Id: I448eddfc4a5bc64deff44db2e69b5481477cdf91
2019-02-08 09:58:45 -08:00
Felipe Leme
c8875e7073 Fixed sendEvent() so it can merge TYPE_VIEW_DISAPPEARED with multiple ids.
Test: atest CtsContentCaptureServiceTestCases # nothing broke

Bug: 124107816
Fixes: 124060720

Change-Id: I632d4f600eabccf7e991450ff0291c6f5721cc28
2019-02-08 09:52:57 -08:00
Tony Mak
a396be45bb Suggest ADD_CONTACT action by default
The model now generates add_contact action as well.

Test: Send myself a message with phone number. Observe add contact action.
Change-Id: Id5e02334f46f92ddac2834b9f508fc15ab6e29da
2019-02-08 17:50:17 +00:00
Sergey Vasilinets
acec88441f Make InputDevice.isExternal() public
Change-Id: Ia5bb006329ff57941079a3425e20b05572abc69e
Fixes: 124051905
Test: N/A, M/eh
2019-02-08 16:42:31 +00:00
Jelle Fresen
b89473dbbb Revert addition of add/removeAnimationListener
This reverts commit 02301df216
and 65d2171d00.

Dropped addition of new API because androidx's FragmentManagerImpl now
employs a workaround that removes the necessity to reflect into
mListener and doesn't need add/removeAnimationListener either.

Bug: 117519981
Test: atest AnimationTest
Change-Id: I7250570190f40f6c5da8ef65ed81b2d4bb815cf5
2019-02-08 15:10:29 +00:00
Sergey Vasilinets
8b8d3b8cae Close access to WindowGlobalManager.trimMemory starting with Q
Let system decide itself when to clear internal caches.

Test: N/A
Change-Id: Iea72bbbdbe1a8efd23b348895b8cf522f0259e7c
Fixes: 124051903
2019-02-08 14:27:31 +00:00
Issei Suzuki
a5dbf52d0a Set insets on the virtual display to avoid IME covering the bubble.
Bug: 123544535
Test: Manual test using the test app, and atest DisplayPolicyLayoutTests
Change-Id: If2fceea97f4d702d000d887883c7f131337e9fd0
2019-02-08 14:21:53 +01:00
Abodunrinwa Toki
c33fc77de4 TextClassifier: normalize uri for browser intent.
Also updates TemplateIntentFactory to validate RemoteActionTemplates.

Bug: 123640937
Test: atest core/tests/coretests/src/android/view/textclassifier/TextClassifierTest.java
Test: atest core/tests/coretests/src/android/view/textclassifier/TemplateIntentFactoryTest.java
Change-Id: I2dc5d988234f1aaace4b30e9fbe272937c99ca47
2019-02-08 12:58:57 +00:00
Jorim Jaggi
5d4f5ebf7b Merge changes I1268101d,Id40470f6
* changes:
  Handle adjustResize flag properly on client
  Reparent IME window and handle non-fullscreen windows correctly
2019-02-08 11:22:12 +00:00
TreeHugger Robot
2546e0da58 Merge "Open API for onCreateView and createView with Context" 2019-02-08 00:29:17 +00:00
Evan Rosky
fa8e8f4ca3 Merge "Fix layer creation metadata parceling" 2019-02-08 00:28:36 +00:00
Sumir Kataria
79974722c4 Merge "Restrict reflection of default DisplayInfo constructor to P and lower." 2019-02-07 21:51:53 +00:00
Shep Shapard
b6b7fe181f Merge "Restricting access to View.internalSetPadding(...)" 2019-02-07 21:49:57 +00:00
shepshapard
8ecc5224cd Restricting access to View.internalSetPadding(...)
Developers can already use the public setPadding(...)
and setPaddingRelative(...) methods.

Bug: 123768420
Test: None.

Change-Id: I3c7bd84699730cb11c2d801aff6340c3ac9c36d3
2019-02-07 13:45:52 -08:00
John Reck
83e5eb59d7 Merge "Revert "Add view inflation device config property"" 2019-02-07 21:36:58 +00:00
Rob Carr
424e875630 Merge changes from topic "sc-destruction-cleanup"
* changes:
  SurfaceControl: Provide Transaction#remove() method.
  Replace SurfaceControl#destroy with #remove
  SurfaceControl: Fix release
2019-02-07 20:45:11 +00:00
Felipe Leme
8f5ef4518f Merge "Made moar ContentCapture APIs available for testing." 2019-02-07 20:22:33 +00:00
TreeHugger Robot
6f82297cb1 Merge "Make android.view.RemotableViewMethod annotation @TestApi" 2019-02-07 20:00:43 +00:00
Felipe Leme
ee14187b68 Merge "Removed FLAG_SMART_SUGGESTION_LEGACY" 2019-02-07 19:16:55 +00:00
Aurimas Liutikas
86ef44bcc7 Merge "Add helper methods for View attribute debugging" 2019-02-07 19:05:20 +00:00
John Reck
f8c0d70f3e Revert "Add view inflation device config property"
This reverts commit 86076a7cbe.

Reason for revert: Requires apps to have READ_DEVICE_CONFIG permission which they cannot possibly get. Also breaks instant apps (which don't have & can't get that permission)

Bug: 123524494
Test: CtsAccelerationTestCases[instant] passes.
Change-Id: I789a2c9007780331c510802a9f807cc24174be2d
2019-02-07 18:31:50 +00:00
Sumir Kataria
47ed9eec76 Restrict reflection of default DisplayInfo constructor to P and lower.
There doesn't appear to be a valid use to create this object yourself;
you can retrieve DisplayInfos of the attached displays using various
other APIs, such as through WindowManager.  The copy constructor is
also available.  This method is only used by one app.

One possible usage is to get the display cutout information; this is
something that is now available as an official API in Q.

Test: N/A
Change-Id: I632b337e5dfdcddd494b03fd1403f73d2c46a475
Fixes: 123769467
2019-02-07 18:01:25 +00:00
George Mount
f38b2c62ab Open API for onCreateView and createView with Context
Fixes: 123768619

LayoutInflater's mConstructorArgs was being accessed for two
reasons: reading and writing the context. When onCreateView()
was called, the inflation context was not being passed, so
if the developer wanted to get it, they had to read it from
mConstructorArgs. When the developer wanted to create a view,
with createView(), the developer could not adjust the view's
constructor context.

This CL creates versions of those two classes that take
Context as a parameter to remove the need for accessing
mConstructorArgs.

Test: ran LayoutInflaterTest
Test: Ia40341c24998be13205a72386d217d038a3bcf93
Change-Id: Ic2e990567512dd051f3d4f6c842398c71d6817b5
2019-02-07 07:58:33 -08:00
Jorim Jaggi
648e5881dc Handle adjustResize flag properly on client
Test:
adb shell setprop persist.wm.new_insets 1
adb shell setprop persist.pre_render_ime_views 0

Test: Open IME with app that doesn't have adjustResize set
Test: InsetsStateTest
Bug: 111084606
Change-Id: I1268101d851ddc8fee7896a1a8316eedf0c8de95
2019-02-07 15:56:22 +01:00
Tarandeep Singh
a6f3561667 Reparent IME window and handle non-fullscreen windows correctly
IME window is attached to the IME target if possible. This ensures
a smooth enter/exit animation when the activity is coming in/going
away.

Furthermore, if the controlling window doesn't span the entire
display, we can't offer controlling it in a frame-by-frame
manner, and we need to do the inset calculations relative to the
display frame.

Test:
adb shell setprop persist.wm.new_insets 1
adb shell setprop persist.pre_render_ime_views 0

Test: Open IME, go home, reopen app
Test: Show dialog with EditText
Bug: 111084606
Change-Id: Id40470f6f8284b48acfa4719049afd14fde332d6
2019-02-07 15:56:21 +01:00
Sergey Vasilinets
669ad67377 Disallow reflection on Display.getDisplayInfo and Display.displayCutout
Display.getCutout() should be used instead.

Test: N/A
bug: 123769394
Change-Id: Ib714dd71d749027a58f36aedb2f25ceb481ae342
2019-02-07 13:45:23 +00:00
Sergey Vasilinets
9481a0781a Merge "Add maxTargetSdk to @UnsupportedAppUsage for mH, mServedView, mNextServedView" 2019-02-07 11:31:32 +00:00
Felipe Leme
f38d414e09 Made moar ContentCapture APIs available for testing.
Test: m update-api
Test: atest CtsContentCaptureServiceTestCases

Bug: 123037756
Bug: 123038898

Change-Id: I06373d3a06e064c2e9546bc0d45a50b50f712189
2019-02-06 19:25:53 -08:00
TreeHugger Robot
5105cc02f8 Merge "High contrast mode is an experimental feature." 2019-02-07 02:10:23 +00:00
Aurimas Liutikas
1e47d35a96 Make android.view.RemotableViewMethod annotation @TestApi
This method is needed in CTS to test RemoteView behavior.

Bug: 72044662
Test: existing android.widget.cts.RemoteViewsTest
Change-Id: I8ca0ae151604062e5ecd58dc66c04103c351224b
2019-02-06 16:05:15 -08:00
Qasid Sadiq
a7a0578481 Merge "Use map to traverse accessibilityIds instead of the view tree" 2019-02-06 23:54:35 +00:00
TreeHugger Robot
f17a698307 Merge "Added unit tests for ContentCaptureContext" 2019-02-06 23:47:19 +00:00
Rahul Ravikumar
7023751972 High contrast mode is an experimental feature.
* Not having apps do custom things is WAI per pweaver@.

Fixes: b/123768939

Test: N/A.
Change-Id: I695322ae5dd8fb94df4d687e633deb5a23433f4d
2019-02-06 15:47:00 -08:00
Michael Wright
ebc78db8e1 Merge "Instrument wake up reasons." 2019-02-06 23:37:05 +00:00
Aurimas Liutikas
8f004c85a0 Add helper methods for View attribute debugging
Adding abilities to debug:
- Attribute resolution stack (which resources are looked
  at when resolving an attribute)
- Attribute value source (where did each attribute value
  get defined)
- Get explicit style id (if a view had it set via style="...")

This feature will be behind Settings.Global flag that Android
Studio will set to the debugged application package ID.

Bug: 111439551
Test: atest CtsViewTestCases:android.view.cts.ViewStyleTest
Change-Id: Ib6f9fc81000bb867b5b94a68953c99b0bc802d6c
2019-02-06 14:46:17 -08:00
Dominik Laskowski
9e7dce3833 Merge "Generalize physical display management" 2019-02-06 22:46:09 +00:00