diff options
Diffstat (limited to 'src/com/android/settings/cyanogenmod')
-rw-r--r-- | src/com/android/settings/cyanogenmod/LockscreenInterface.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/settings/cyanogenmod/LockscreenInterface.java b/src/com/android/settings/cyanogenmod/LockscreenInterface.java index c506889..224e652 100644 --- a/src/com/android/settings/cyanogenmod/LockscreenInterface.java +++ b/src/com/android/settings/cyanogenmod/LockscreenInterface.java @@ -29,6 +29,7 @@ import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; +import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.Rect; @@ -147,6 +148,11 @@ public class LockscreenInterface extends SettingsPreferenceFragment implements mEnableWidgets.setChecked((disabledFeatures & DevicePolicyManager.KEYGUARD_DISABLE_WIDGETS_ALL) == 0); mEnableCamera.setChecked((disabledFeatures & DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA) == 0); + // Remove the camera widget preference if the device doesn't have one + if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { + widgetsCategory.removePreference(mEnableCamera); + } + mWallpaperImage = new File(getActivity().getFilesDir() + "/lockwallpaper"); mWallpaperTemporary = new File(getActivity().getCacheDir() + "/lockwallpaper.tmp"); |