Home
last modified time | relevance | path

Searched full:focus (Results 1 – 25 of 4288) sorted by relevance

12345678910>>...172

/aosp_15_r20/frameworks/base/media/java/android/media/
H A DAudioFocusRequest.java29 * A class to encapsulate information about an audio focus request.
31 * request and abandon audio focus, respectively
35 * <h3>What is audio focus?</h3>
36 * <p>Audio focus is a concept introduced in API 8. It is used to convey the fact that a user can
37 * only focus on a single audio stream at a time, e.g. listening to music or a podcast, but not
39 * but there is only one the user would really listen to (focus on), while the other plays in
42 * <p>When an application requests audio focus, it expresses its intention to "own" audio focus to
43 * play audio. Let's review the different types of focus requests, the return value after a request,
45 * <p class="note">Note: applications should not play anything until granted focus.</p>
47 * <h3>The different types of focus requests</h3>
[all …]
/aosp_15_r20/frameworks/base/services/core/java/com/android/server/audio/
H A DMediaFocusControl.java71 * that they lost focus for most use cases.
92 * set to true so the framework enforces fading out apps that lose audio focus in a
129 * Test method to return the duration of the fade out applied on the players of a focus loser
138 * Test method to return the length of time after a fade out before the focus loser is unmuted
140 * @return the time gap after a fade out completion on focus loss, and fade in start in ms
216 * Arbitrary maximum size of audio focus stack to prevent apps OOM'ing this process.
222 "focus commands as seen by MediaFocusControl");
234 // make the suspended app lose focus through its focus listener (if any) in noFocusForSuspendedApp()
252 * Discard the current audio focus owner (unless the user is considered {@link
254 * Notify top of audio focus stack that it lost focus (regardless of possibility to reassign
[all …]
H A DFocusRequester.java45 * Class to handle all the information about a user of audio focus. The lifecycle of each
46 * instance is managed by android.media.MediaFocusControl, from its addition to the audio focus
47 * stack, or the map of focus owners for an external focus policy, to its release.
65 * the audio focus gain request that caused the addition of this object in the focus stack.
74 * the audio focus loss received my mFocusDispatcher, is AudioManager.AUDIOFOCUS_NONE if
75 * it never lost focus.
79 * whether this focus owner listener was notified when it lost focus
83 * whether this focus owner has already lost focus, but is being faded out until focus loss
84 * dispatch occurs. It's in "limbo" mode: has lost focus but not released yet until notified
88 * the audio attributes associated with the focus request
[all …]
/aosp_15_r20/cts/tests/tests/media/audio/src/android/media/audio/cts/
H A DAudioFocusTest.java171 // for query of fade out duration, focus request/abandon test methods, and focus requests in setUp()
232 assertEquals("Focus gain differs", AudioManager.AUDIOFOCUS_GAIN, in testAudioFocusRequestBuilderDefault()
237 assertEquals("Delayed focus differs", false, reqDefaults.acceptsDelayedFocusGain()); in testAudioFocusRequestBuilderDefault()
255 assertEquals("Focus gain differs", focusGain, newReq.getFocusGain()); in testAudioFocusRequestCopyBuilder()
257 assertEquals("Delayed focus differs", true, newReq.acceptsDelayedFocusGain()); in testAudioFocusRequestCopyBuilder()
265 assertEquals("Focus gain differs", AudioManager.AUDIOFOCUS_GAIN, newReq.getFocusGain()); in testAudioFocusRequestCopyBuilder()
267 assertEquals("Delayed focus differs", true, newReq.acceptsDelayedFocusGain()); in testAudioFocusRequestCopyBuilder()
327 @RequireNotAutomotive(reason = "Auto has its own focus policy")
335 @RequireNotAutomotive(reason = "Auto has its own focus policy")
343 @RequireNotAutomotive(reason = "Auto has its own focus policy")
[all …]
/aosp_15_r20/cts/tests/tests/car/src/android/car/cts/
H A DCarAudioFocusTest.java64 private static final int INTERACTION_REJECT = 0; // Focus not granted
65 private static final int INTERACTION_EXCLUSIVE = 1; // Focus granted, others loose focus
66 private static final int INTERACTION_CONCURRENT = 2; // Focus granted, others keep focus
144 assertWithMessage("Request with delayed focus should be granted") in requestAudioFocus_forRequestWithDelayedFocus_requestGranted()
159 assertWithMessage("Media focus request during call should be delayed") in requestAudioFocus_forRequestWithDelayedFocus_whileOnCall_requestDelayed()
181 String message = "Delayed focus request should be granted after call ended"; in abandonAudioFocusRequest_forCall_whileFocusDelayed_focusGained()
184 "Could not gain focus for delayed focus after call ended")) in abandonAudioFocusRequest_forCall_whileFocusDelayed_focusGained()
200 assertWithMessage("Abandoning delayed focus should be granted during call") in abandonAudioFocusRequest_forDelayedRequest_whileOnCall_requestGranted()
226 String message = "Abandoned delayed focus request should not be granted after call ended"; in abandonAudioFocusRequest_forCall_afterDelayedAbandon_delayedRequestDoesNotGainsFocus()
229 "Focus gained for abandoned delayed request after call")) in abandonAudioFocusRequest_forCall_afterDelayedAbandon_delayedRequestDoesNotGainsFocus()
[all …]
/aosp_15_r20/packages/services/Car/service/src/com/android/car/audio/
DCarAudioFocus.java99 // We keep track of all the focus requesters in this map, with their clientId as the key.
100 // This is used both for focus dispatch and death handling
104 // it expects to request focus concurrently for different USAGEs so it knows which USAGE
105 // gained or lost focus at any given moment. If the SAME listener is used for requests of
106 // different USAGE while the earlier request is still in the focus stack (whether holding
107 // focus or pending), the new request will be REJECTED so as to avoid any confusion about
108 // the meaning of subsequent GAIN/LOSS events (which would continue to apply to the focus
127 "Focus interactions can not be null"); in CarAudioFocus()
143 logFocusEvent("setRestrictFocus: is focus restricted " + isFocusRestricted); in setRestrictFocus()
177 Slogf.i(TAG, "abandonNonCriticalEntriesLocked keeping critical focus " in abandonNonCriticalEntriesLocked()
[all …]
DCarZonesAudioFocus.java59 * <p><b>Note:</b> Manages audio focus on a per zone basis.
89 //Create focus for all the zones in createCarZonesAudioFocus()
109 * Query the current list of focus loser in zoneId for uid
110 * @param uid uid to query for current focus losers
112 * @return list of current focus losers for uid
115 CarAudioFocus focus = mFocusZones.get(zoneId); in getAudioFocusLosersForUid() local
116 return focus.getAudioFocusLosersForUid(uid); in getAudioFocusLosersForUid()
120 * Query the current list of focus holders in zoneId for uid
121 * @param uid uid to query for current focus holders
123 * @return list of current focus holders that for uid
[all …]
DFocusInteraction.java59 * FocusInteraction is responsible for evaluating how incoming focus requests should be handled
61 * a {@link AudioContext} that is currently holding focus.
71 // Values for the internal interaction matrix we use to make focus decisions
73 static final int INTERACTION_REJECT = 0; // Focus not granted
75 static final int INTERACTION_EXCLUSIVE = 1; // Focus granted, others loose focus
77 static final int INTERACTION_CONCURRENT = 2; // Focus granted, others keep focus
83 // Each Row represents CarAudioContext of current focus holder
88 // Focus holder: INVALID
106 // Focus holder: MUSIC
124 // Focus holder: NAVIGATION
[all …]
/aosp_15_r20/frameworks/av/camera/include/camera/
H A DCameraParameters.h252 // Current focus mode. This will not be empty. Applications should call
253 // CameraHardwareInterface.autoFocus to start the focus if focus mode is
257 // Supported focus modes.
260 // The maximum number of focus areas supported. This is the maximum length
264 // Current focus areas.
267 // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas
268 // first. If the value is 0, focus area is not supported.
270 // Each focus area is a five-element int array. The first four elements are
276 // point. The width and height of focus areas cannot be 0 or negative.
282 // focusing than the larger area. Focus areas can partially overlap and the
[all …]
/aosp_15_r20/hardware/interfaces/camera/common/default/include/
H A DCameraParameters.h255 // Current focus mode. This will not be empty. Applications should call
256 // CameraHardwareInterface.autoFocus to start the focus if focus mode is
260 // Supported focus modes.
263 // The maximum number of focus areas supported. This is the maximum length
267 // Current focus areas.
270 // KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas
271 // first. If the value is 0, focus area is not supported.
273 // Each focus area is a five-element int array. The first four elements are
279 // point. The width and height of focus areas cannot be 0 or negative.
285 // focusing than the larger area. Focus areas can partially overlap and the
[all …]
/aosp_15_r20/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DConnectionServiceFocusManagerTest.java85 // GIVEN the ConnectionServiceFocusManager without focus ConnectionService. in testRequestFocusWithoutActiveFocusExisted()
87 // WHEN request calling focus for the given call. in testRequestFocusWithoutActiveFocusExisted()
90 // THEN the request is done and the ConnectionService of the given call has gain the focus. in testRequestFocusWithoutActiveFocusExisted()
97 // GIVEN the ConnectionServiceFocusManager with the focus ConnectionService. in testRequestFocusWithActiveFocusExisted()
102 // WHEN request calling focus for the given call. in testRequestFocusWithActiveFocusExisted()
105 // THEN the current focus ConnectionService is informed it has lose the focus. in testRequestFocusWithActiveFocusExisted()
107 // and the focus request is not done. in testRequestFocusWithActiveFocusExisted()
111 // WHEN the current focus released the call resource. in testRequestFocusWithActiveFocusExisted()
115 // THEN the request is done and the ConnectionService of the given call has gain the focus. in testRequestFocusWithActiveFocusExisted()
118 // and the timeout event of the focus released is canceled. in testRequestFocusWithActiveFocusExisted()
[all …]
/aosp_15_r20/packages/apps/Camera2/src/com/android/camera/
DFocusOverlayManager.java35 import com.android.camera.ui.focus.CameraCoordinateTransformer;
36 import com.android.camera.ui.focus.FocusRing;
45 /* A class that handles everything about focus in still picture mode.
46 * This also handles the metering area because it is the same as focus area.
60 * (8) The camera has autofocus and supports focus area. Touch the screen to
62 * (9) The camera has autofocus and supports focus area. Touch the screen to
79 private static final int STATE_IDLE = 0; // Focus is not active.
80 private static final int STATE_FOCUSING = 1; // Focus is in progress.
81 // Focus is in progress and the camera should take a picture after focus finishes.
83 private static final int STATE_SUCCESS = 3; // Focus finishes and succeeds.
[all …]
/aosp_15_r20/packages/services/Car/tests/OemCarServiceTestApp/src/com/android/car/oem/focus/
DFocusInteraction.java17 package com.android.car.oem.focus;
47 * FocusInteraction is responsible for evaluating how incoming focus requests should be handled
49 * in relation to a {@link AudioAttributes} that is currently holding focus.
55 // Values for the internal interaction matrix we use to make focus decisions
56 private static final int INTERACTION_INVALID = -2; // Focus not granted
58 * Value for the interaction matrix for rejecting incoming focus request. Focus not granted.
62 * Value for the interaction matrix for granting exclusive access to incoming focus request.
63 * Focus granted, others lose focus
67 * Value for the interaction matrix for concurrent focus, incoming focus request and current
68 * focus holders will concurrently hold focus. Focus granted, others keep focus.
[all …]
/aosp_15_r20/packages/apps/LegacyCamera/src/com/android/camera/
DFocusManager.java41 // A class that handles everything about focus in still picture mode.
42 // This also handles the metering area because it is the same as focus area.
51 private static final int STATE_IDLE = 0; // Focus is not active.
52 private static final int STATE_FOCUSING = 1; // Focus is in progress.
53 // Focus is in progress and the camera should take a picture after focus finishes.
55 private static final int STATE_SUCCESS = 3; // Focus finishes and succeeds.
56 private static final int STATE_FAIL = 4; // Focus finishes and fails.
67 private List<Area> mFocusArea; // focus area in driver format
130 // coordinates. In tap focus, the inverted matrix converts the UI in initialize()
151 // Do not focus if touch focus has been triggered. in onShutterDown()
[all …]
/aosp_15_r20/packages/apps/Car/RotaryController/src/com/android/car/rotary/
DNavigator.java150 * @param sourceNode the current focus
153 * @param rotationCount the number of "ticks" to rotate. Only count nodes that can take focus
158 * {@code direction} from the current focus within the same {@link FocusArea}. If the
160 * or last view is returned. However, if there are no views that can take focus in the
187 // 1. it's in the same focus area, in findRotateTarget()
189 // one focus area in the window, including when the root node is treated as a focus in findRotateTarget()
198 // 1. it can't perform focus action (focusSearch() may return a node with zero in findRotateTarget()
201 // scrollable, or its descendants can take focus). in findRotateTarget()
202 // When we want to focus on its element directly, we'll skip the container. When in findRotateTarget()
203 // we want to focus on container and scroll it, we won't skip the container. in findRotateTarget()
[all …]
DRotaryService.java133 * A service that can change focus based on rotary controller rotation and nudges, and perform
140 * moving the focus, sometimes within a window and sometimes between windows.
144 * former is used to keep {@link #mFocusedNode} up to date as the focus changes. The latter is used
151 * {@link KeyEvent}s are handled by clicking the view, or moving the focus, sometimes within a
154 * {@link RotaryEvent}s are handled by moving the focus within the same {@link
289 * The node being edited by the IME, if any. When focus moves to the IME, if it's moving from an
297 * The focus area that contains the {@link #mFocusedNode}. It's null if {@link #mFocusedNode} is
352 * HUN, nudging to this direction will focus on a node inside the HUN.
360 * direction will move focus to a node outside the HUN, while nudging to other directions
397 /** Focus the view before the focused view in Tab order in the scrollable container, if any. */
[all …]
/aosp_15_r20/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/camerafocus/
DFocusOverlayManager.java34 /* A class that handles everything about focus in still picture mode.
35 * This also handles the metering area because it is the same as focus area.
49 * (8) The camera has autofocus and supports focus area. Touch the screen to
51 * (9) The camera has autofocus and supports focus area. Touch the screen to
67 private static final int STATE_IDLE = 0; // Focus is not active.
68 private static final int STATE_FOCUSING = 1; // Focus is in progress.
69 // Focus is in progress and the camera should take a picture after focus finishes.
71 private static final int STATE_SUCCESS = 3; // Focus finishes and succeeds.
72 private static final int STATE_FAIL = 4; // Focus finishes and fails.
87 private List<Object> mFocusArea; // focus area in driver format
[all …]
/aosp_15_r20/packages/apps/Car/RotaryController/tests/unit/src/com/android/car/rotary/
DRotaryServiceTest.java245 // Move focus to the FocusParkingView. in testInitFocus_focusOnDefaultFocusView()
288 // be focused. To emulate this case, this test just moves focus to the FocusParkingView in testInitFocus_focusOnLastTouchedView()
332 // Move focus to the FocusParkingView and disable the default focus view. in testInitFocus_focusOnFirstFocusableView()
441 // Move focus to the FocusParkingView. in testOnRotaryEvents_withoutFocusedView()
451 // initialize the focus. in testOnRotaryEvents_withoutFocusedView()
498 // clockwise should move the focus from defaultFocus to button3. in testOnRotaryEvents_withFocusedView()
517 // Rotating the controller counterclockwise should move focus to defaultFocus. in testOnRotaryEvents_withFocusedView()
555 // Rotating the controller clockwise slowly should move the focus from defaultFocus to in testOnRotaryEvents_acceleration()
566 // Move focus back to defaultFocus. in testOnRotaryEvents_acceleration()
573 // Rotating the controller clockwise somewhat fast should move the focus from defaultFocus in testOnRotaryEvents_acceleration()
[all …]
/aosp_15_r20/packages/services/Car/car-lib/src/android/car/oem/
DOemCarAudioFocusService.java30 * Interface for Audio focus for OEM Service.
37 * Notifies of audio focus changes in car focus stack. It is one way call for OEM Service.
43 * Call to evaluate a focus request, the request contains the information to make a decision.
45 * @param request current request containing the focus entry that triggered the current focus
46 * evaluation, the current focus holders, and current focus losers (focus requests that have
47 * transiently lost focus but can gain it again).
49 * @return the result of the focus request
53 * re-evaluated when any of the current focus holders abandons focus. For failed request,
54 * the car audio focus stack will not change and the current request will not gain focus.
56 * <p>Note: For the new focus losers and new blocked focus entries the focus loss can be
[all …]
/aosp_15_r20/cts/tests/framework/base/windowmanager/src/android/server/wm/input/
H A DWindowFocusTests.java86 * Ensure window focus assignment is executed as expected.
151 * - The window which lost top-focus can receive display-unspecified cancel events.
170 // After launching the second activity the primary activities focus depends on the state of in testKeyReceiving()
171 // perDisplayFocusEnabled. If the display has its own focus, then the activities still has in testKeyReceiving()
172 // window focus. If it is disabled, then primary activity should no longer have window focus in testKeyReceiving()
187 // not top focused if per-display focus is enabled. Otherwise, assert all non-released in testKeyReceiving()
204 // This test specifically tests the behavior if a single display manages its own focus. in testKeyReceivingWithDisplayWithOwnFocus()
217 // The secondary display and activity gained focus; the window on default display in testKeyReceivingWithDisplayWithOwnFocus()
218 // has no longer focus because the secondary display is also the top display. in testKeyReceivingWithDisplayWithOwnFocus()
226 // focused display.; the secondary ones did not lose window focus. in testKeyReceivingWithDisplayWithOwnFocus()
[all …]
/aosp_15_r20/external/chromium-trace/catapult/third_party/polymer/components/iron-menu-behavior/test/
H A Diron-menu-behavior.html166 test('first item gets focus when menu is focused', function(done) {
168 MockInteractions.focus(menu);
177 test('first item gets focus when menu is focused in a single item menu', function(done) {
179 MockInteractions.focus(menu);
188 test('selected item gets focus when menu is focused', function(done) {
191 MockInteractions.focus(menu);
202 MockInteractions.focus(menu);
203 // Wait for async focus
219 MockInteractions.focus(menu);
220 // Wait for async focus
[all …]
/aosp_15_r20/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
H A DCamera2Focuser.java37 * A focuser utility class to assist camera to do auto focus.
39 * This class need create repeating request and single request to do auto focus.
40 * The repeating request is used to get the auto focus states; the single
41 * request is used to trigger the auto focus. This class assumes the camera device
42 * supports auto-focus. Don't use this class if the camera device doesn't have focuser
65 * The callback interface to notify auto focus result.
69 * This callback is called when auto focus completes and locked.
71 * @param success true if focus was successful, false if otherwise
81 * request and receive focus state changes. The {@link AutoFocusListener} is
82 * used to notify the auto focus callback.
[all …]
/aosp_15_r20/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
H A DCamera2Focuser.java36 * A focuser utility class to assist camera to do auto focus.
38 * This class need create repeating request and single request to do auto focus.
39 * The repeating request is used to get the auto focus states; the single
40 * request is used to trigger the auto focus. This class assumes the camera device
41 * supports auto-focus. Don't use this class if the camera device doesn't have focuser
68 * The callback interface to notify auto focus result.
72 * This callback is called when auto focus completes and locked.
74 * @param success true if focus was successful, false if otherwise
84 * request and receive focus state changes. The {@link AutoFocusListener} is
85 * used to notify the auto focus callback.
[all …]
/aosp_15_r20/frameworks/base/core/tests/coretests/src/android/widget/focus/
H A DRequestFocusTest.java17 package android.widget.focus;
40 * have focus become invisible or GONE.
91 assertTrue("Focus should move to bottom left", mBottomLeftButton.hasFocus()); in testPostedRequestFocus()
108 * This tests checks the case in which the first focusable View clears focus.
109 * In such a case the framework tries to give the focus to another View starting
110 * from the top. Hence, the framework will try to give focus to the view that
111 * wants to clear its focus.
122 // Make sure that the clearing focus View is the first focusable. in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable()
125 assertSame("The clearing focus button is the first focusable.", in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable()
127 assertSame("The gaining focus button is the first focusable.", in testOnFocusChangeCallbackOrderWhenClearingFocusOfFirstFocusable()
[all …]
/aosp_15_r20/packages/services/Car/car-lib/src/android/car/
DCarAppFocusManager.java45 * CarAppFocusManager allows applications to set and listen for the current application focus
56 * Application focus has changed. Note that {@link CarAppFocusManager} instance
59 * <p>Note that this call can happen for app focus grant, release, and ownership change.
61 * @param appType appType where the focus change has happened.
62 * @param active {@code true} if there is an active owner for the focus.
72 * Lost ownership for the focus, which happens when other app has set the focus.
73 * The app losing focus should stop the action associated with the focus.
81 * Granted ownership for the focus, which happens when app has requested the focus.
82 * The app getting focus can start the action associated with the focus.
91 * Represents navigation focus.
[all …]

12345678910>>...172