Home
last modified time | relevance | path

Searched refs:deviceState (Results 1 – 25 of 34) sorted by relevance

12

/aosp14/frameworks/base/services/core/java/com/android/server/audio/
H A DSpatializerHelper.java518 if (deviceState.isSAEnabled() && isSADevice(deviceState)) { in getCompatibleAudioDevices()
547 if (deviceState != null) { in addCompatibleAudioDevice()
615 if (deviceState != null && deviceState.isSAEnabled()) { in removeCompatibleAudioDevice()
651 if (deviceState == null) { in findSACompatibleDeviceStateForAudioDeviceAttributes()
659 return deviceState; in findSACompatibleDeviceStateForAudioDeviceAttributes()
682 if (deviceState == null) { in evaluateState()
777 if (deviceState == null) { in isAvailableForAdiDeviceState()
816 return deviceState.getDeviceType() == getCanonicalDeviceType(deviceState.getDeviceType(), in isSADevice()
1236 return deviceState != null && deviceState.hasHeadTracker(); in hasHeadTracker()
1250 if (deviceState != null) { in setHasHeadTracker()
[all …]
H A DAdiDeviceState.java223 final AdiDeviceState deviceState = new AdiDeviceState(deviceType, in fromPersistedString() local
225 deviceState.setSAEnabled(Integer.parseInt(fields[2]) == 1); in fromPersistedString()
226 deviceState.setHasHeadTracker(Integer.parseInt(fields[3]) == 1); in fromPersistedString()
227 deviceState.setHeadTrackerEnabled(Integer.parseInt(fields[4]) == 1); in fromPersistedString()
228 deviceState.setAudioDeviceCategory(audioDeviceCategory); in fromPersistedString()
229 return deviceState; in fromPersistedString()
H A DAudioDeviceInventory.java112 void addOrUpdateDeviceSAStateInInventory(AdiDeviceState deviceState) { in addOrUpdateDeviceSAStateInInventory() argument
114 mDeviceInventory.merge(deviceState.getDeviceId(), deviceState, (oldState, newState) -> { in addOrUpdateDeviceSAStateInInventory() local
148 void addOrUpdateAudioDeviceCategoryInInventory(AdiDeviceState deviceState) { in addOrUpdateAudioDeviceCategoryInInventory() argument
150 mDeviceInventory.merge(deviceState.getDeviceId(), deviceState, (oldState, newState) -> { in addOrUpdateAudioDeviceCategoryInInventory() local
170 AdiDeviceState deviceState = mDeviceInventory.get( in findBtDeviceStateForAddress() local
172 if (deviceState != null) { in findBtDeviceStateForAddress()
173 return deviceState; in findBtDeviceStateForAddress()
194 for (AdiDeviceState deviceState : mDeviceInventory.values()) { in findDeviceStateForAudioDeviceAttributes()
195 if (deviceState.getDeviceType() == canonicalDeviceType in findDeviceStateForAudioDeviceAttributes()
197 deviceState.getDeviceAddress()))) { in findDeviceStateForAudioDeviceAttributes()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/
H A DCachedDeviceStateServiceTest.java97 CachedDeviceState.Readonly deviceState = in correctlyReportsScreenInteractive() local
101 assertThat(deviceState.isScreenInteractive()).isFalse(); in correctlyReportsScreenInteractive()
105 assertThat(deviceState.isScreenInteractive()).isTrue(); in correctlyReportsScreenInteractive()
111 assertThat(deviceState.isScreenInteractive()).isTrue(); in correctlyReportsScreenInteractive()
120 CachedDeviceState.Readonly deviceState = in correctlyReportsCharging() local
124 assertThat(deviceState.isCharging()).isTrue(); in correctlyReportsCharging()
128 assertThat(deviceState.isCharging()).isFalse(); in correctlyReportsCharging()
133 assertThat(deviceState.isCharging()).isTrue(); in correctlyReportsCharging()
138 assertThat(deviceState.isCharging()).isFalse(); in correctlyReportsCharging()
147 CachedDeviceState.Readonly deviceState = in correctlyTracksTimeOnBattery() local
[all …]
/aosp14/frameworks/base/services/core/java/com/android/server/wm/
H A DDeviceStateController.java149 final DeviceState deviceState; in onDeviceStateReceivedByDisplayManager() local
151 deviceState = DeviceState.HALF_FOLDED; in onDeviceStateReceivedByDisplayManager()
153 deviceState = DeviceState.FOLDED; in onDeviceStateReceivedByDisplayManager()
155 deviceState = DeviceState.REAR; in onDeviceStateReceivedByDisplayManager()
157 deviceState = DeviceState.OPEN; in onDeviceStateReceivedByDisplayManager()
159 deviceState = DeviceState.CONCURRENT; in onDeviceStateReceivedByDisplayManager()
161 deviceState = DeviceState.UNKNOWN; in onDeviceStateReceivedByDisplayManager()
164 if (mCurrentDeviceState == null || !mCurrentDeviceState.equals(deviceState)) { in onDeviceStateReceivedByDisplayManager()
165 mCurrentDeviceState = deviceState; in onDeviceStateReceivedByDisplayManager()
176 entry.second.execute(() -> entry.first.accept(deviceState)); in onDeviceStateReceivedByDisplayManager()
H A DWindowManagerInternal.java378 public abstract void onDisplayManagerReceivedDeviceState(int deviceState); in onDisplayManagerReceivedDeviceState() argument
/aosp14/frameworks/base/core/java/android/hardware/camera2/params/
H A DDeviceStateSensorOrientationMap.java140 public int getSensorOrientation(@DeviceState long deviceState) { in getSensorOrientation() argument
141 if (!mDeviceStateOrientationMap.containsKey(deviceState)) { in getSensorOrientation()
142 throw new IllegalArgumentException("Invalid device state: " + deviceState); in getSensorOrientation()
145 return mDeviceStateOrientationMap.get(deviceState); in getSensorOrientation()
207 public @NonNull Builder addOrientationForState(@DeviceState long deviceState, long angle) { in addOrientationForState() argument
212 mDeviceStateOrientationMap.put(deviceState, Math.toIntExact(angle)); in addOrientationForState()
213 mElements.add(deviceState); in addOrientationForState()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DDeviceStateRotationLockSettingController.java104 int deviceState = mDeviceState; in onRotationLockStateChanged() local
106 .isRotationLocked(deviceState); in onRotationLockStateChanged()
107 mLogger.logRotationLockStateChanged(deviceState, newRotationLocked, currentRotationLocked); in onRotationLockStateChanged()
108 if (deviceState == -1) { in onRotationLockStateChanged()
118 int deviceState = mDeviceState; in saveNewRotationLockSetting() local
119 mLogger.logSaveNewRotationLockSetting(isRotationLocked, deviceState); in saveNewRotationLockSetting()
120 mDeviceStateRotationLockSettingsManager.updateSetting(deviceState, isRotationLocked); in saveNewRotationLockSetting()
H A DDevicePostureControllerImpl.java61 int deviceState; in DevicePostureControllerImpl() local
64 deviceState = Integer.parseInt(deviceStatePostureMapping[0]); in DevicePostureControllerImpl()
70 mDeviceStateToPostureMap.put(deviceState, posture); in DevicePostureControllerImpl()
/aosp14/frameworks/base/packages/SettingsLib/DeviceStateRotationLock/src/com.android.settingslib.devicestate/
H A DDeviceStateRotationLockSettingsManager.java137 public void updateSetting(int deviceState, boolean rotationLocked) { in updateSetting() argument
138 int posture = mPosturesHelper.deviceStateToPosture(deviceState); in updateSetting()
163 public int getRotationLockSetting(int deviceState) { in getRotationLockSetting() argument
164 int devicePosture = mPosturesHelper.deviceStateToPosture(deviceState); in getRotationLockSetting()
186 public boolean isRotationLocked(int deviceState) { in isRotationLocked() argument
187 return getRotationLockSetting(deviceState) == DEVICE_STATE_ROTATION_LOCK_LOCKED; in isRotationLocked()
331 Integer deviceState = mPosturesHelper.postureToDeviceState(posture); in loadDefaults() local
332 if (deviceState != null) { in loadDefaults()
333 mSettableDeviceStates.add(new SettableDeviceState(deviceState, isSettable)); in loadDefaults()
386 SettableDeviceState(int deviceState, boolean isSettable) { in SettableDeviceState() argument
[all …]
H A DPosturesHelper.kt41 fun deviceStateToPosture(deviceState: Int): Int {
42 return when (deviceState) {
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/assist/
H A DAssistLogger.kt54 val deviceState = if (legacyDeviceState == null) { regex
62 deviceState)
68 deviceState: Int? = null
75 val deviceStateFinal = deviceState
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/
H A DDevicePostureController.java94 int deviceState; in onInit() local
97 deviceState = Integer.parseInt(deviceStatePostureMapping[0]); in onInit()
103 mDeviceStateToPostureMap.put(deviceState, posture); in onInit()
/aosp14/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/common/
H A DDeviceStateManagerFoldingFeatureProducer.java118 int deviceState; in DeviceStateManagerFoldingFeatureProducer() local
121 deviceState = Integer.parseInt(deviceStatePostureMapping[0]); in DeviceStateManagerFoldingFeatureProducer()
132 mDeviceStateToPostureMap.put(deviceState, posture); in DeviceStateManagerFoldingFeatureProducer()
/aosp14/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/sidecar/
H A DSampleSidecarImpl.java76 SidecarDeviceState deviceState = new SidecarDeviceState(); in getDeviceState() local
77 deviceState.posture = deviceStateFromFeature(); in getDeviceState()
78 return deviceState; in getDeviceState()
/aosp14/frameworks/base/services/core/java/com/android/server/devicestate/
H A DDeviceStateManagerShellCommand.java169 Optional<DeviceState> deviceState = mService.getCommittedState(); in runPrintState() local
170 if (deviceState.isPresent()) { in runPrintState()
171 pw.println(deviceState.get().getIdentifier()); in runPrintState()
H A DDeviceStateManagerService.java783 final Optional<DeviceState> deviceState = getStateLocked(state); in requestStateInternal() local
784 if (!deviceState.isPresent()) { in requestStateInternal()
832 final Optional<DeviceState> deviceState = getStateLocked(state); in requestBaseStateOverrideInternal() local
833 if (!deviceState.isPresent()) { in requestBaseStateOverrideInternal()
1048 deviceState -> mFoldedDeviceStates.contains(deviceState.getIdentifier()) in isDeviceOpeningLocked()
1313 DeviceState deviceState = mDeviceStates.get(identifier); in shouldCancelOverrideRequestWhenRequesterNotOnTop() local
1314 return deviceState.hasFlag(DeviceState.FLAG_CANCEL_WHEN_REQUESTER_NOT_ON_TOP); in shouldCancelOverrideRequestWhenRequesterNotOnTop()
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/os/
H A DBinderCallsStatsPerfTest.java67 CachedDeviceState deviceState = new CachedDeviceState(false, false); in setUp() local
68 mBinderCallsStats.setDeviceState(deviceState.getReadonlyClient()); in setUp()
/aosp14/frameworks/base/core/java/com/android/internal/os/
H A DLooperStats.java67 public void setDeviceState(@NonNull CachedDeviceState.Readonly deviceState) { in setDeviceState() argument
72 mDeviceState = deviceState; in setDeviceState()
73 mBatteryStopwatch = deviceState.createTimeOnBatteryStopwatch(); in setDeviceState()
H A DBinderCallsStats.java191 public void setDeviceState(@NonNull CachedDeviceState.Readonly deviceState) { in setDeviceState() argument
195 mDeviceState = deviceState; in setDeviceState()
196 mBatteryStopwatch = deviceState.createTimeOnBatteryStopwatch(); in setDeviceState()
/aosp14/frameworks/base/services/core/java/com/android/server/policy/
H A DDeviceStateProviderImpl.java411 for (DeviceState deviceState : mOrderedStates) { in notifySupportedStatesChanged()
413 && deviceState.hasFlag( in notifySupportedStatesChanged()
417 if (mPowerSaveModeEnabled && deviceState.hasFlag( in notifySupportedStatesChanged()
421 supportedStates.add(deviceState); in notifySupportedStatesChanged()
/aosp14/frameworks/base/services/core/java/com/android/server/
H A DBinderCallsStatsService.java287 CachedDeviceState.Readonly deviceState = getLocalService( in onBootPhase() local
289 mBinderCallsStats.setDeviceState(deviceState); in onBootPhase()
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/os/
H A DLooperStatsTest.java548 TestableLooperStats(int samplingInterval, int sizeCap, CachedDeviceState deviceState) { in TestableLooperStats() argument
553 if (deviceState != null) { in TestableLooperStats()
554 setDeviceState(deviceState.getReadonlyClient()); in TestableLooperStats()
H A DBinderCallsStatsTest.java1052 TestBinderCallsStats(CachedDeviceState deviceState) { in TestBinderCallsStats() argument
1091 if (deviceState != null) { in TestBinderCallsStats()
1092 setDeviceState(deviceState.getReadonlyClient()); in TestBinderCallsStats()
/aosp14/frameworks/base/services/core/java/com/android/server/camera/
H A DCameraServiceProxy.java1079 private boolean notifyDeviceStateChangeLocked(@DeviceStateFlags int deviceState) { in notifyDeviceStateChangeLocked() argument
1088 mCameraServiceRaw.notifyDeviceStateChange(deviceState); in notifyDeviceStateChangeLocked()
1094 mLastReportedDeviceState = deviceState; in notifyDeviceStateChangeLocked()

12