diff options
author | Chung-yih Wang <cywang@google.com> | 2011-07-20 07:02:18 +0800 |
---|---|---|
committer | Chung-yih Wang <cywang@google.com> | 2011-08-04 08:47:34 +0800 |
commit | bed7386688cd7810cba23732ab71f370fe3222ff (patch) | |
tree | 2ff1db2d188e4e6f570f4fa393277c7165853cff /src/com/android/camera/Util.java | |
parent | 2989c0da86939dea7af264d7b9b25593f8aff2f7 (diff) | |
download | packages_apps_LegacyCamera-bed7386688cd7810cba23732ab71f370fe3222ff.zip packages_apps_LegacyCamera-bed7386688cd7810cba23732ab71f370fe3222ff.tar.gz packages_apps_LegacyCamera-bed7386688cd7810cba23732ab71f370fe3222ff.tar.bz2 |
Merge the indicator bar implementations.
bug:5039235
Originally we have the GLView-implemented indicators for Phone-based UI.
Based on the current UI design, we would like to merge the look on all
devices for the dialog of the camera setting. Therefore, a refactor of
how to handle the popup window is required here and this will simplify our
UI work for handling different layout/resolution.
Change-Id: I6f9e6ebed7600be460ddd906505cdc44f81098ad
Diffstat (limited to 'src/com/android/camera/Util.java')
-rw-r--r-- | src/com/android/camera/Util.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java index 36bc7be..d3fa24e 100644 --- a/src/com/android/camera/Util.java +++ b/src/com/android/camera/Util.java @@ -61,9 +61,19 @@ public class Util { private static final String EXTRAS_CAMERA_FACING = "android.intent.extras.CAMERA_FACING"; + private static boolean sIsTabletUI; + private Util() { } + public static void initialize(Context context) { + sIsTabletUI = (context.getResources().getConfiguration().screenWidthDp >= 1024); + } + + public static boolean isTabletUI() { + return sIsTabletUI; + } + // Rotates the bitmap by the specified degree. // If a new bitmap is created, the original bitmap is recycled. public static Bitmap rotate(Bitmap b, int degrees) { |