FileDocCategorySizeDatePackage
DozeParameters.javaAPI DocAndroid 5.1 API7858Thu Mar 12 22:22:42 GMT 2015com.android.systemui.statusbar.phone

DozeParameters

public class DozeParameters extends Object

Fields Summary
private static final String
TAG
private static final boolean
DEBUG
private static final int
MAX_DURATION
private final android.content.Context
mContext
private static PulseSchedule
sPulseSchedule
Constructors Summary
public DozeParameters(android.content.Context context)


       
        mContext = context;
    
Methods Summary
public voiddump(java.io.PrintWriter pw)

        pw.println("  DozeParameters:");
        pw.print("    getDisplayStateSupported(): "); pw.println(getDisplayStateSupported());
        pw.print("    getPulseDuration(pickup=false): "); pw.println(getPulseDuration(false));
        pw.print("    getPulseDuration(pickup=true): "); pw.println(getPulseDuration(true));
        pw.print("    getPulseInDuration(pickup=false): "); pw.println(getPulseInDuration(false));
        pw.print("    getPulseInDuration(pickup=true): "); pw.println(getPulseInDuration(true));
        pw.print("    getPulseInDelay(pickup=false): "); pw.println(getPulseInDelay(false));
        pw.print("    getPulseInDelay(pickup=true): "); pw.println(getPulseInDelay(true));
        pw.print("    getPulseInVisibleDuration(): "); pw.println(getPulseVisibleDuration());
        pw.print("    getPulseOutDuration(): "); pw.println(getPulseOutDuration());
        pw.print("    getPulseOnSigMotion(): "); pw.println(getPulseOnSigMotion());
        pw.print("    getVibrateOnSigMotion(): "); pw.println(getVibrateOnSigMotion());
        pw.print("    getPulseOnPickup(): "); pw.println(getPulseOnPickup());
        pw.print("    getVibrateOnPickup(): "); pw.println(getVibrateOnPickup());
        pw.print("    getProxCheckBeforePulse(): "); pw.println(getProxCheckBeforePulse());
        pw.print("    getPulseOnNotifications(): "); pw.println(getPulseOnNotifications());
        pw.print("    getPulseSchedule(): "); pw.println(getPulseSchedule());
        pw.print("    getPulseScheduleResets(): "); pw.println(getPulseScheduleResets());
        pw.print("    getPickupVibrationThreshold(): "); pw.println(getPickupVibrationThreshold());
        pw.print("    getPickupPerformsProxCheck(): "); pw.println(getPickupPerformsProxCheck());
    
private booleangetBoolean(java.lang.String propName, int resId)

        return SystemProperties.getBoolean(propName, mContext.getResources().getBoolean(resId));
    
public booleangetDisplayStateSupported()

        return getBoolean("doze.display.supported", R.bool.doze_display_state_supported);
    
private intgetInt(java.lang.String propName, int resId)

        int value = SystemProperties.getInt(propName, mContext.getResources().getInteger(resId));
        return MathUtils.constrain(value, 0, MAX_DURATION);
    
public booleangetPickupPerformsProxCheck()

        return getBoolean("doze.pickup.proxcheck", R.bool.doze_pickup_performs_proximity_check);
    
public intgetPickupVibrationThreshold()

        return getInt("doze.pickup.vibration.threshold", R.integer.doze_pickup_vibration_threshold);
    
public booleangetProxCheckBeforePulse()

        return getBoolean("doze.pulse.proxcheck", R.bool.doze_proximity_check_before_pulse);
    
public intgetPulseDuration(boolean pickup)

        return getPulseInDuration(pickup) + getPulseVisibleDuration() + getPulseOutDuration();
    
public intgetPulseInDelay(boolean pickup)

        return pickup
                ? getInt("doze.pulse.delay.in.pickup", R.integer.doze_pulse_delay_in_pickup)
                : getInt("doze.pulse.delay.in", R.integer.doze_pulse_delay_in);
    
public intgetPulseInDuration(boolean pickup)

        return pickup
                ? getInt("doze.pulse.duration.in.pickup", R.integer.doze_pulse_duration_in_pickup)
                : getInt("doze.pulse.duration.in", R.integer.doze_pulse_duration_in);
    
public booleangetPulseOnNotifications()

        return getBoolean("doze.pulse.notifications", R.bool.doze_pulse_on_notifications);
    
public booleangetPulseOnPickup()

        return getBoolean("doze.pulse.pickup", R.bool.doze_pulse_on_pick_up);
    
public booleangetPulseOnSigMotion()

        return getBoolean("doze.pulse.sigmotion", R.bool.doze_pulse_on_significant_motion);
    
public intgetPulseOutDuration()

        return getInt("doze.pulse.duration.out", R.integer.doze_pulse_duration_out);
    
public com.android.systemui.statusbar.phone.DozeParameters$PulseSchedulegetPulseSchedule()

        final String spec = getString("doze.pulse.schedule", R.string.doze_pulse_schedule);
        if (sPulseSchedule == null || !sPulseSchedule.mSpec.equals(spec)) {
            sPulseSchedule = PulseSchedule.parse(spec);
        }
        return sPulseSchedule;
    
public intgetPulseScheduleResets()

        return getInt("doze.pulse.schedule.resets", R.integer.doze_pulse_schedule_resets);
    
public intgetPulseVisibleDuration()

        return getInt("doze.pulse.duration.visible", R.integer.doze_pulse_duration_visible);
    
private java.lang.StringgetString(java.lang.String propName, int resId)

        return SystemProperties.get(propName, mContext.getString(resId));
    
public booleangetVibrateOnPickup()

        return SystemProperties.getBoolean("doze.vibrate.pickup", false);
    
public booleangetVibrateOnSigMotion()

        return SystemProperties.getBoolean("doze.vibrate.sigmotion", false);