diff options
author | Nebojsa Cvetkovic <nebkat@teamhacksung.org> | 2013-06-23 21:08:02 +0200 |
---|---|---|
committer | jackmu95 <jacob.mueller.elz@gmail.com> | 2013-06-26 20:04:47 +0200 |
commit | 00539be0adf7d847384080081ab8a87a82317dfb (patch) | |
tree | c7f6bdbf2111b3e7c97725ecda33f53f4adef8f9 /core/java | |
parent | 69c5fce703189a7dc79d9538e67157adb44c9337 (diff) | |
download | frameworks_base-00539be0adf7d847384080081ab8a87a82317dfb.zip frameworks_base-00539be0adf7d847384080081ab8a87a82317dfb.tar.gz frameworks_base-00539be0adf7d847384080081ab8a87a82317dfb.tar.bz2 |
QuickSettings: Camera tile
Change-Id: Id0beb3dd559536bb5571ddc87cb0bcb4945b1a77
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/com/android/internal/util/cm/QSConstants.java | 1 | ||||
-rw-r--r-- | core/java/com/android/internal/util/cm/QSUtils.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/java/com/android/internal/util/cm/QSConstants.java b/core/java/com/android/internal/util/cm/QSConstants.java index 0e49e39..044d5f9 100644 --- a/core/java/com/android/internal/util/cm/QSConstants.java +++ b/core/java/com/android/internal/util/cm/QSConstants.java @@ -29,6 +29,7 @@ public class QSConstants { public static final String TILE_QUIETHOURS = "toggleQuietHours"; public static final String TILE_VOLUME = "toggleVolume"; public static final String TILE_EXPANDEDDESKTOP = "toggleExpandedDesktop"; + public static final String TILE_CAMERA = "toggleCamera"; public static final String TILE_DELIMITER = "|"; public static ArrayList<String> TILES_DEFAULT = new ArrayList<String>(); diff --git a/core/java/com/android/internal/util/cm/QSUtils.java b/core/java/com/android/internal/util/cm/QSUtils.java index 3da9a7c..39743a9 100644 --- a/core/java/com/android/internal/util/cm/QSUtils.java +++ b/core/java/com/android/internal/util/cm/QSUtils.java @@ -3,8 +3,8 @@ package com.android.internal.util.cm; import android.bluetooth.BluetoothAdapter; import android.content.ContentResolver; import android.content.Context; -import android.content.pm.PackageManager; import android.content.res.Resources; +import android.hardware.Camera; import android.hardware.display.DisplayManager; import android.hardware.display.WifiDisplayStatus; import android.net.ConnectivityManager; @@ -62,4 +62,8 @@ public class QSUtils { Resources res = ctx.getResources(); return res.getBoolean(com.android.internal.R.bool.config_hasDockBattery); } + + public static boolean deviceSupportsCamera() { + return Camera.getNumberOfCameras() > 0; + } } |