Search in sources :

Example 1 with PhoneStatusBar

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);
}
Also used : PhoneStatusBar(com.android.systemui.statusbar.phone.PhoneStatusBar)

Example 2 with PhoneStatusBar

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);
}
Also used : PhoneStatusBar(com.android.systemui.statusbar.phone.PhoneStatusBar)

Example 3 with PhoneStatusBar

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);
    }
}
Also used : SystemUIApplication(com.android.systemui.SystemUIApplication) PhoneStatusBar(com.android.systemui.statusbar.phone.PhoneStatusBar)

Example 4 with PhoneStatusBar

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);
}
Also used : PhoneStatusBar(com.android.systemui.statusbar.phone.PhoneStatusBar)

Example 5 with PhoneStatusBar

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);
    }
}
Also used : SystemUIApplication(com.android.systemui.SystemUIApplication) PhoneStatusBar(com.android.systemui.statusbar.phone.PhoneStatusBar)

Aggregations

PhoneStatusBar (com.android.systemui.statusbar.phone.PhoneStatusBar)9 SystemUIApplication (com.android.systemui.SystemUIApplication)5