Home
last modified time | relevance | path

Searched refs:Vote (Results 1 – 25 of 30) sorted by relevance

12

/frameworks/base/services/core/java/com/android/server/display/mode/
DVotesStorage.java49 private final SparseArray<SparseArray<Vote>> mVotesByDisplay = new SparseArray<>();
63 SparseArray<Vote> getVotes(int displayId) { in getVotes()
64 SparseArray<Vote> votesLocal; in getVotes()
65 SparseArray<Vote> globalVotesLocal; in getVotes()
67 SparseArray<Vote> displayVotes = mVotesByDisplay.get(displayId); in getVotes()
69 SparseArray<Vote> globalVotes = mVotesByDisplay.get(GLOBAL_ID); in getVotes()
82 void updateGlobalVote(@Vote.Priority int priority, @Nullable Vote vote) { in updateGlobalVote()
87 void updateVote(int displayId, @Vote.Priority int priority, @Nullable Vote vote) { in updateVote()
90 + ", priority=" + Vote.priorityToString(priority) in updateVote()
93 if (priority < Vote.MIN_PRIORITY || priority > Vote.MAX_PRIORITY) { in updateVote()
[all …]
DVotesStatsReporter.java41 private int mLastMinPriorityReported = Vote.MAX_PRIORITY + 1;
48 void reportVoteChanged(int displayId, int priority, @Nullable Vote vote) { in reportVoteChanged()
56 private void reportVoteAdded(int displayId, int priority, @NonNull Vote vote) { in reportVoteAdded()
59 TAG + "." + displayId + ":" + Vote.priorityToString(priority), maxRefreshRate); in reportVoteAdded()
70 TAG + "." + displayId + ":" + Vote.priorityToString(priority), -1); in reportVoteRemoved()
79 SparseArray<Vote> votes) { in reportVotesActivated()
84 for (int priority = Vote.MIN_PRIORITY; priority <= Vote.MAX_PRIORITY; priority++) { in reportVotesActivated()
88 Vote vote = votes.get(priority); in reportVotesActivated()
114 private static int getMaxRefreshRate(@NonNull Vote vote, boolean ignoreRenderRate) { in getMaxRefreshRate()
127 for (Vote subVote: combinedVote.mVotes) { in getMaxRefreshRate()
DVote.java29 interface Vote { interface
181 static Vote forPhysicalRefreshRates(float minRefreshRate, float maxRefreshRate) { in forPhysicalRefreshRates()
190 static Vote forRenderFrameRates(float minFrameRate, float maxFrameRate) { in forRenderFrameRates()
194 static Vote forSize(int width, int height) { in forSize()
198 static Vote forSizeAndPhysicalRefreshRatesRange(int minWidth, int minHeight, in forSizeAndPhysicalRefreshRatesRange()
209 static Vote forDisableRefreshRateSwitching() { in forDisableRefreshRateSwitching()
213 static Vote forBaseModeRefreshRate(float baseModeRefreshRate) { in forBaseModeRefreshRate()
217 static Vote forRequestedRefreshRate(float refreshRate) { in forRequestedRefreshRate()
221 static Vote forSupportedRefreshRates(List<SupportedModeData> supportedModes) { in forSupportedRefreshRates()
232 static Vote forSupportedModes(List<Integer> modeIds) { in forSupportedModes()
DDisplayModeDirector.java312 SparseArray<Vote> votes = mVotesStorage.getVotes(displayId); in getDesiredDisplayModeSpecs()
327 int lowestConsideredPriority = Vote.MIN_PRIORITY; in getDesiredDisplayModeSpecs()
328 int highestConsideredPriority = Vote.MAX_PRIORITY; in getDesiredDisplayModeSpecs()
331 lowestConsideredPriority = Vote.PRIORITY_APP_REQUEST_RENDER_FRAME_RATE_RANGE; in getDesiredDisplayModeSpecs()
332 highestConsideredPriority = Vote.PRIORITY_APP_REQUEST_SIZE; in getDesiredDisplayModeSpecs()
348 + Vote.priorityToString(lowestConsideredPriority) in getDesiredDisplayModeSpecs()
356 + Vote.priorityToString(lowestConsideredPriority) in getDesiredDisplayModeSpecs()
370 Vote.APP_REQUEST_REFRESH_RATE_RANGE_PRIORITY_CUTOFF, in getDesiredDisplayModeSpecs()
371 Vote.MAX_PRIORITY); in getDesiredDisplayModeSpecs()
546 Vote getVote(int displayId, int priority) { in getVote()
[all …]
DVoteSummary.java73 void applyVotes(SparseArray<Vote> votes, in applyVotes()
79 Vote vote = votes.get(priority); in applyVotes()
87 + Vote.priorityToString(lowestConsideredPriority) + ", " in applyVotes()
88 + Vote.priorityToString(highestConsideredPriority) + "]: " in applyVotes()
97 if (height == Vote.INVALID_SIZE || width == Vote.INVALID_SIZE) { in adjustSize()
362 width = Vote.INVALID_SIZE; in updateSummaryWithBestAllowedResolution()
363 height = Vote.INVALID_SIZE; in updateSummaryWithBestAllowedResolution()
391 width = Vote.INVALID_SIZE; in reset()
392 height = Vote.INVALID_SIZE; in reset()
DCombinedVote.java25 class CombinedVote implements Vote {
26 final List<Vote> mVotes;
28 CombinedVote(List<Vote> votes) { in CombinedVote()
DSkinThermalStatusObserver.java130 Vote.PRIORITY_SKIN_TEMPERATURE, null)); in onDisplayRemoved()
235 Vote vote = null; in reportThrottlingIfNeeded()
237 vote = Vote.forRenderFrameRates(foundRange.min, foundRange.max); in reportThrottlingIfNeeded()
239 mVotesStorage.updateVote(displayId, Vote.PRIORITY_SKIN_TEMPERATURE, vote); in reportThrottlingIfNeeded()
247 Vote vote = null; in fallbackReportThrottlingIfNeeded()
249 vote = Vote.forRenderFrameRates(0f, 60f); in fallbackReportThrottlingIfNeeded()
251 mVotesStorage.updateVote(displayId, Vote.PRIORITY_SKIN_TEMPERATURE, vote); in fallbackReportThrottlingIfNeeded()
DSizeVote.java23 class SizeVote implements Vote {
58 if (summary.width == Vote.INVALID_SIZE && summary.height == Vote.INVALID_SIZE) { in updateSummary()
DProximitySensorObserver.java84 Vote vote = null; in recalculateVotesLocked()
90 vote = Vote.forPhysicalRefreshRates(rate.min, rate.max); in recalculateVotesLocked()
93 mVotesStorage.updateVote(displayId, Vote.PRIORITY_PROXIMITY, vote); in recalculateVotesLocked()
DSystemRequestObserver.java136 mVotesStorage.updateVote(displayId, Vote.PRIORITY_SYSTEM_REQUESTED_MODES, in updateStorageLocked()
137 modesFound[0] ? Vote.forSupportedModes(modeIds) : null); in updateStorageLocked()
DRequestedRefreshRateVote.java23 class RequestedRefreshRateVote implements Vote {
DDisableRefreshRateSwitchingVote.java23 class DisableRefreshRateSwitchingVote implements Vote {
DBaseModeRefreshRateVote.java23 class BaseModeRefreshRateVote implements Vote {
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/mode/
DDisplayModeDirectorTest.java148 Vote.PRIORITY_APP_REQUEST_SIZE, in getAppRequestedSizeTestCases()
149 Vote.forSize(APP_MODE_HIGH_90.getPhysicalWidth(), in getAppRequestedSizeTestCases()
151 Vote.PRIORITY_APP_REQUEST_BASE_MODE_REFRESH_RATE, in getAppRequestedSizeTestCases()
152 Vote.forBaseModeRefreshRate(APP_MODE_HIGH_90.getRefreshRate()))}, in getAppRequestedSizeTestCases()
157 Vote.PRIORITY_APP_REQUEST_SIZE, in getAppRequestedSizeTestCases()
158 Vote.forSize(APP_MODE_HIGH_90.getPhysicalWidth(), in getAppRequestedSizeTestCases()
160 Vote.PRIORITY_APP_REQUEST_BASE_MODE_REFRESH_RATE, in getAppRequestedSizeTestCases()
161 Vote.forBaseModeRefreshRate(APP_MODE_HIGH_90.getRefreshRate()), in getAppRequestedSizeTestCases()
162 Vote.PRIORITY_LOW_POWER_MODE_RENDER_RATE, in getAppRequestedSizeTestCases()
163 Vote.forSize(LIMIT_MODE_70.getPhysicalWidth(), in getAppRequestedSizeTestCases()
[all …]
DVotesStorageTest.java41 private static final @Vote.Priority int PRIORITY = Vote.PRIORITY_APP_REQUEST_SIZE;
42 private static final Vote VOTE = Vote.forDisableRefreshRateSwitching();
44 private static final @Vote.Priority int PRIORITY_OTHER = Vote.PRIORITY_FLICKER_REFRESH_RATE;
45 private static final Vote VOTE_OTHER = Vote.forBaseModeRefreshRate(10f);
63 SparseArray<Vote> votes = mVotesStorage.getVotes(DISPLAY_ID); in addsVoteToStorage()
96 SparseArray<Vote> votes = mVotesStorage.getVotes(DISPLAY_ID); in addsAnotherVoteToStorageWithDifferentPriority()
110 SparseArray<Vote> votes = mVotesStorage.getVotes(DISPLAY_ID); in replacesVoteInStorageForSamePriority()
132 SparseArray<Vote> votes = mVotesStorage.getVotes(DISPLAY_ID); in addsGlobalDisplayVoteToStorage()
143 mVotesStorage.updateVote(DISPLAY_ID, Vote.MIN_PRIORITY - 1, VOTE); in ignoresVotesWithLowerThanMinPriority()
152 mVotesStorage.updateVote(DISPLAY_ID, Vote.MAX_PRIORITY + 1, VOTE); in ignoresVotesWithGreaterThanMaxPriority()
[all …]
DBrightnessObserverTest.kt92 Vote.PRIORITY_FLICKER_REFRESH_RATE)).isEqualTo(testCase.expectedRefreshRateVote) in testLowLightBlockingZoneVotes()
94 Vote.PRIORITY_FLICKER_REFRESH_RATE_SWITCH)).isEqualTo(testCase.expectedSwitchVote) in testLowLightBlockingZoneVotes()
115 internal val expectedRefreshRateVote: Vote,
116 internal val expectedSwitchVote: Vote?,
123 Vote.forPhysicalRefreshRates(60f, 60f), DisableRefreshRateSwitchingVote(true)),
125 Vote.forPhysicalRefreshRates(50f, 50f), DisableRefreshRateSwitchingVote(true)),
127 Vote.forPhysicalRefreshRates(40f, 40f), DisableRefreshRateSwitchingVote(true)),
DSkinThermalStatusObserverTest.java104 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID); in testNotifyWithDefaultVotesForCritical()
107 Vote vote = displayVotes.get(Vote.PRIORITY_SKIN_TEMPERATURE); in testNotifyWithDefaultVotesForCritical()
114 SparseArray<Vote> otherDisplayVotes = mStorage.getVotes(DISPLAY_ID_OTHER); in testNotifyWithDefaultVotesForCritical()
117 vote = otherDisplayVotes.get(Vote.PRIORITY_SKIN_TEMPERATURE); in testNotifyWithDefaultVotesForCritical()
173 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID); in testNotifiesWithConfigVotes()
175 Vote vote = displayVotes.get(Vote.PRIORITY_SKIN_TEMPERATURE); in testNotifiesWithConfigVotes()
196 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID_ADDED); in testDisplayAdded()
198 Vote vote = displayVotes.get(Vote.PRIORITY_SKIN_TEMPERATURE); in testDisplayAdded()
DAppRequestObserverTest.kt80 Vote.PRIORITY_APP_REQUEST_BASE_MODE_REFRESH_RATE) in test app request votes()
84 Vote.PRIORITY_APP_REQUEST_SIZE) in test app request votes()
88 Vote.PRIORITY_APP_REQUEST_RENDER_FRAME_RATE_RANGE) in test app request votes()
98 internal val expectedBaseModeVote: Vote?,
99 internal val expectedSizeVote: Vote?,
100 internal val expectedRenderRateVote: Vote?,
DProximitySensorObserverTest.java73 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID); in testAddsProximityVoteIfSensorManagerProximityActive()
75 Vote vote = displayVotes.get(Vote.PRIORITY_PROXIMITY); in testAddsProximityVoteIfSensorManagerProximityActive()
89 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID); in testDoesNotAddProximityVoteIfSensorManagerProximityNotActive()
99 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID); in testDoesNotAddProximityVoteIfDoze()
DSizeVoteTest.kt44 summary.width = Vote.INVALID_SIZE in updates size if width and height not set and display resolution voting disabled()
45 summary.height = Vote.INVALID_SIZE in updates size if width and height not set and display resolution voting disabled()
61 summary.height = Vote.INVALID_SIZE in does not update size if width set and display resolution voting disabled()
68 assertThat(summary.height).isEqualTo(Vote.INVALID_SIZE) in does not update size if width set and display resolution voting disabled()
76 summary.width = Vote.INVALID_SIZE in does not update size if height set and display resolution voting disabled()
83 assertThat(summary.width).isEqualTo(Vote.INVALID_SIZE) in does not update size if height set and display resolution voting disabled()
DCombinedVoteTest.kt39 private val mockVote1 = mock<Vote>()
40 private val mockVote2 = mock<Vote>()
DDisplayObserverTest.java24 import static com.android.server.display.mode.Vote.PRIORITY_LIMIT_MODE;
25 import static com.android.server.display.mode.Vote.PRIORITY_SYNCHRONIZED_REFRESH_RATE;
26 import static com.android.server.display.mode.Vote.PRIORITY_USER_SETTING_DISPLAY_PREFERRED_SIZE;
193 var expectedVote = Vote.forSize( in testExternalDisplay_voteUserPreferredMode()
214 expectedVote = Vote.forSize( in testExternalDisplay_voteUserPreferredMode()
245 var expectedResolutionVote = Vote.forSize(preferredMode.getPhysicalWidth(), in testExternalDisplay_doNotApplyLimitToUserPreferredMode()
277 var expectedResolutionVote = Vote.forSize(preferredMode.getPhysicalWidth(), in testDefaultDisplayAdded_notAppliedLimitToUserPreferredMode()
325 Vote.forSizeAndPhysicalRefreshRatesRange(0, 0, in testExternalDisplayAdded_applyResolutionRefreshRateLimit()
365 Vote.forPhysicalRefreshRates( in testExternalDisplayAdded_appliedRefreshRatesSynchronization()
459 private Vote getVote(final int displayId, final int priority) { in getVote()
DSettingsObserverTest.kt75 private val LOW_POWER_GLOBAL_VOTE = Vote.forRenderFrameRates(0f, 60f)
126 Vote.PRIORITY_LOW_POWER_MODE_RENDER_RATE)).isEqualTo(testCase.globalVote) in test low power mode()
128 Vote.PRIORITY_LOW_POWER_MODE_MODES)).isEqualTo(testCase.displayVote) in test low power mode()
135 internal val globalVote: Vote?,
136 internal val displayVote: Vote?
DSystemRequestObserverTest.kt62 val vote = votes.get(Vote.PRIORITY_SYSTEM_REQUESTED_MODES) in requestDisplayModes adds vote to storage()
82 val vote = votes.get(Vote.PRIORITY_SYSTEM_REQUESTED_MODES) in requestDisplayModes overrides votes in storage()
180 val vote = votes.get(Vote.PRIORITY_SYSTEM_REQUESTED_MODES) in requestDisplayModes subset modes from different tokens()
204 val vote = votes.get(Vote.PRIORITY_SYSTEM_REQUESTED_MODES) in recalculates vote if one binder dies()
/frameworks/proto_logging/stats/atoms/display/
Ddisplay_extension_atoms.proto36 // Vote priority numeric value, see com.android.server.display.mode.Vote
38 // Vote status
40 // Vote value, max refresh rate for now

12