Commit Graph

10605 Commits

Author SHA1 Message Date
Adrian Roos
dcc92eda11 Adjust window layout for DisplayCutout
Add policy around how the display cutout should influence window layout:
- if not requested, windows should not overlap with the display cutout
 - except windows that asked for LAYOUT_IN_SCREEN | LAYOUT_INSET_DECOR,
   which overlap only with a top cutout, provided they did not request any FULLSCREEN mode.
- the content frame must never overlap with the display cutout
- adds FLAG2_LAYOUT_IN_CUTOUT to explicitly ask to be laid out in the cutout area.

Bug: 65689439
Test: atest com.android.server.policy.PhoneWindowManagerLayoutTest
Change-Id: I3a966bc78ef7a4e076104a996799369c60ab7de1
2017-12-08 14:45:18 +01:00
Tarandeep Singh
89a6c48a8b Add support for VR InputMethod.
This change adds support for VR-only IMEs in InputMethod framework.
In order to set this VR IME, setVrInputMethod(ComponentName) should be
called by VrManager.

When VrManager calls setVrInputMethod(), IMMS changes updates
the selected input method in a transient way i.e. it doesn't
update the Settings or input history. Once VR mode finishes,
it restores last input from settings.

Bug: 63037786
Test: Manually using the sample app in bug.

Change-Id: I1db7981b5198e7e203d4578cae7e5b6d20037d0d
2017-12-08 00:55:11 +00:00
TreeHugger Robot
ac74dc42f7 Merge "Further improvements when app forges package info for autofill:" 2017-12-07 21:05:59 +00:00
TreeHugger Robot
33203ffd18 Merge "Display Cutout: Dispatch Cutout from WindowManager" 2017-12-07 20:36:13 +00:00
Adrian Roos
5c6b622328 Display Cutout: Dispatch Cutout from WindowManager
Adds the logic to dispatch a DisplayCutout from DisplayFrames
through WindowState to the View hierarchy. Does however not yet
change how windows are laid out in response to a DisplayCutout.

The display cutout is currently never present, the following CL
will add logic to emulate a display cutout on devices that do
not have a physical one.

Bug: 65689439
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
Change-Id: Ie4cd4b575755b66a7ffead31e28640983ef4894e
2017-12-07 19:43:33 +01:00
TreeHugger Robot
734afbe61e Merge "Moar changes for Autofill Field Classification mechanism:" 2017-12-07 17:35:23 +00:00
Felipe Leme
637e05ee0f Further improvements when app forges package info for autofill:
- Dont create a session if the component is not owned by the calling UID.
- Log metrics for forged attempts.
- Avoid possible NPEs on AutofillManager when context or client is null.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.VirtualContainerActivityTest#testAppCannotFakePackageName
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 69981710

Change-Id: I9695bc046f3eb8aeecfe44f80fd0366f68b2c635
2017-12-06 16:58:13 -08:00
Makoto Onuki
299504742f Merge "Extreme battery saver: Allow lowering framerate for experiments." 2017-12-07 00:18:56 +00:00
TreeHugger Robot
a8b9e2a545 Merge changes from topics "moar_fields", "fc_refactor_score"
* changes:
  Implemented autofill field classification on multiple fields and user data.
  Refactored the FieldsClassification score mechanism.
2017-12-06 23:03:17 +00:00
TreeHugger Robot
dac644cd4a Merge "Deprecate inKeyguardRestrictedInputMode" 2017-12-06 22:27:51 +00:00
John Reck
9f51644abf Extreme battery saver: Allow lowering framerate for experiments.
Bug: 68769804
Test: manual
Change-Id: Ic0c95f32c7ba6d86a997997e480e6d8a5f228f25
2017-12-06 13:59:19 -08:00
TreeHugger Robot
ed29cd94f5 Merge "targetSdkVersion float property sanitization" 2017-12-06 21:39:03 +00:00
Felipe Leme
329d04097e Moar changes for Autofill Field Classification mechanism:
- Changed max score to float (range 0.0 - 1.0).
- Replaced getTopMatch() to getMatches().
- Created a Scorer interface with a default edit-distance implementation.
- Added a isFieldClassificationEnabled() method.

Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest
Test: atest CtsAutoFillServiceTestCases:EditDistanceScorerTest
Test: atest CtsAutoFillServiceTestCases:UserDataTest
Test: atest FrameworksCoreTests:SettingsBackupTest

Bug: 68045531

Change-Id: Ice6cbf548053b86b47980d9664a3a21219c0ff08
2017-12-06 13:14:15 -08:00
Felipe Leme
5672defaa6 Implemented autofill field classification on multiple fields and user data.
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationScorerTest
Test: atest CtsAutoFillServiceTestCases:UserDataTest

Bug: 68045531

Change-Id: Ia9252cb5b84236a76a1419f4a2669b2e933f5177
2017-12-06 11:20:10 -08:00
John Reck
c888788cb9 targetSdkVersion float property sanitization
Bug: 70242902
Test: CTS tests checking for exception still pass
Change-Id: I77dd772a6cb7077de058a3ca85b984c2c3f7321e
2017-12-06 09:46:13 -08:00
TreeHugger Robot
57a69f683c Merge "Revert "Don't generate irrelevant a11y events - framework"" 2017-12-06 16:48:16 +00:00
TreeHugger Robot
473b5606c9 Merge "SurfaceControl: Fix Global Transaction locking error." 2017-12-06 03:51:41 +00:00
Tarandeep Singh
b360b995c9 Add new SystemApi InputMethod attr isVrOnly.
In order to support VR-only InputMethod, new attribute 'isVrOnly' is
added.

Bug: 63037786
Test: atest InputMethodInfoTest
Change-Id: Iab936df9972212f56277ef9c18d9e1f67f92a913
2017-12-05 13:37:14 -08:00
Eugene Susla
d4128ec0df Revert "Don't generate irrelevant a11y events - framework"
This reverts commit 8ddfb4794f.

Test: presubmit
Bug: 69975306
Change-Id: I05cb545eb0adc77298dddf2dea2997ef36b58a5f
2017-12-05 13:08:51 -08:00
Robert Carr
c5fc461116 SurfaceControl: Fix Global Transaction locking error.
Simple mistake. Change from one branch didn't get propagated forward
during review.

Bug: 69974273
Test: Boots
Change-Id: I4df8a939f2b38202ada2d1dc150b56ec5dc8f496
2017-12-05 11:55:40 -08:00
Abodunrinwa Toki
358b028f01 Merge "Add a signature to TextSelection and TextClassification" 2017-12-05 16:39:28 +00:00
Jorim Jaggi
b4de060971 Merge "Make SurfaceControl parcelable (1/2)" 2017-12-05 15:41:12 +00:00
TreeHugger Robot
3ce82e34e6 Merge "Refactored field detection mechanism to support multiple fields." 2017-12-04 19:46:51 +00:00
Abodunrinwa Toki
008f387e83 Add a signature to TextSelection and TextClassification
A signature is a tag that a TextClassifier may use to identify an
object it returned for a given query. This is useful for logging
purposes.

This cl also removes:
 - TextClassification.getLogType() and related logging.
   This is already covered by selection event logging.
 - TextClassification.getVersionInfo(),
   TextSelection.getVersionInfo()/getSourceClassifier().
   These are now featured in the signature.

TODO: Write a container class that generates and parses signatures.

Bug: 69791269
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I294f7e4d16c98c6512d56d08d488b204c1f91d47
2017-12-04 19:22:00 +00:00
Abodunrinwa Toki
9798a611f7 Merge "Primary/Secondary actions in TextClassification." 2017-12-04 18:13:25 +00:00
Felipe Leme
452886a5b8 Refactored field detection mechanism to support multiple fields.
Now instead of using FillResponse.setFieldDetection() with an object that
contains both the autofill ids an the user data, service must:
- Set global mapping through AutofillService.setUserData()
- Pass just the autofill ids to FillResponse.setFieldClassificationIds()

This CL is purely a refactoring CL - although the new API supports multiple
values and multiple fields, the implementation is still hardcode for one
value and one field (as before).

Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest
Test: atest CtsAutoFillServiceTestCases:UserDataTest
Test: atest CtsAutoFillServiceTestCases:FillResponseTest

Bug: 68045531

Change-Id: I8d846d817dfcde3a4db7abff798bb2250e1c4e7b
2017-12-04 09:56:06 -08:00
Chavi Weingarten
29fdbc67fc Merge changes from topic "hw_bitmap"
* changes:
  Update screenshot requests to render proper crop and rotation.
  Revert "Revert "Updated screenshot code to reflect native changes.""
2017-12-04 17:10:30 +00:00
Jorim Jaggi
06975df77a Make SurfaceControl parcelable (1/2)
Bug: 69145041
Test: Send SurfaceControl over binder
Change-Id: Ia3780fcb8dc2716f416eaad151aff79ea3f977a9
2017-12-04 16:43:52 +01:00
Abodunrinwa Toki
ba3856266c Primary/Secondary actions in TextClassification.
Bug: 68846316
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I84c652cb953f1af9b1c4077fa2a13ae23689c48b
2017-12-02 01:06:39 +00:00
TreeHugger Robot
514a7403b3 Merge "Storage refactor for EntityConfidence" 2017-12-01 12:36:56 +00:00
Jan Althaus
bbe43dfd97 Storage refactor for EntityConfidence
Caching the sorted entity list so users don't need to be careful to cache
the result of getEntities (previously dont by TextSelection and
TextClassification, but not TextLink). Also switched to ArrayMap as it's
better suited for small maps like the ones generated by the classifier.

Test: Ran FrameworksCoreTests
Change-Id: I08cc9f72146ccab88b6a3624f3775a366c814f7a
2017-12-01 10:37:01 +01:00
TreeHugger Robot
d583858adc Merge "Fix scrolling of fill UI anchored to a virtual view - framework" 2017-11-30 23:15:24 +00:00
chaviw
a69e0a7d7c Update screenshot requests to render proper crop and rotation.
The previous screenshot requests in SystemUI would generate a bitmap
and then adjust crop and rotation afterwards. Bitmaps from screenshots
are now hw Bitmaps so they can't be updated in software. Instead request
the proper crop and rotation from the native code to generate a Bitmap
with the correct configurations.

Change-Id: I4591c468b055c784460e5ddf2f9163ffa943c2ee
Fixes: 69898957
Test: Manual screenshots work and bugreport screenshots work in landscape.
2017-11-30 13:02:14 -08:00
Svet Ganov
05b7b4602e Fix scrolling of fill UI anchored to a virtual view - framework
Test: manual
      cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases

bug:69845390

Change-Id: I22442e92e73888522dcb170e295ad5f66dda4026
2017-11-29 23:59:51 -08:00
Chavi Weingarten
d7ec64ccd0 Revert "Revert "Updated screenshot code to reflect native changes.""
This reverts commit ea2eb5a144.

Reason for revert: Ready to test out changes with SystemUI update

Change-Id: I9c8d5672a530334300bc1ea454a7fd7900296c7c
2017-11-29 17:54:23 -08:00
TreeHugger Robot
8e181791ae Merge "TextClassifier cleanup #1" 2017-11-30 01:07:29 +00:00
Siarhei Vishniakou
5f13cf0586 Deprecate inKeyguardRestrictedInputMode
The api inKeyguardRestrictedInputMode is no longer needed,
deprecate it. Redirect output to isKeyguardLocked().
Remove inKeyguardRestrictedKeyInputMode.

Test: make, flash, use system ui
Bug: 65998293
Change-Id: Ie2609758fc013aab10530a1be087c983c51d86b0
2017-11-29 15:25:35 -08:00
Chavi Weingarten
8d0e284df4 Merge "Revert "Updated screenshot code to reflect native changes."" 2017-11-29 21:42:37 +00:00
Chavi Weingarten
ea2eb5a144 Revert "Updated screenshot code to reflect native changes."
This reverts commit 689e091c7f.

Reason for revert: SystemUI and some other places need to be updated as well. Will resubmit with the other necessary changes

Change-Id: I8d1955b289d91a89c4d3f117c0ba0c3119ff51fc
Bug: 69898957
2017-11-29 21:38:57 +00:00
TreeHugger Robot
229f0d0305 Merge "Don't generate irrelevant a11y events - framework" 2017-11-29 20:56:37 +00:00
Abodunrinwa Toki
4d232d6243 TextClassifier cleanup #1
- Introduces TextClassifier methods that do not take options
 - Adds warning to TextClassifier implementations not to implement
   or call certain default methods. Ideally, only one of the
   overloaded interface methods (the one that takes Options) needs
   to be implemented
 - Changes TextLinks.Options to a mutable type
 - Updates tests

 TODO: Introduce a TextClassification.Builder.setDefaultAction(...) and
 change addAction(...) to addExtraAction(...).
 TODO: Cts test to validate input params.

Bug: 68846316
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I9a12935388e16a9b57567a71c97afaee63405183
2017-11-29 19:57:11 +00:00
Svet Ganov
8ddfb4794f Don't generate irrelevant a11y events - framework
Now before we fire an a11y event we check if this event has an
observer. As a bonus we don't push the state to clients if the
dynamic service config did not change.

Test: cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:69427760

Change-Id: Ie208e13b8557bb7a120198a43efcb79c2752f5db
2017-11-28 17:58:38 -08:00
Chavi Weingarten
7e35c55f9d Merge "Updated screenshot code to reflect native changes." 2017-11-29 01:31:57 +00:00
chaviw
689e091c7f Updated screenshot code to reflect native changes.
The changes in native code removed using a GraphicBufferProducer and
instead use only a GraphicBuffer to generate screenshots. Updated JNI
code so it calls the screensot function that returns a GraphicBuffer
and handle returning either a Surface, GraphicBuffer, or Bitmap.

Also updated screencap shell code so it uses the new GraphicBuffer
screenshot code.

Test: Recents, screenshot from SystemUi, screenshot from shell.
Change-Id: I6cb4f619e59461790a2a8f0cd2ea1192d9ae66b6
2017-11-28 15:16:10 -08:00
Phil Weaver
e03bc13161 Merge "Bypass a11y cache when requested" 2017-11-28 22:47:02 +00:00
Chavi Weingarten
418346a8cc Merge "Snapshot Task with the app window crop for Recents" 2017-11-28 21:51:43 +00:00
TreeHugger Robot
cc6b4be220 Merge "Correct ordering of status bar panel layers." 2017-11-28 21:17:13 +00:00
TreeHugger Robot
68081e7e16 Merge "New API to specify accessibility focus grouping" 2017-11-28 19:24:22 +00:00
Robert Carr
8360a782fa Correct ordering of status bar panel layers.
Not sure what bug was hiding this before but seems pretty clear,
that this is the ordering we need. See the documentation, APPLICATION_PANEL, etc...

Bug: 69591927
Test: Manual
Change-Id: I82fc011aff6122efa5c3ed63da154761e7065612
2017-11-28 11:19:41 -08:00
chaviw
fbe47df2a4 Snapshot Task with the app window crop for Recents
Snapshot a specific task and its children instead of taking a snapshot
of the whole screen with max and min layer values. This makes it clear
what the desired screenshot is instead of trying to determine what the
max and min z layers should be.

In the process of updating the snapshot code, I split the code that
captures a layer from the code that captures the whole screen. This
simplified the code so the capture screen doesn't need to invoke the
frame calculations since it will be capturing the whole screen anyway.

Test: Recents snapshots work correctly without the IME, status, and
navigation bar

Change-Id: I8776c1ddb9cd8a23a482b045720960702796fd5f
2017-11-28 10:52:43 -08:00