The button callbacks are asynchronous behind animators. Most in the codebase
(i.e., all in CaptureModule) do paused checks, but the one in CameraAppUI
for grid lines did not and is causing lots of feedback reports with null
SettingsManagers (done in the activity onDestroy). Audited codebase, these
two instances were the only ones not checking.
Bug:
17905718
Change-Id: I31c26088ef1e7d600b4e3be42950b0ca70613e20
new ButtonManager.ButtonCallback() {
@Override
public void onStateChanged(int state) {
+ if (mPaused) {
+ return;
+ }
// Update flash parameters.
enableTorchMode(true);
}
return new ButtonManager.ButtonCallback() {
@Override
public void onStateChanged(int state) {
- if (Keys.areGridLinesOn(mController.getSettingsManager())) {
- showGridLines();
- } else {
- hideGridLines();
+ if (!mController.isPaused()) {
+ if (Keys.areGridLinesOn(mController.getSettingsManager())) {
+ showGridLines();
+ } else {
+ hideGridLines();
+ }
}
}
};