Merge "QS: Allow Flashlight Tile to handle reset state" into mnc-dev
This commit is contained in:
@@ -79,6 +79,8 @@ public class FlashlightTile extends QSTile<QSTile.BooleanState> implements
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.value = value;
|
state.value = value;
|
||||||
|
} else {
|
||||||
|
state.value = mFlashlightController.isEnabled();
|
||||||
}
|
}
|
||||||
final AnimationIcon icon = state.value ? mEnable : mDisable;
|
final AnimationIcon icon = state.value ? mEnable : mDisable;
|
||||||
icon.setAllowAnimation(arg instanceof UserBoolean && ((UserBoolean) arg).userInitiated);
|
icon.setAllowAnimation(arg instanceof UserBoolean && ((UserBoolean) arg).userInitiated);
|
||||||
|
|||||||
@@ -93,6 +93,10 @@ public class FlashlightController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized boolean isEnabled() {
|
||||||
|
return mFlashlightEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized boolean isAvailable() {
|
public synchronized boolean isAvailable() {
|
||||||
return mTorchAvailable;
|
return mTorchAvailable;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user