Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -408,7 +408,7 @@ public abstract class PanelViewController { && !mKeyguardStateController.isKeyguardFadingAway()) { long timePassed = SystemClock.uptimeMillis() - mDownTime; if (timePassed < ViewConfiguration.getLongPressTimeout()) { // Lets show the user that he can actually expand the panel // Let's show the user that they can actually expand the panel runPeekAnimation( PEEK_ANIMATION_DURATION, getPeekHeight(), true /* collapseWhenFinished */); } else { Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java +13 −13 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC protected boolean mPowerSave; private boolean mAodPowerSave; protected boolean mWirelessCharging; private boolean mTestmode = false; private boolean mTestMode = false; @VisibleForTesting boolean mHasReceivedBattery = false; private Estimate mEstimate; Loading Loading @@ -154,7 +154,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC public void onReceive(final Context context, Intent intent) { final String action = intent.getAction(); if (action.equals(Intent.ACTION_BATTERY_CHANGED)) { if (mTestmode && !intent.getBooleanExtra("testmode", false)) return; if (mTestMode && !intent.getBooleanExtra("testmode", false)) return; mHasReceivedBattery = true; mLevel = (int)(100f * intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0) Loading @@ -172,29 +172,29 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)) { updatePowerSave(); } else if (action.equals(ACTION_LEVEL_TEST)) { mTestmode = true; mTestMode = true; mMainHandler.post(new Runnable() { int curLevel = 0; int incr = 1; int saveLevel = mLevel; boolean savePlugged = mPluggedIn; Intent dummy = new Intent(Intent.ACTION_BATTERY_CHANGED); Intent mTestIntent = new Intent(Intent.ACTION_BATTERY_CHANGED); @Override public void run() { if (curLevel < 0) { mTestmode = false; dummy.putExtra("level", saveLevel); dummy.putExtra("plugged", savePlugged); dummy.putExtra("testmode", false); mTestMode = false; mTestIntent.putExtra("level", saveLevel); mTestIntent.putExtra("plugged", savePlugged); mTestIntent.putExtra("testmode", false); } else { dummy.putExtra("level", curLevel); dummy.putExtra("plugged", incr > 0 ? BatteryManager.BATTERY_PLUGGED_AC mTestIntent.putExtra("level", curLevel); mTestIntent.putExtra("plugged", incr > 0 ? BatteryManager.BATTERY_PLUGGED_AC : 0); dummy.putExtra("testmode", true); mTestIntent.putExtra("testmode", true); } context.sendBroadcast(dummy); context.sendBroadcast(mTestIntent); if (!mTestmode) return; if (!mTestMode) return; curLevel += incr; if (curLevel == 100) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -408,7 +408,7 @@ public abstract class PanelViewController { && !mKeyguardStateController.isKeyguardFadingAway()) { long timePassed = SystemClock.uptimeMillis() - mDownTime; if (timePassed < ViewConfiguration.getLongPressTimeout()) { // Lets show the user that he can actually expand the panel // Let's show the user that they can actually expand the panel runPeekAnimation( PEEK_ANIMATION_DURATION, getPeekHeight(), true /* collapseWhenFinished */); } else { Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java +13 −13 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC protected boolean mPowerSave; private boolean mAodPowerSave; protected boolean mWirelessCharging; private boolean mTestmode = false; private boolean mTestMode = false; @VisibleForTesting boolean mHasReceivedBattery = false; private Estimate mEstimate; Loading Loading @@ -154,7 +154,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC public void onReceive(final Context context, Intent intent) { final String action = intent.getAction(); if (action.equals(Intent.ACTION_BATTERY_CHANGED)) { if (mTestmode && !intent.getBooleanExtra("testmode", false)) return; if (mTestMode && !intent.getBooleanExtra("testmode", false)) return; mHasReceivedBattery = true; mLevel = (int)(100f * intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0) Loading @@ -172,29 +172,29 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)) { updatePowerSave(); } else if (action.equals(ACTION_LEVEL_TEST)) { mTestmode = true; mTestMode = true; mMainHandler.post(new Runnable() { int curLevel = 0; int incr = 1; int saveLevel = mLevel; boolean savePlugged = mPluggedIn; Intent dummy = new Intent(Intent.ACTION_BATTERY_CHANGED); Intent mTestIntent = new Intent(Intent.ACTION_BATTERY_CHANGED); @Override public void run() { if (curLevel < 0) { mTestmode = false; dummy.putExtra("level", saveLevel); dummy.putExtra("plugged", savePlugged); dummy.putExtra("testmode", false); mTestMode = false; mTestIntent.putExtra("level", saveLevel); mTestIntent.putExtra("plugged", savePlugged); mTestIntent.putExtra("testmode", false); } else { dummy.putExtra("level", curLevel); dummy.putExtra("plugged", incr > 0 ? BatteryManager.BATTERY_PLUGGED_AC mTestIntent.putExtra("level", curLevel); mTestIntent.putExtra("plugged", incr > 0 ? BatteryManager.BATTERY_PLUGGED_AC : 0); dummy.putExtra("testmode", true); mTestIntent.putExtra("testmode", true); } context.sendBroadcast(dummy); context.sendBroadcast(mTestIntent); if (!mTestmode) return; if (!mTestMode) return; curLevel += incr; if (curLevel == 100) { Loading