use of com.android.systemui.statusbar.phone.PhoneStatusBar in project android_frameworks_base by ResurrectionRemix.
the class PowerUI method updateTemperatureWarning.
private void updateTemperatureWarning() {
float[] temps = mHardwarePropertiesManager.getDeviceTemperatures(HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN, HardwarePropertiesManager.TEMPERATURE_CURRENT);
if (temps.length != 0) {
float temp = temps[0];
mRecentTemps[mNumTemps++] = temp;
PhoneStatusBar phoneStatusBar = getComponent(PhoneStatusBar.class);
if (phoneStatusBar != null && !phoneStatusBar.isDeviceInVrMode() && temp >= mThresholdTemp) {
logAtTemperatureThreshold(temp);
mWarnings.showTemperatureWarning();
} else {
mWarnings.dismissTemperatureWarning();
}
}
logTemperatureStats();
mHandler.postDelayed(this::updateTemperatureWarning, TEMPERATURE_INTERVAL);
}
use of com.android.systemui.statusbar.phone.PhoneStatusBar in project android_frameworks_base by DirtyUnicorns.
the class PowerUI method updateTemperatureWarning.
private void updateTemperatureWarning() {
float[] temps = mHardwarePropertiesManager.getDeviceTemperatures(HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN, HardwarePropertiesManager.TEMPERATURE_CURRENT);
if (temps.length != 0) {
float temp = temps[0];
mRecentTemps[mNumTemps++] = temp;
PhoneStatusBar phoneStatusBar = getComponent(PhoneStatusBar.class);
if (phoneStatusBar != null && !phoneStatusBar.isDeviceInVrMode() && temp >= mThresholdTemp) {
logAtTemperatureThreshold(temp);
mWarnings.showTemperatureWarning();
} else {
mWarnings.dismissTemperatureWarning();
}
}
logTemperatureStats();
mHandler.postDelayed(this::updateTemperatureWarning, TEMPERATURE_INTERVAL);
}
use of com.android.systemui.statusbar.phone.PhoneStatusBar in project android_frameworks_base by DirtyUnicorns.
the class RecentsImpl method onStartScreenPinning.
/**
* This is only called from the system user's Recents. Secondary users will instead proxy their
* visibility change events through to the system user via
* {@link Recents#onBusEvent(ScreenPinningRequestEvent)}.
*/
public void onStartScreenPinning(Context context, int taskId) {
SystemUIApplication app = (SystemUIApplication) context;
PhoneStatusBar statusBar = app.getComponent(PhoneStatusBar.class);
if (statusBar != null) {
statusBar.showScreenPinningRequest(taskId, false);
}
}
use of com.android.systemui.statusbar.phone.PhoneStatusBar in project android_frameworks_base by AOSPA.
the class PowerUI method updateTemperatureWarning.
private void updateTemperatureWarning() {
float[] temps = mHardwarePropertiesManager.getDeviceTemperatures(HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN, HardwarePropertiesManager.TEMPERATURE_CURRENT);
if (temps.length != 0) {
float temp = temps[0];
mRecentTemps[mNumTemps++] = temp;
PhoneStatusBar phoneStatusBar = getComponent(PhoneStatusBar.class);
if (phoneStatusBar != null && !phoneStatusBar.isDeviceInVrMode() && temp >= mThresholdTemp) {
logAtTemperatureThreshold(temp);
mWarnings.showTemperatureWarning();
} else {
mWarnings.dismissTemperatureWarning();
}
}
logTemperatureStats();
mHandler.postDelayed(this::updateTemperatureWarning, TEMPERATURE_INTERVAL);
}
use of com.android.systemui.statusbar.phone.PhoneStatusBar in project android_frameworks_base by AOSPA.
the class RecentsImpl method onStartScreenPinning.
/**
* This is only called from the system user's Recents. Secondary users will instead proxy their
* visibility change events through to the system user via
* {@link Recents#onBusEvent(ScreenPinningRequestEvent)}.
*/
public void onStartScreenPinning(Context context, int taskId) {
SystemUIApplication app = (SystemUIApplication) context;
PhoneStatusBar statusBar = app.getComponent(PhoneStatusBar.class);
if (statusBar != null) {
statusBar.showScreenPinningRequest(taskId, false);
}
}
Aggregations