/frameworks/base/services/tests/servicestests/src/com/android/server/power/ |
D | ThermalManagerServiceTest.java | 49 import android.os.Temperature; 104 private static final int INIT_STATUS = Temperature.THROTTLING_NONE; 105 private ArrayList<Temperature> mTemperatureList = new ArrayList<>(); 109 private Temperature mSkin1 = new Temperature(0, Temperature.TYPE_SKIN, "skin1", 111 private Temperature mSkin2 = new Temperature(0, Temperature.TYPE_SKIN, "skin2", 113 private Temperature mBattery = new Temperature(0, Temperature.TYPE_BATTERY, "batt", 115 private Temperature mUsbPort = new Temperature(0, Temperature.TYPE_USB_PORT, "usbport", 124 skinThreshold.type = Temperature.TYPE_SKIN; in initializeThresholds() 135 cpuThreshold.type = Temperature.TYPE_CPU; in initializeThresholds() 161 protected List<Temperature> getCurrentTemperatures(boolean shouldFilter, int type) { in getCurrentTemperatures() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/power/ |
D | ThermalManagerServiceMockingTest.java | 33 import android.os.Temperature; 51 private CompletableFuture<Temperature> mTemperatureFuture; 72 android.hardware.thermal.Temperature halT = in setCallback_aidl() 73 new android.hardware.thermal.Temperature(); in setCallback_aidl() 79 Temperature temperature = mTemperatureFuture.get(100, TimeUnit.MILLISECONDS); in setCallback_aidl() 102 android.hardware.thermal.Temperature halT1 = new android.hardware.thermal.Temperature(); in verifyWrapperStatusOnCallbackError() 106 new android.hardware.thermal.Temperature[]{ in verifyWrapperStatusOnCallbackError() 109 List<Temperature> ret = mAidlWrapper.getCurrentTemperatures(true, TemperatureType.MODEM); in verifyWrapperStatusOnCallbackError() 113 Temperature expectedT1 = new Temperature(halT1.value, halT1.type, halT1.name, in verifyWrapperStatusOnCallbackError() 115 List<Temperature> expectedRet = List.of(expectedT1); in verifyWrapperStatusOnCallbackError() [all …]
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | ThermalManagerService.java | 56 import android.os.Temperature; 124 private ArrayMap<String, Temperature> mTemperatureMap = new ArrayMap<>(); 150 mStatus = Temperature.THROTTLING_NONE; in ThermalManagerService() 192 List<Temperature> temperatures = mHalWrapper.getCurrentTemperatures(false, in onActivityManagerReady() 234 int newStatus = Temperature.THROTTLING_NONE; in onTemperatureMapChangedLocked() 237 Temperature t = mTemperatureMap.valueAt(i); in onTemperatureMapChangedLocked() 238 if (t.getType() == Temperature.TYPE_SKIN && t.getStatus() >= newStatus) { in onTemperatureMapChangedLocked() 266 private void postEventListener(Temperature temperature, in postEventListener() 285 private void notifyEventListenersLocked(Temperature temperature) { in notifyEventListenersLocked() 302 private void shutdownIfNeeded(Temperature temperature) { in shutdownIfNeeded() [all …]
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/ |
D | BrightnessThermalClamperTest.java | 30 import android.os.Temperature; 96 {List.of(), Temperature.THROTTLING_LIGHT, false, PowerManager.BRIGHTNESS_MAX}, in testThrottlingData() 101 Temperature.THROTTLING_LIGHT, false, PowerManager.BRIGHTNESS_MAX}, in testThrottlingData() 106 Temperature.THROTTLING_MODERATE, true, 0.5f}, in testThrottlingData() 111 Temperature.THROTTLING_SEVERE, true, 0.5f}, in testThrottlingData() 116 Temperature.THROTTLING_CRITICAL, true, 0.1f}, in testThrottlingData() 121 Temperature.THROTTLING_EMERGENCY, true, 0.1f}, in testThrottlingData() 127 @Temperature.ThrottlingStatus int throttlingStatus, in testNotifyThrottlingAfterOnDisplayChange() 144 @Temperature.ThrottlingStatus int throttlingStatus, in testOnDisplayChangeAfterNotifyThrottling() 161 thermalEventListener.notifyThrottling(createSkinTemperature(Temperature.THROTTLING_SEVERE)); in testOverrideData() [all …]
|
D | BrightnessPowerClamperTest.java | 26 import android.os.Temperature; 83 mPmicMonitor.setThermalStatus(Temperature.THROTTLING_SEVERE); in testPowerThrottlingNoOngoingAnimation() 99 mPmicMonitor.setThermalStatus(Temperature.THROTTLING_CRITICAL); in testPowerThrottlingNoOngoingAnimation() 112 mPmicMonitor.setThermalStatus(Temperature.THROTTLING_SEVERE); in testPowerThrottlingWithOngoingAnimation() 127 mPmicMonitor.setThermalStatus(Temperature.THROTTLING_CRITICAL); in testPowerThrottlingWithOngoingAnimation() 140 mPmicMonitor.setThermalStatus(Temperature.THROTTLING_LIGHT); in testPowerThrottlingRemoveBrightnessCap() 156 mPmicMonitor.setThermalStatus(Temperature.THROTTLING_NONE); in testPowerThrottlingRemoveBrightnessCap() 171 private Temperature mCurrentTemperature; 181 public void setThermalStatus(@Temperature.ThrottlingStatus int status) { in setThermalStatus() 182 mCurrentTemperature = new Temperature(100, Temperature.TYPE_SKIN, "test_temp", status); in setThermalStatus()
|
/frameworks/native/libs/ftl/ |
D | enum_test.cpp | 97 enum Temperature : int { enum 106 static_assert(ftl::enum_begin_v<Temperature> == kFreezer); 107 static_assert(ftl::enum_last_v<Temperature> == kRoom); 108 static_assert(ftl::enum_size_v<Temperature> == 39); 152 EXPECT_EQ(ftl::enum_name(static_cast<Temperature>(-30)), std::nullopt); in TEST() 153 EXPECT_EQ(ftl::enum_name(static_cast<Temperature>(0)), std::nullopt); in TEST() 154 EXPECT_EQ(ftl::enum_name(static_cast<Temperature>(100)), std::nullopt); in TEST() 156 EXPECT_EQ(ftl::enum_name_full(static_cast<Temperature>(-30)), std::nullopt); in TEST() 157 EXPECT_EQ(ftl::enum_name_full(static_cast<Temperature>(0)), std::nullopt); in TEST() 158 EXPECT_EQ(ftl::enum_name_full(static_cast<Temperature>(100)), std::nullopt); in TEST() [all …]
|
/frameworks/base/core/java/android/os/ |
D | Temperature.java | 35 public final class Temperature implements Parcelable { class 135 public Temperature(float value, @Type int type, in Temperature() method in Temperature 198 if (!(o instanceof Temperature)) { in equals() 201 Temperature other = (Temperature) o; in equals() 214 public static final @android.annotation.NonNull Parcelable.Creator<Temperature> CREATOR = 215 new Parcelable.Creator<Temperature>() { 217 public Temperature createFromParcel(Parcel p) { 222 return new Temperature(value, type, name, status); 226 public Temperature[] newArray(int size) { 227 return new Temperature[size];
|
D | IThermalService.aidl | 22 import android.os.Temperature; 59 Temperature[] getCurrentTemperatures(); in getCurrentTemperatures() 67 Temperature[] getCurrentTemperaturesWithType(in int type); in getCurrentTemperaturesWithType()
|
D | IThermalEventListener.aidl | 19 import android.os.Temperature; 30 void notifyThrottling(in Temperature temperature); in notifyThrottling()
|
D | Temperature.aidl | 19 parcelable Temperature cpp_header "android/Temperature.h";
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/ |
D | ExternalDisplayPolicyTest.java | 38 import android.os.Temperature; 71 private static final Temperature MODERATE_TEMPERATURE = new Temperature(/*value=*/ 40.5f, 72 /*type=*/ Temperature.TYPE_SKIN, 74 /*status=*/ Temperature.THROTTLING_MODERATE); 75 private static final Temperature SEVERE_TEMPERATURE = new Temperature(/*value=*/ 50.5f, 76 /*type=*/ Temperature.TYPE_SKIN, 78 /*status=*/ Temperature.THROTTLING_SEVERE); 79 private static final Temperature CRITICAL_TEMPERATURE = new Temperature(/*value=*/ 70.5f, 80 /*type=*/ Temperature.TYPE_SKIN, 82 /*status=*/ Temperature.THROTTLING_CRITICAL); [all …]
|
D | BrightnessThrottlerTest.java | 35 import android.os.Temperature; 36 import android.os.Temperature.ThrottlingStatus; 173 mThermalEventListenerCaptor.capture(), eq(Temperature.TYPE_SKIN)); in testThermalThrottlingSingleLevel() 231 mThermalEventListenerCaptor.capture(), eq(Temperature.TYPE_SKIN)); in testThermalThrottlingMultiLevel() 311 mThermalEventListenerCaptor.capture(), eq(Temperature.TYPE_DISPLAY)); in testThermalThrottlingWithDisplaySensor() 356 mThermalEventListenerCaptor.capture(), eq(Temperature.TYPE_SKIN)); in testUpdateThermalThrottlingData() 382 mThermalEventListenerCaptor.capture(), eq(Temperature.TYPE_SKIN)); in testInvalidThrottlingStrings() 464 mThermalEventListenerCaptor.capture(), eq(Temperature.TYPE_SKIN)); in testMultipleConfigPoints() 545 private Temperature getSkinTemp(@ThrottlingStatus int status) { in getSkinTemp() 546 return new Temperature(30.0f, Temperature.TYPE_SKIN, "test_skin_temp", status); in getSkinTemp() [all …]
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/ |
D | BridgeThermalService.java | 24 import android.os.Temperature; 55 public Temperature[] getCurrentTemperatures() { in getCurrentTemperatures() 56 return new Temperature[0]; in getCurrentTemperatures() 60 public Temperature[] getCurrentTemperaturesWithType(int type) { in getCurrentTemperaturesWithType() 61 return new Temperature[0]; in getCurrentTemperaturesWithType()
|
/frameworks/base/services/core/java/com/android/server/display/mode/ |
D | SkinThermalStatusObserver.java | 23 import android.os.Temperature; 48 @Temperature.ThrottlingStatus 49 private int mStatus = Temperature.THROTTLING_NONE; 69 @Temperature.ThrottlingStatus int currentStatus, in findBestMatchingRefreshRateRange() 99 public void notifyThrottling(Temperature temp) { in notifyThrottling() 100 @Temperature.ThrottlingStatus int currentStatus = temp.getStatus(); in notifyThrottling() 185 @Temperature.ThrottlingStatus int localStatus; in updateVotes() 202 @Temperature.ThrottlingStatus int localStatus; in updateVoteForDisplay() 221 @Temperature.ThrottlingStatus int currentStatus, in reportThrottlingIfNeeded() 246 @Temperature.ThrottlingStatus int currentStatus) { in fallbackReportThrottlingIfNeeded() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/ |
D | PowerUITest.java | 37 import android.os.Temperature; 120 final Temperature temp = getCriticalStatusTemp(Temperature.TYPE_SKIN, "skin1"); in testSkinWarning_throttlingCritical() 133 final Temperature temp = getEmergencyStatusTemp(Temperature.TYPE_SKIN, "skin2"); in testSkinWarning_throttlingEmergency() 151 final Temperature temp = getEmergencyStatusTemp(Temperature.TYPE_SKIN, "skin2"); in testSkinWarning_throttlingEmergency_butVrMode() 163 final Temperature temp = getCriticalStatusTemp(Temperature.TYPE_USB_PORT, "usb1"); in testUsbAlarm_throttlingCritical() 175 final Temperature temp = getEmergencyStatusTemp(Temperature.TYPE_USB_PORT, "usb2"); in testUsbAlarm_throttlingEmergency() 193 .registerThermalEventListenerWithType(anyObject(), eq(Temperature.TYPE_SKIN)); in testSettingOverrideConfig_enableSkinTemperatureWarning() 206 .registerThermalEventListenerWithType(anyObject(), eq(Temperature.TYPE_USB_PORT)); in testSettingOverrideConfig_enableUsbTemperatureAlarm() 219 .registerThermalEventListenerWithType(anyObject(), eq(Temperature.TYPE_SKIN)); in testSettingOverrideConfig_disableSkinTemperatureWarning() 232 .registerThermalEventListenerWithType(anyObject(), eq(Temperature.TYPE_USB_PORT)); in testSettingOverrideConfig_disableUsbTemperatureAlarm() [all …]
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/mode/ |
D | SkinThermalStatusObserverTest.java | 28 import android.os.Temperature; 100 mObserver.notifyThrottling(createTemperature(Temperature.THROTTLING_CRITICAL)); in testNotifyWithDefaultVotesForCritical() 130 mObserver.notifyThrottling(createTemperature(Temperature.THROTTLING_CRITICAL)); in testNotifyWithDefaultVotesChangeFromCriticalToSevere() 132 mObserver.notifyThrottling(createTemperature(Temperature.THROTTLING_SEVERE)); in testNotifyWithDefaultVotesChangeFromCriticalToSevere() 146 mObserver.notifyThrottling(createTemperature(Temperature.THROTTLING_SEVERE)); in testNotifyWithDefaultVotesForSevere() 157 displayConfig.put(Temperature.THROTTLING_MODERATE, in testNotifiesWithConfigVotes() 168 mObserver.notifyThrottling(createTemperature(Temperature.THROTTLING_SEVERE)); in testNotifiesWithConfigVotes() 187 mObserver.notifyThrottling(createTemperature(Temperature.THROTTLING_CRITICAL)); in testDisplayAdded() 209 mObserver.notifyThrottling(createTemperature(Temperature.THROTTLING_CRITICAL)); in testDisplayAddedAndThenImmediatelyRemoved() 220 private static Temperature createTemperature(@Temperature.ThrottlingStatus int status) { in createTemperature() [all …]
|
/frameworks/base/services/core/java/com/android/server/display/brightness/clamper/ |
D | PmicMonitor.java | 30 import android.os.Temperature; 62 private Temperature mCurrentTemperature; 76 private Temperature getDisplayTemperature() { in getDisplayTemperature() 77 Temperature retTemperature = null; in getDisplayTemperature() 79 Temperature[] temperatures; in getDisplayTemperature() 82 Temperature.TYPE_SKIN); in getDisplayTemperature() 143 Temperature displayTemperature = getDisplayTemperature(); in capturePeriodicDisplayPower()
|
D | BrightnessThermalClamper.java | 31 import android.os.Temperature; 74 @Temperature.ThrottlingStatus 75 private int mThrottlingStatus = Temperature.THROTTLING_NONE; 201 private void thermalStatusChanged(@Temperature.ThrottlingStatus int status) { in thermalStatusChanged() 257 public void notifyThrottling(Temperature temp) { in notifyThrottling() 267 @Temperature.ThrottlingStatus int status = temp.getStatus(); in notifyThrottling()
|
D | BrightnessPowerClamper.java | 26 import android.os.Temperature; 69 private @Temperature.ThrottlingStatus int mCurrentThermalLevel = Temperature.THROTTLING_NONE; 219 private float getPowerQuotaForThermalStatus(@Temperature.ThrottlingStatus int thermalStatus) { in getPowerQuotaForThermalStatus() 277 void onChanged(float avgPowerConsumed, @Temperature.ThrottlingStatus int thermalStatus); in onChanged()
|
/frameworks/base/services/core/java/com/android/server/display/utils/ |
D | SensorUtils.java | 23 import android.os.Temperature; 80 return Temperature.TYPE_DISPLAY; in getSensorTemperatureType() 82 return Temperature.TYPE_SKIN; in getSensorTemperatureType()
|
/frameworks/native/services/powermanager/include/android/ |
D | Temperature.h | 29 struct Temperature : public android::Parcelable { struct 39 Temperature() in Temperature() function
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | ExternalDisplayPolicy.java | 20 import static android.os.Temperature.THROTTLING_CRITICAL; 21 import static android.os.Temperature.THROTTLING_NONE; 34 import android.os.Temperature; 35 import android.os.Temperature.ThrottlingStatus; 361 thermalService.registerThermalEventListenerWithType(listener, Temperature.TYPE_SKIN); in registerThermalServiceListener() 380 public void notifyThrottling(@NonNull final Temperature temp) { in notifyThrottling()
|
/frameworks/native/services/powermanager/ |
D | Temperature.cpp | 26 status_t Temperature::readFromParcel(const android::Parcel *parcel) { in readFromParcel() 40 status_t Temperature::writeToParcel(android::Parcel *parcel) const { in writeToParcel()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | ActivityMetricsLaunchObserver.java | 94 @interface Temperature {} annotation in ActivityMetricsLaunchObserver 148 public void onActivityLaunched(long id, ComponentName name, @Temperature int temperature, in onActivityLaunched()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/ |
D | PowerUI.java | 35 import android.os.Temperature; 571 mSkinThermalEventListener, Temperature.TYPE_SKIN); in doSkinThermalEventListenerRegistration() 606 mUsbThermalEventListener, Temperature.TYPE_USB_PORT); in doUsbThermalEventListenerRegistration() 742 @Override public void notifyThrottling(Temperature temp) { in notifyThrottling() 745 if (status >= Temperature.THROTTLING_EMERGENCY) { in notifyThrottling() 761 @Override public void notifyThrottling(Temperature temp) { in notifyThrottling() 764 if (status >= Temperature.THROTTLING_EMERGENCY) { in notifyThrottling()
|