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

* commit '88d616c80c54aeb99abeb1534b14436780ede253':
  QS: Allow Flashlight Tile to handle reset state
This commit is contained in:
Jason Monk
2015-08-04 14:07:07 +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;
}