am 55dbf2d7: Merge "QS: Allow Flashlight Tile to handle reset state" into mnc-dev

* commit '55dbf2d78e575b6c7b53e06aed17ff7406305a13':
  QS: Allow Flashlight Tile to handle reset state
This commit is contained in:
Jason Monk
2015-08-04 13:52:34 +00:00
committed by Android Git Automerger
2 changed files with 6 additions and 0 deletions

View File

@@ -79,6 +79,8 @@ public class FlashlightTile extends QSTile<QSTile.BooleanState> implements
return;
}
state.value = value;
} else {
state.value = mFlashlightController.isEnabled();
}
final AnimationIcon icon = state.value ? mEnable : mDisable;
icon.setAllowAnimation(arg instanceof UserBoolean && ((UserBoolean) arg).userInitiated);

View File

@@ -93,6 +93,10 @@ public class FlashlightController {
}
}
public synchronized boolean isEnabled() {
return mFlashlightEnabled;
}
public synchronized boolean isAvailable() {
return mTorchAvailable;
}