Commit Graph

12319 Commits

Author SHA1 Message Date
TreeHugger Robot
96e278d6c4 Merge "Restrict usage of AccessibilityManager::mIsEnabled after P" 2019-02-12 22:53:12 +00:00
Dan Shi
18a52fb0c7 Remove CtsViewTestCases in TEST_MAPPING file
The test config has an option to use package filter, which does not
work with another TEST_MAPPING which has the same test but use a
class filter.
startop/view_compiler/TEST_MAPPING

Bug: 124248633
Test: none
Change-Id: Id989d9df8983e7a08be38616e92e10f70fe4846a
2019-02-12 09:33:07 -08:00
Matvei Malkov
6689e620a6 Restrict usage of AccessibilityManager::mIsEnabled after P
Setting this field with reflection leaves AccessibilityManager in
improper state. Restrict access to this field in future apis

Bug: b/124052733
Test: accessibility tests passed
Change-Id: I776e1092ab33cf9660f593a22585695c17852e1e
2019-02-12 15:41:54 +00:00
Mathieu Chartier
bd3810b28f Merge "Revert "Revert "Add view inflation device config property""" 2019-02-12 11:11:33 +00:00
Yohei Yukawa
1466e4a4e7 Hide InputMethodManger.showSoftInputUnchecked() from Q+ apps
This is a follow up CL to my previous CL [1], which declared that
InputMethodManger.showSoftInputUnchecked() was deprecated and should
have never be used any more.

At that time, however, we could not simply remove that hidden API
because android.support.v7.widget.SearchView had been used it via
reflection and the reflection code was already statically linked into
many apps in the ecosystem.  What we could do at that time was getting
rid of this hidden API dependency from support lib v26 [2] and making
sure that a clear warning was shown in logcat if apps were still using
older support lib [3].

Almost two years later now, it's probably time to step forward towards
true deprecation of this hidden API.  With this CL, apps that target
Q+ can no longer call this method.

 [1]: I20983e4ce1d625e098a8c2335ce75994cfa43235
      5cfc1b4c10
 [2]: Iaac4673a85c141c787b96fb39806346ccfb85fb3
      fd44fffced7cce36c1ce0d62dfe2542aa6a7c6e9
 [3]: If01316a0c2a210f9ea03b53700d0ef651955ba9c
      101ae464fc

Bug: 36015425
Fix: 123768499
Test: make -j checkbuild
Change-Id: Ie7362f62f1e947ee5a21b90f5150c69f2970d73d
2019-02-12 01:42:56 -08:00
Phil Weaver
f1c246619f Merge "Add owners for accessibility" am: bbbeba3c02 am: a525ea4436
am: c36e36b87e

Change-Id: Iaa5653b02e99a149186a99f3fda28111263aa2ad
2019-02-11 17:12:54 -08:00
Phil Weaver
c36e36b87e Merge "Add owners for accessibility" am: bbbeba3c02
am: a525ea4436

Change-Id: Ia828c34be1f1dac6ea58ce0e68cf032f058dbb0b
2019-02-11 16:53:13 -08:00
TreeHugger Robot
2e71c58863 Merge "Exposed even moar DeviceConfig APIs for testing." 2019-02-12 00:47:56 +00:00
Phil Weaver
a525ea4436 Merge "Add owners for accessibility"
am: bbbeba3c02

Change-Id: I099187d207d5610bc79d630f105bff2de41481c3
2019-02-11 16:34:27 -08:00
Aurimas Liutikas
ec0cfcbafb Merge "Update core widgets to save attribute source info." 2019-02-11 22:08:28 +00:00
Felipe Leme
5d56e66495 Merge "Use DeviceConfig to configure Augmented Autofill Modes." 2019-02-11 22:06:36 +00:00
Adam Powell
4ee8043e8b Merge "Restrict View#mAttachInfo" 2019-02-11 21:06:49 +00:00
Tony Mak
84c8c2a2aa Merge "Add TEST_MAPPING to textclassifier" 2019-02-11 20:47:46 +00:00
TreeHugger Robot
62d07a6c46 Merge "Remove access to private field mFactorySet." 2019-02-11 20:37:32 +00:00
Felipe Leme
cc5102705a Exposed even moar DeviceConfig APIs for testing.
Test: atest AugmentedLoginActivityTest
Test: m update-api
Bug: 124006095

Change-Id: I6e2e1f24ba5cc442d533f7d67cea40a670be3937
2019-02-11 10:03:26 -08:00
Felipe Leme
7841d02e36 Use DeviceConfig to configure Augmented Autofill Modes.
Test: atest AugmentedLoginActivityTest
Bug: 121037717

Change-Id: I269946b3055bce82872976d88fa315c7d8c01b99
2019-02-11 10:03:10 -08:00
Mathieu Chartier
743b363226 Revert "Revert "Add view inflation device config property""
Bug: 111895153
Bug: 123524494
Test: unlock lockscreen
Test: cts-tradefed run cts --enable-parameterized-modules --module-parameter instant_app -m CtsAccelerationTestCases
Test: 6/6 pass as expected (TOT)

This reverts commit 2a3b4394384217ae65b430339270c8914639a9e3.

Change-Id: Ib2267a10ef44b01bc077893172ad39b43ead7841
2019-02-11 16:47:56 +00:00
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
128a61df90 Add TEST_MAPPING to textclassifier
Setup presubmit for textclassifier by using TEST_MAPPING.
We will get a dashboard for the test result as well.

Also fixed a few broken tests found by this CL.

BUG: 124041915

Test: atest --test-mapping frameworks/base/core/java/android/service/textclassifier/TEST_MAPPING

Change-Id: I0c516ea8699d7e94cfabd2ea98ebad58505c7e90
2019-02-08 17:52:27 +00: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
Aurimas Liutikas
ab324cfbe5 Update core widgets to save attribute source info.
Bug: 111439551
Test: make -j
Change-Id: I72997a87122f38b32e38e42a690385acc7d0e521
2019-02-07 16:46:38 -08: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
George Mount
3843288297 Remove access to private field mFactorySet.
Fixes: 123769585
Test: compiled framework

mFactorySet is being modified by app developers to reset the factory
on an existing LayoutInflater. Instead, a developer should use
LayoutInflater#cloneInContext() to create a new LayoutInflater
and set the factory on it instead.

This is often desired at the Activity level, so that any part of
the application getting a LayoutInflater using the Activity as
a Context will get the LayoutInflater with a custom factory. To
do this, the Activity has to replace the returned LayoutInflater.
Something like this should work:

  private LayoutInflater mLayoutInflater;

  @Override
  public Object getSystemService(String name) {
    if (Context.LAYOUT_INFLATER_SERVICE.equals(name)) {
      if (mLayoutInflater == null) {
        mLayoutInflater =
          ((LayoutInflater)super.getSystemService(name)).cloneInContext(this);
        mLayoutInflater.setFactory(new CustomLayoutFactory());
      }
      return mLayoutInflater;
    }
    return super.getSystemService(name);
  }

Change-Id: I155ea9538c5783b32301252fb3fb9baa1cc92036
2019-02-07 22:15:58 +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