Commit Graph

7587 Commits

Author SHA1 Message Date
TreeHugger Robot
9036a88d95 Merge "Logging for linkify selections" 2018-02-12 14:44:35 +00:00
Siyamed Sinir
a454df9c06 Merge "Fix Editor ActionMode content rectangle" 2018-02-09 21:57:14 +00:00
Siyamed Sinir
fdbc5ee763 Fix Editor ActionMode content rectangle
We have made a mistake in a previous change and change the single cursor
selection bounds in a wrong way. 

Test: atest CtsWidgetTestCases:TextViewTest
Bug: 72244890
Change-Id: Ie597ff5a9f82e04d673534e35c49da513132cd5b
2018-02-09 11:24:16 -08:00
Siyamed Sinir
bc48bd8f61 Merge "Remove Toki from text OWNERS files" 2018-02-08 18:55:17 +00:00
Clara Bayarri
d293d6d4b6 Remove Toki from text OWNERS files
Test: none
Change-Id: I9e444318df4a77ee06949d5141667f6c00d9a508
2018-02-08 11:14:10 +00:00
TreeHugger Robot
98517be352 Merge "Revert "Remove @hide from ViewGroup debug methods"" 2018-02-06 22:45:40 +00:00
Richard Ledley
db96b03495 Merge "Remove selection on nonselectable text (which would be there if a user tapped Linkified text) if a TextView loses focus." 2018-02-06 21:34:45 +00:00
TreeHugger Robot
8744f57386 Merge "[Magnifier - 19] Add non-basic CTS tests" 2018-02-06 18:53:33 +00:00
Richard Ledley
5f2f820c81 Remove selection on nonselectable text (which would be there if a user tapped Linkified text) if a TextView loses focus.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest

Bug: 67629726
Change-Id: Ifc3039f0c814c422b2d727f837ca9c88abc2ebe8
2018-02-06 18:09:49 +00:00
Mihai Popa
137b5843d6 [Magnifier - 19] Add non-basic CTS tests
This CL adds two @TestApis required for the magnifier CTS tests.

Bug: 69407609
Bug: 63531115
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I49e53223730f5fbbf353f6574429c1b1a3d877a1
2018-02-06 15:14:44 +00:00
David Ogutu
93ac6d01bb Fix TimePicker keyboard UI num digits for min
Force the minutes to always format to 2 digits. This is a temporary fix
that's not quite fully Locale aware but fixes UI issue. Will need to
refactor code to seperate Locale info, share code with non-keyboard UI
and use more native Locale functions to determine number of digits.

Test: Manual https://drive.google.com/file/d/1iabh2Zzl0YRhj17gbVKr8GvVDXEHUnWI/view?usp=sharing
Bug: 72041032
Change-Id: I0eb479b9aece4726db7bf7fba04dc50ad0f175c5
2018-02-06 09:22:20 -05:00
Alan Viverette
2d7771ca60 Revert "Remove @hide from ViewGroup debug methods"
This reverts commit 1244815e8f.

Bug: 71555179
Test: make
Change-Id: Ibfd97660e5f91fc7fac13b66efa8aa587ba20b4e
2018-02-05 19:14:14 +00:00
TreeHugger Robot
19160d923d Merge "Updating smart text selection animation" 2018-02-05 15:59:56 +00:00
Jan Althaus
92c6decbb8 Logging for linkify selections
Bug: 67629726, 70246800
Test: Manually validated, ran CTS tests, and framework tests
Change-Id: Icd41f1e171767bc466f47c87a6ab611185745fd4
2018-02-05 16:56:52 +01:00
Jan Althaus
80620c52b9 Updating smart text selection animation
Now animates the highlight itself as opposed to an outline.

Bug: 70540865
Test: Manually tested it with single and multi-line - ltr and rtl
Change-Id: I8afee259c9952fcff0b713bca62c82a1022f2b0d
2018-02-05 13:45:13 +01:00
Insun Kang
718c1d122f VV2 & MCV2: Move handling MediaControlView2 visibility logic to VV2
MediaControlView2's setTimeout API is removed and MCV2's visibility
handling logic is moved into VideoView2.

Test: build
Change-Id: I149119148f159c78e86c5061d247f0a434310719
2018-02-05 16:39:58 +09:00
TreeHugger Robot
00f255e795 Merge "VideoView2: Replace showSubtitle with setSubtitleEnabled" 2018-02-05 02:07:55 +00:00
TreeHugger Robot
fdd755df14 Merge "Use ImageDecoder in ImageView.getDrawableFromUri" 2018-02-02 19:51:41 +00:00
Insun Kang
682483d165 VideoView2: Replace showSubtitle with setSubtitleEnabled
- Renames showSubtitle to setSubtitleEnabled
- Introduces isSubtitleEnabled method

Test: build
Change-Id: I4467231870a243706f06e1ccc3c067e769da5824
2018-02-02 10:21:43 +00:00
Insun Kang
8589b7b34b VV2 and MCV2: Override onLayout of ViewGroup and remove MCV2.isShowing()
- Overriding onLayout() is needed as VideoView2 and MediaControlView2
extends ViewGroup.
- Removes MediaControlView2's isShowing() method, since it looks
redundant API.

Test: build, VideoViewTest app
Change-Id: If4608ab56ca3f3883cb674c857f7e53e2dd0e73e
2018-02-02 14:21:19 +09:00
Insun Kang
0d2107bf88 Merge "Make VV2 & MCV2 extend ViewGroup" 2018-02-02 01:40:48 +00:00
Christofer Åkersten
f38d8fb934 Make VV2 & MCV2 extend ViewGroup
Test: VideoViewTest
Change-Id: I91410847de55bef834360d99fcb112b50cef1cea
2018-02-01 21:41:53 +09:00
Sungsoo Lim
7fb54fe9ae MediaControlView2: Remove getProvider()
getProvider() is already in the super class.

Test: build
Change-Id: I89e9dc18da248a94fa8b99e04148278558b1169d
2018-02-01 13:18:12 +09:00
Leon Scroggins III
046a99ebbb Use ImageDecoder in ImageView.getDrawableFromUri
Bug: 63909536
Test: Existing CTS tests

ImageDecoder will bypass the InputStream if possible, allowing it to be
more efficient. In addition, it handles density scaling differently;
instead of using more RAM to scale the image up, it results in scaling
at draw time.

Change-Id: Ied7c0865a736f9ef0de367299264e18ccc3e0b92
2018-01-31 15:43:49 -05:00
Jaewan Kim
bc55661b11 Merge "MediaSession2: Hide system apis" 2018-01-31 14:12:56 +00:00
Abodunrinwa Toki
3bb4436138 Implement TextClassifier.getLogger API
- Introduces getLogger() API.
 - A logger should run in the client's process. This helps us manage
   sessions specific to a client.
 - The logger exposes a tokenizer that clients may use to tokenize
   strings for logging purposes.
 - Logger subclasses need to provide a writeEvent() implementation.
 - SelectionEvent is serializable over IPC.
 - Logger takes care of the session management. It writes session
   specific information into the SelectionEvent.
 - We still keep the SmartSelectionEventTracker for now so clients
   can slowly move off of it. The plan is to delete it.
 - The plan is to include support other event types. e.g. link events.

Bug: 64914512
Bug: 67609167
Test: See topic
Change-Id: Ic9470cf8f969add8a4c6570f78603d0b118956cd
2018-01-31 10:09:54 +00:00
Sungsoo Lim
7d30e1c554 MediaSession2: Hide system apis
Test: build
Change-Id: I6c56c260a002086bbd2c20420b301c66635215c3
2018-01-31 15:43:55 +09:00
TreeHugger Robot
8420d5e596 Merge "Introduce a TextClassifierManagerService." 2018-01-31 05:26:27 +00:00
Christofer Åkersten
a6c97e4615 Move View related methods to helper class
Test: Instantiate MediaControlView2
Change-Id: Ia958a97b38e67f236ee510978c379af9249d2887
2018-01-31 11:27:40 +09:00
Mihai Popa
39b9f424f9 Merge "[Magnifier - 18] Make #update() public" 2018-01-30 21:35:29 +00:00
David Ogutu
321ef3a5af Merge "Fix TimePicker separator l10n issue." 2018-01-30 20:57:58 +00:00
David Ogutu
628bb61c30 Fix TimePicker separator l10n issue.
This was surfacing in the android clock with certain locales e.g. fr_CA.
Fixed for all unqiue locale patterns.

Bug: 71572309
Test: manual - changed locale to Fr_CA and made sure clock seperator WAI
Test: atest CtsWidgetTestCases:TextViewTest CtsWidgetTestCases:EditTextTest CtsWidgetTestCases:TextViewFadingEdgeTest FrameworksCoreTests:TextViewFallbackLineSpacingTest FrameworksCoreTests:TextViewTest

Change-Id: Ie43bf9428e8c5ef2fe2e9545cb5a6dada25d6e52
2018-01-30 12:44:45 -05:00
Mihai Popa
10d69ea7d3 [Magnifier - 18] Make #update() public
The CL adds the Magnifier#update() method in the public API. The method
is used to refresh the content of the magnifier, whenever this is
desired (usually when there is a chance that the magnifier content
became stale).

The initial plan was that this method would not be included in the
public API. This was relying on a feature request we made to the
graphics team, asking for support to have a callback called whenever the
surface the magnifier is attached to changes. This way, we could
refresh the magnifier content whenever the surface changes, without
requiring the user to call #update(). Once the feature request is
implemented (probably in Q according to the last discussion), we will be
able to deprecate #update().

Bug: 63531115
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I62c5794c3227e6a5d36d351c10d6bcf18e1d931a
2018-01-30 14:29:44 +00:00
Insun Kang
4fa8064378 VideoView: Change showSubtitle() to get boolean parameter
- Adds VideoView2 attributes
  - enableControlView
  - showSubtitle (boolean)
  - viewType (enum)
      - surfaceView
      - textureView

- showSubtitle() --> showSubtitle(boolean)
- hideSubtitle() removed.

Test: build

Change-Id: Ib21722af1c9c1caf036e047a18d27d46097e8f03
2018-01-30 21:42:58 +09:00
Jin Seok Park
dde80a9cf4 Remove show/hide API
This CL removes the show/hide API from MediaControlView2 and instead
provides the developer with the same function by calling
setVisibility(View.VISIBLE | View.GONE), and calling the new APIs
set/getTimeout() and requestPlayButtonFocus(). The original Runnable
code has been moved to onVisibilityAggregated() as per API council's
request.

Test: build
Change-Id: If53fb8849b4e086619a9c93c85e61da70272976e
2018-01-30 10:48:10 +09:00
Abodunrinwa Toki
d32906c202 Introduce a TextClassifierManagerService.
Apps wanting to use a TextClassifier service (instead of an
in-app-process TextClassifier) bind to this service. The service
binds to and reroutes calls to a configured system TextClassifierService.

TextClassifierManagerService manages the lifecycle of the configured
TextClassifierService and binds/unbinds to preserve system health.

A configurable TextClassifierService extends TextClassifierService,
declares an android.textclassifier.TextClassifierService intent, and
requires a permission that is only granted to the system so only the
system may bind to it.

The TextClassifierManagerService implements a similar interface to
TextClassifierService (i.e. ITextClassifierService) but doesn't have to.
This is done for simplicity sake and things may change in the future.

The configuration of the default service is in config.xml.
OEMs may change this with a config overlay.
If no TextClassifierService is specified, the default in app process
TextClassifierImpl is used.

Bug: 67609167
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: tbd
Change-Id: I8e7bd6d12aa1a772897529c3b12f47f48757cfe6
2018-01-29 17:16:21 -08:00
Jin Seok Park
0719db7681 Update MediaControlView2/Provider
This CL does the following 5 things:

1) REMOVE setPrevNextListener API
2) REMOVE show/hideSubtitle API
3) EXPOSE Command related strings as public
4) CHANGE time parameter in show(timeout) from integer to long
5) CHANGE setButtonVisibility(visible) parameter from boolean to int

All changes are based on API review.

Test: build
Change-Id: Ia6ffb454100be6a2f75a145e9d6a87bd88faac0c
2018-01-29 22:53:09 +00:00
Mihai Popa
d0166532b4 Merge "[Magnifier-16] Clamp to surface against distortion" 2018-01-29 12:14:25 +00:00
Mihai Popa
3589c2c643 [Magnifier-16] Clamp to surface against distortion
Previously, we were only making sure that the magnified content belongs
to the view the magnifier is attached to. However, when the view was
laid out partially outside the screen, we would pixel copy from outside
the surface the view is attached to. This would lead to the user seeing
a distorted content in the magnifier, in cases when the magnified view
lies outside the screen. This CL addresses this issue, by clamping the
pixel copy coordinates inside the surface we copy the magnifier content
from.

Bug: 72039853
Bug: 63531115
Test: bit CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Iddab05c98b615259938e0d3a3320b98b3b13b246
2018-01-29 12:13:21 +00:00
Insun Kang
7933daec0a Merge "VideoView2: Adds Executor paramter to setFooListener methods" 2018-01-29 05:10:12 +00:00
Insun Kang
620b7f328f VideoView2: Adds Executor paramter to setFooListener methods
- Added Executor parameter to setFooListeners
- Removed setFullScreen()
- Renamed OnFullScreenChangedListener --> OnFullScreenRequestListener

Test: build
Change-Id: I1822876ecf55566182281a76ea7919d7c0112146
2018-01-29 04:00:23 +00:00
Sungsoo Lim
d58f145726 VideoView2: MediaRouter integration with MediaSession
Bug: 72526814
Test: build
Change-Id: Iace25522b433152022bdd3458b6791a89618464b
2018-01-29 11:15:40 +09:00
TreeHugger Robot
4c23c1b365 Merge "[Magnifier - 15] Fix magnifier window positioning" 2018-01-27 04:08:32 +00:00
TreeHugger Robot
8036428c56 Merge "Revert "Move A11y events throttling away from View(RootImpl)"" 2018-01-27 03:45:39 +00:00
Eugene Susla
72c510f1c4 Revert "Move A11y events throttling away from View(RootImpl)"
This reverts commit e4d31b3c10.

Fixes: 71904218
Test: presubmit
Change-Id: Id73bde1a0c11696cf561c84cde027cdca4c6a00f
2018-01-26 11:32:25 -08:00
Mihai Popa
4b6ef9956b [Magnifier - 15] Fix magnifier window positioning
This CL fixes the positioning of the magnifier window when the magnified
view is attached to a window with non-zero insets in its surface. The
magnifier PopupWindow is a panel window attached to the magnified view's
window, so its positioning has to be computed relative to this window.
However, previously the coordinates were computed relative to the view's
surface.

Bug: 72417421
Bug: 63531115
Test: bit CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I27aebd210d7596316f48fc55bfd6a37934624916
2018-01-26 16:01:52 +00:00
Insun Kang
0a16f268f5 VideoView2/MediaControlView2: Remove overriden onKeyDown/dispatchKeyEvent
Test: build
Change-Id: I4f3a397001e771eac1d1f0208d4e2f262c76b44c
2018-01-26 19:32:34 +09:00
Hyundo Moon
6cb0712c53 Merge "VideoView2: Add custom actions API" 2018-01-26 09:42:02 +00:00
Insun Kang
51e8d0a050 Merge "VideoView2: Apply API review comment" 2018-01-26 06:55:13 +00:00
Jaewan Kim
1a2c263c7a MediaSession2: Change MediaPlayerBase to MediaPlayerInterface
Test: Run all MediaComponents tests once
Bug: 72527150
Change-Id: Ifd384ea274ec949caa767210b07e558844552077
2018-01-26 13:28:27 +09:00