OSDN Git Service

Separate enable/disable and show/hide logic in ButtonManager
authorAlan Newberger <alann@google.com>
Tue, 25 Nov 2014 01:11:55 +0000 (17:11 -0800)
committerAlan Newberger <alann@google.com>
Tue, 25 Nov 2014 01:16:08 +0000 (17:16 -0800)
commite29804fdace7b653932314407a5bdcf58569e590
tree734a02cff1e51e9889462c53f6c6a11959074434
parenta2c1b41da5f169fb9c816449e1dedc32d2335c4a
Separate enable/disable and show/hide logic in ButtonManager

Show/hide occurs during module init, and should not be overridden
during operation when buttons are enabled/disabled. Rather than
make all enabling code handle the complexity of button visibility,
this change just configures buttons to be visible once. Addresses
bug where flash button becomes visible on devices without flash
when toggling HDR, due to logic that enables/disables flash and
HDR together.

Bug: 18376973
Change-Id: I787858ccde1fed9833fd24ac51d3b0bd3cc90df7
src/com/android/camera/ButtonManager.java
src/com/android/camera/PhotoModule.java