diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-09-05 20:43:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-05 20:43:52 +0000 |
commit | 71aa8ab5d78de8292be4af49e5930fe37b7525ef (patch) | |
tree | 0aa85b7765b5f7d2b2200beaa75964db71371001 /packages/SystemUI | |
parent | f2f3bde62fd9738e1a5b7bd250aec3569cbb14c1 (diff) | |
parent | fd887436bd111e4d2c7307578a51b5070025b7f2 (diff) | |
download | frameworks_base-71aa8ab5d78de8292be4af49e5930fe37b7525ef.zip frameworks_base-71aa8ab5d78de8292be4af49e5930fe37b7525ef.tar.gz frameworks_base-71aa8ab5d78de8292be4af49e5930fe37b7525ef.tar.bz2 |
Merge "Camera2: Final API revisions" into lmp-dev
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java | 12 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java index 562f550..3f5cf3f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java @@ -85,12 +85,12 @@ public class SecureCameraLaunchManager { private KeyguardBottomAreaView mKeyguardBottomArea; private CameraManager mCameraManager; - private CameraAvailabilityListener mCameraAvailabilityListener; + private CameraAvailabilityCallback mCameraAvailabilityCallback; private Map<String, Boolean> mCameraAvailabilityMap; private boolean mWaitingToLaunchSecureCamera; private Runnable mLaunchCameraRunnable; - private class CameraAvailabilityListener extends CameraManager.AvailabilityListener { + private class CameraAvailabilityCallback extends CameraManager.AvailabilityCallback { @Override public void onCameraUnavailable(String cameraId) { if (DEBUG) Log.d(TAG, "onCameraUnavailble(" + cameraId + ")"); @@ -123,10 +123,10 @@ public class SecureCameraLaunchManager { mKeyguardBottomArea = keyguardBottomArea; mCameraManager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE); - mCameraAvailabilityListener = new CameraAvailabilityListener(); + mCameraAvailabilityCallback = new CameraAvailabilityCallback(); // An onCameraAvailable() or onCameraUnavailable() callback will be received for each camera - // when the availability listener is registered, thus initializing the map. + // when the availability callback is registered, thus initializing the map. // // Keeping track of the state of all cameras using the onCameraAvailable() and // onCameraUnavailable() callbacks can get messy when dealing with hot-pluggable cameras. @@ -150,14 +150,14 @@ public class SecureCameraLaunchManager { * Initializes the SecureCameraManager and starts listening for camera availability. */ public void create() { - mCameraManager.addAvailabilityListener(mCameraAvailabilityListener, mHandler); + mCameraManager.registerAvailabilityCallback(mCameraAvailabilityCallback, mHandler); } /** * Stops listening for camera availability and cleans up the SecureCameraManager. */ public void destroy() { - mCameraManager.removeAvailabilityListener(mCameraAvailabilityListener); + mCameraManager.unregisterAvailabilityCallback(mCameraAvailabilityCallback); } /** diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java index 70eaa5c..6f021ac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java @@ -81,7 +81,7 @@ public class FlashlightController { if (mCameraId != null) { ensureHandler(); - mCameraManager.addAvailabilityListener(mAvailabilityListener, mHandler); + mCameraManager.registerAvailabilityCallback(mAvailabilityCallback, mHandler); } } @@ -339,8 +339,8 @@ public class FlashlightController { } }; - private final CameraManager.AvailabilityListener mAvailabilityListener = - new CameraManager.AvailabilityListener() { + private final CameraManager.AvailabilityCallback mAvailabilityCallback = + new CameraManager.AvailabilityCallback() { @Override public void onCameraAvailable(String cameraId) { if (DEBUG) Log.d(TAG, "onCameraAvailable(" + cameraId + ")"); |