summaryrefslogtreecommitdiff
path: root/core/java/android/widget/MediaController.java
Commit message (Collapse)AuthorAgeFilesLines
* Split animation methods out of OnBackInvokedCallbackVadim Caen2022-04-011-6/+1
| | | | | | | | | | | | | | This makes OnBackInvokedCallback SAM compatible Bug: 227789359 Test: atest \ CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationLegacyTest \ CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationTests \ WmTests:com.android.server.wm.BackNavigationControllerTests \ FrameworksCoreTests:android.window.BackNavigationTest \ FrameworksCoreTests:android.window.WindowOnBackInvokedDispatcherTest \ CtsViewTestCases:android.view.cts.OnBackInvokedDispatcherTest Change-Id: Iab86b0488f1b3048eb02042191acaeb6a645a0bc
* Migrate MediaController to use OnBackInvokedDispatcherShan Huang2022-03-231-0/+58
| | | | | | | | The OnBackInvokedCallback will be called when an app is requesting the new back dispatch behavior. Otherwise we keep dispatching KEYCODE_BACK to MediaController. Test: In BackTestApp, try dismissing media controller by swiping back, both in new and legacy back dispatch. Change-Id: I9ad3c199277838639c875c78a3a8dfb0963b3ca4
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-061-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I41e12e425284e74561c6b61663241df364ae54a1
* Limit access to suspected false positives.Mathew Inwood2018-12-281-4/+5
| | | | | | | | | | | | | | | | | | | | | Members modified herein are suspected to be false positives: i.e. things that were added to the greylist in P, but subsequent data analysis suggests that they are not, in fact, used after all. Add a maxTargetSdk=P to these APIs. This is lower-risk that simply removing these things from the greylist, as none of out data sources are perfect nor complete. For APIs that are not supported yet by annotations, move them to hiddenapi-greylist-max-p.txt instead which has the same effect. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-211-0/+22
| | | | | | | | | | | | | | | | For packages: android.widget This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ic61019b1df85448a158fc2ba55c326353222c6b9
* Code reformatting for upcoming automated code changes.Mathew Inwood2018-08-201-1/+2
| | | | | | | | | | | | Adding annotations to individual fields cannot be easily done when there are two fields defined in a single statement. Put each definition in a statement of its own. See go/UnsupportedAppUsage for more context. Bug: 110868826 Test: m Change-Id: If3adee4136f3c406e9cebd9d2845b22b979b8353
* Implicitly cast views obtained via View.findView methodsAlan Viverette2017-02-271-8/+8
| | | | | | | | | | Removes all explicit casts from android.widget classes. Also @removes methods on ListView that were overriding @hidden methods and should never have been exposed as public API. Bug: 24137209 Test: make Change-Id: I89f0e51258560987b3942251fd249210f825ac2a
* Revert "Implicitly cast views obtained via View.findView methods"Alan Viverette2017-02-031-8/+8
| | | | | | | | This reverts commit 06c2fffdaa81544522de751846754f781a9970a9. Reason for revert: Java 8 doesn't support this magic. Change-Id: Iaa41f4e4d0072b9a97cff9cd3788403d4ab79d13
* Implicitly cast views obtained via View.findView methodsAlan Viverette2017-01-271-8/+8
| | | | | | | | | | Removes all explicit casts from android.widget classes. Also @removes methods on ListView that were overriding @hidden methods and should never have been exposed as public API. Bug: 24137209 Test: make Change-Id: I6ccfc6f001b355c4880f2b54e1a5474df78d6228
* Fix a few view ctors to not call Looper.myLooperJohn Reck2015-10-201-25/+18
| | | | | Bug: 25116730 Change-Id: I4e394c281feef6f7987433298d66f2df11352416
* MediaController: Keep the controller when touch exploration is enabledJae Seo2015-06-051-13/+26
| | | | | | | Also added missing final and @Override keywords Bug: 17199815 Change-Id: If96554e36799557a2d81767f287aeb446e4a1983
* Move PhoneWindow and friends back into internal packageAdam Powell2015-05-061-1/+1
| | | | | | | | | | | | PhoneWindow, PhoneLayoutInflater and PhoneFallbackEventHandler decided to @hide out over in the android.view package after the policy jar was disbanded. Give them a more appropriate home over in framework that doesn't imply that they should be accessed from other internal layers of abstraction. Bug 19606548 Change-Id: Id07b791d178fa447010b49b24726b52208838e88
* MediaController: workaround to disable seekRobert Shih2015-04-271-0/+10
| | | | | | | An example use case is live HLS streams. Bug:19489473 Change-Id: I9c278f2875a5faaf1af092cc84888d4280a00747
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-2/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* Split up android.policy into framework.jar and services.jar 1/3Jorim Jaggi2015-02-101-3/+2
| | | | Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
* First quick implementation of auto assist data.Dianne Hackborn2015-02-061-11/+2
| | | | | | | | | | | | | | Introduce new AssistData class that contains all data the framework automatically generates for assist. Currently populated with a very simple tree structure representing the app's view hierarchy. Reworked how we populate the class name for accessibility info, so this is provided through a new method call on View that subclasses can override. This method is also used to populate the class name in AssistData. Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
* Fix accessibility delegationAlan Viverette2015-01-071-4/+6
| | | | | | | | | | | | | | | Ensures that delegate code is run last. Previously, calling the super method from an accessibility delegate set on a widget would only run code in the widget's parent. Next, the delegate code would run. Finally, the widget's code would run. As a result, the widget code would override any data supplied by the delegate. By moving all overridden code to internal methods, we ensure that the call chain for super includes the widget's parent code followed by the widget's code. The delegate code will always run last. BUG: 17641433 Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
* Add descriptions to MediaController buttonsRoboErik2014-08-071-32/+42
| | | | | | | This widget was missing some accessibility descriptions. bug:16536697 Change-Id: I6f50fd1f4fc0a804151ff465b612128d71a1fde6
* MediaController does not check for cancelled motions in onTouchEvent, causingRobert Shih2013-11-151-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nested invocations of WindowManagerGlobal.addView. Sample stack trace below. android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:228) android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) android.widget.MediaController.show(MediaController.java:346) android.widget.MediaController.onTouchEvent(MediaController.java:445) android.view.View.dispatchTouchEvent(View.java:7690) android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2184) android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1945) android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2186) android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959) android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2186) android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959) android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2186) android.view.ViewGroup.cancelAndClearTouchTargets(ViewGroup.java:2049) android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2567) android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:2836) android.view.ViewRootImpl.doDie(ViewRootImpl.java:5259) android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:233) android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) android.widget.MediaController.show(MediaController.java:346) Duplicated views are consequently added to WindowManagerGlobal.mViews. Subsequent calls to WindowManagerGlobal.removeView does not remove the duplicated entry. Another subsequent call to WindowManagerGlobal.addView detects the extra entry and fails. Bug: 11399773 Change-Id: I1e07fcaf341fbae1b0f93bed0f42645801b9df2d
* Add VideoView.getAudioSessionId()Marco Nelissen2013-05-091-0/+7
| | | | | | | | This lets apps get the audio session id of the video being played, so they can apply effects to the audio track. b/8767565 Change-Id: Iaa39d97d0b6fb528ed04b52d579afa58444ebcfe
* Make VideoView/MediaController behave betterMarco Nelissen2012-11-131-2/+10
| | | | | | | | Make VideoView support wrap_content size, and position the MediaController inside of the anchor view instead of below it and centered on the screen. b/6179034 Change-Id: Iec0dd9a1d953f742bbf7b12065946743a03745e5
* [Audio]Press camera button during Http live Audio playing, then return ↵bxu10X2012-08-171-1/+2
| | | | | | | | | | | | | | | Browser, DUT display abnormal. When long press camera key, dispatchKeyEvent function will add control surface after the control view hide, actually, we needn't show control view after we press camera key. Change-Id: I45175c4eb97b3f13469cd9d8bacb295c9c5803dd Author: Bin Xu <bxu10X@intel.com> Signed-off-by: Bin Xu <bxu10X@intel.com> Singed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 28344
* AccessibilityEvent/AccessibilityNodeInfo class name property should be set ↵Svetoslav Ganov2012-01-171-0/+14
| | | | | | | | | | | | | | | to only framework classes. AccessibilityEvent and AccessibilityNodeInfo have a property className which is set to the source Java class. This is problematic since leads to leaking private classes which would allow an accessibility service to load classes from other packages. This is strongly undesirable since not trusted code can be loaded, and hence executed, in the accessibility service. To address that the class name is set to the most concrete framework class extended by the info/event source. bug:5878943 Change-Id: I7b3114ece8772ea2773f5151e21b8a6f2006882a
* Fix 5389072: NPE in MediaController.updateFloatingWindowLayout().Chih-Chung Chang2011-09-291-5/+2
| | | | | | | There was another constructor which we didn't add the call to initialize the layout. Change-Id: I1519c9afd7d6333736fe19d256f55a2f4cdc60c3
* Fix 5158468: Update floating window size when the anchor view size changes.Chih-Chung Chang2011-09-281-19/+52
| | | | | | | | Originally when surfaceChanged() happens, we remove the old window and create a new window. This causes flickering. Now we just update the window layout according to the size of the anchor view. Change-Id: Id741dac07872e473f2c9829b626c5c9568e7e22d
* Fix 5229466: don't consume pointer events outside the windowChih-Chung Chang2011-09-211-0/+1
| | | | Change-Id: Ifa3d1d5edd81346e6ca80e113f80914ee2c47055
* Enable touch splitting for all windows by default.Jeff Brown2010-11-121-1/+2
| | | | | | | | | | | New default only applies to applications with targetSdkVersion >= HONEYCOMB. Old applications default to no touch splitting for their windows. In addition, enabled split touch for various system windows. Bug: 3049580 Change-Id: Idc8da9baa2cd8e1e4e76af8967d7b6a5ccb94427
* Add plumbing for volume mute key.Jeff Brown2010-11-021-1/+2
| | | | | | | | Full support for the volume mute key will be implemented in a later change. Bug: 2912307 Change-Id: I98c27d6360f159c8b7447e04b45f442eff87b38a
* Fix policy issues when screen is off.Jeff Brown2010-11-011-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrote interceptKeyBeforeQueueing to make the handling more systematic. Behavior should be identical except: - We never pass keys to applications when the screen is off and the keyguard is not showing (the proximity sensor turned off the screen). Previously we passed all non-wake keys through in this case which caused a bug on Crespo where the screen would come back on if a soft key was held at the time of power off because the resulting key up event would sneak in just before the keyguard was shown. It would then be passed through to the dispatcher which would poke user activity and wake up the screen. - We propagate the key flags when broadcasting media keys which ensures that recipients can tell when the key is canceled. - We ignore endcall or power if canceled (shouldn't happen anyways). Changed the input dispatcher to not poke user activity for canceled events since they are synthetic and should not wake the device. Changed the lock screen so that it does not poke the wake lock when the grab handle is released. This fixes a bug where the screen would come back on immediately if the power went off while the user was holding one of the grab handles because the sliding tab would receive an up event after screen turned off and release the grab handles. Fixed a couple of issues where media keys were being handled inconsistently or not at all, particularly in the case of the new PAUSE, PLAY and RECORD keys. Bug: 3144874 Change-Id: Ie630f5fb6f128cfdf94845f9428067045f42892c
* merge from open-source masterThe Android Open Source Project2010-06-021-1/+1
|\ | | | | | | Change-Id: I8333e295ba6b6ed8e7658ecf3fbf1ebea3537aeb
| * Replaced raw string arguments for Context.getSystemService() with final ↵Christian Mehlmauer2010-05-311-1/+1
| | | | | | | | | | | | Context variables Change-Id: If5139a1526101292e5da557bfad3f4db80fb64a8
* | Deprecate fill_parent and introduce match_parent.Romain Guy2010-01-081-2/+2
|/ | | | Bug: #2361749.
* When bringing up the media controller view, focus the play/pause button.Marco Nelissen2009-08-191-0/+6
|
* Do not enable the rew/pause/ffwd buttons when the media being played does notMarco Nelissen2009-08-191-9/+32
| | | | | | support these functions. This extends the MediaPlayerControl interface with some new methods, and uses reflection to detect whether the old or new interface is used by an application.
* Ensure ongoing progress updates after using the scroll ball to adjust position.Andreas Huber2009-04-201-11/+39
| | | | | | | | | | | | | We use a single outstanding message of type SHOW_PROGRESS to refresh the progress bar's current position as well as textual display of time and duration. This message could get lost if the scroll ball was used to adjust the current playback position as we entered state "mDragging" which would cause the subsequent SHOW_PROGRESS message to be a no-op and would also cause it to not be re-enqueued. The change refactors the seekbar logic a little and makes sure that while dragging there isn't a pending SHOW_PROGRESS message in the queue and once dragging is over, exactly one SHOW_PROGRESS message is reenqueued. related to bug 1721227
* AI 145778: Manual merge changes 145382-145384 from cupcake.Andy Stadler2009-04-101-2/+2
| | | | Automated import of CL 145778
* auto import from //branches/cupcake_rel/...@140373The Android Open Source Project2009-03-181-0/+2
|
* auto import from //branches/cupcake/...@137197The Android Open Source Project2009-03-091-0/+1
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+552
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-552/+0
|
* auto import from //branches/cupcake/...@127101The Android Open Source Project2009-01-201-0/+6
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-0/+2
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+544