Commit Graph

7574 Commits

Author SHA1 Message Date
TreeHugger Robot
19160d923d Merge "Updating smart text selection animation" 2018-02-05 15:59:56 +00: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
Hyundo Moon
46377a9aae VideoView2: Add custom actions API
Test: Using VideoViewTest application
Change-Id: I941bf0f9605918b0e0f9e4684327eee9ffe24e11
2018-01-26 12:58:55 +09:00
Insun Kang
df0728c15a VideoView2: Apply API review comment
- Lint error: setVideoURI --> setVideoUri
- Adds 'View' parameter to the listener methods
- Adds missing documents for constants
- Removes getAudioSessionId()
- Typos

Test: build
Change-Id: I217c7608a8b9fed4111d0c928a270784307bf378
2018-01-26 11:23:04 +09:00
TreeHugger Robot
ae30c68489 Merge "VideoView2: Remove APIs supported by MediaSession" 2018-01-25 21:53:12 +00:00
Sungsoo Lim
82af545ca6 VideoView2: Remove APIs supported by MediaSession
Developers can use a MediaController instance from
getMediaController() instead.

Test: build
Change-Id: If58a040155a2a6894227aa89c20e7dbed6643c4e
2018-01-25 17:14:43 +09:00
TreeHugger Robot
c4a79e03ad Merge "Introduce InputConnection#reportLanguageHint()" 2018-01-25 04:23:38 +00:00
Evan Rosky
c41adfac71 Merge "Expose selector draw condition for test" 2018-01-25 00:08:03 +00:00
Jin Seok Park
482173e03c Change MediaControlView2 APIs
Test: build
Change-Id: Ida307fa16f76e680aa12b92cbce4a8635cac17b2
2018-01-24 16:13:42 +00:00
Jin Seok Park
421e7ec3df Merge "Put latest MediaControlView2/VideoView2 code" 2018-01-24 11:24:17 +00:00
Sungsoo Lim
c9af5b3076 Merge "VideoView2: Add API for MediaRouter intergration" 2018-01-24 10:15:29 +00:00
Hyundo Moon
efeb45eabd Put latest MediaControlView2/VideoView2 code
This CL brings latest MediaControlView2/VideoView2 code from
experimental, and it does the following:
 - Fullscreen button support (ag/3490251)
 - Set prev/next listener and controlling button visibility (ag/3498244)

Test: Ran VideoViewTest app
Change-Id: I1a64a9c98dcc625b504785728673edbee7b6935d
2018-01-24 19:07:38 +09:00
Jin Seok Park
8b314b2b5d Merge "Add API documentation for MediaControlView2" 2018-01-24 06:35:28 +00:00
Sungsoo Lim
af2a1ad069 VideoView2: Add API for MediaRouter intergration
Test: build
Change-Id: I3d52d332f587ea8c5b1fa97de512805001e9a130
2018-01-24 15:12:26 +09:00
Jin Seok Park
d9ce1bce82 Add API documentation for MediaControlView2
Test: ran 'make doc-comment-check-docs' after removing @hide tag.
Change-Id: I0eb45ed92e853ec1683c54863f0fdecccd2aa6e9
2018-01-24 14:36:28 +09:00