// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.oliodevices.assist.app.views; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.ProgressBar; public class BatteryLevelView extends ProgressBar { private static final int LOW_BATTERY_THRESHOLD_INDICATOR_VALUE = 20; private static final int LOW_STATE_SET[] = { 0x7f010027 }; private boolean mCharging; private int mLowThreshold; public BatteryLevelView(Context context, AttributeSet attributeset) { this(context, attributeset, 0); } public BatteryLevelView(Context context, AttributeSet attributeset, int i) { super(context, attributeset, i); context = context.getTheme().obtainStyledAttributes(attributeset, com.oliodevices.assist.R.styleable.BatteryLevelView, 0, 0); mLowThreshold = context.getInteger(0, 20); context.recycle(); return; attributeset; context.recycle(); throw attributeset; } private boolean isLow() { return getProgress() < mLowThreshold; } public int getLowThreshold() { return mLowThreshold; } public boolean isCharging() { return mCharging; } protected int[] onCreateDrawableState(int i) { if (isLow()) { int ai[] = super.onCreateDrawableState(i + 1); mergeDrawableStates(ai, LOW_STATE_SET); return ai; } else { return super.onCreateDrawableState(i); } } public void setCharging(boolean flag) { if (mCharging == flag) { return; } else { mCharging = flag; refreshDrawableState(); return; } } public void setLowThreshold(int i) { mLowThreshold = i; } public void setProgress(int i) { this; JVM INSTR monitorenter ; super.setProgress(i); refreshDrawableState(); this; JVM INSTR monitorexit ; return; Exception exception; exception; throw exception; } }