DeviceParts: Remove Ambient display check
Change-Id: Iffbaa3402d82bf22fc5bcac13a58e0d7dc0fc741
diff --git a/DeviceParts/res/drawable/ic_info_outline_24dp.xml b/DeviceParts/res/drawable/ic_info_outline_24dp.xml
deleted file mode 100644
index 3fe1e9e..0000000
--- a/DeviceParts/res/drawable/ic_info_outline_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/textColorSecondary">
- <path
- android:fillColor="#000000"
- android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
-</vector>
diff --git a/DeviceParts/res/values/strings.xml b/DeviceParts/res/values/strings.xml
index cc68e8f..9a1a9e4 100644
--- a/DeviceParts/res/values/strings.xml
+++ b/DeviceParts/res/values/strings.xml
@@ -73,7 +73,6 @@
<string name="tilt_check_title">Pick up</string>
<string name="pocket_check_summary">Pulse notifications on removal from pocket</string>
<string name="pocket_check_title">Pocket</string>
- <string name="ambient_display_enable">Ambient display must be enabled in display settings</string>
<string name="wake_entry">Wakeup</string>
<string name="swipe_up_to_wake_up_title">Swipe up to wake up</string>
<string name="swipe_up_to_wake_up_summary">Swipe up on the screen to wake up your device from idle mode</string>
diff --git a/DeviceParts/res/xml/doze_settings.xml b/DeviceParts/res/xml/doze_settings.xml
index 13c2037..1cb55c5 100644
--- a/DeviceParts/res/xml/doze_settings.xml
+++ b/DeviceParts/res/xml/doze_settings.xml
@@ -29,9 +29,4 @@
android:summary="@string/tilt_check_summary"
android:title="@string/tilt_check_title"
android:persistent="false" />
- <Preference
- android:key="footer"
- android:summary="@string/ambient_display_enable"
- android:persistent="false"
- android:icon="@drawable/ic_info_outline_24dp" />
</PreferenceScreen>
diff --git a/DeviceParts/src/org/omnirom/device/DozeSettings.java b/DeviceParts/src/org/omnirom/device/DozeSettings.java
index ba9d86c..74d8715 100644
--- a/DeviceParts/src/org/omnirom/device/DozeSettings.java
+++ b/DeviceParts/src/org/omnirom/device/DozeSettings.java
@@ -44,7 +44,6 @@
private static final String KEY_WAVE_CHECK = "wave_check";
private static final String KEY_POCKET_CHECK = "pocket_check";
private static final String KEY_TILT_CHECK = "tilt_check";
- private static final String KEY_FOOTER = "footer";
private boolean mUseTiltCheck;
private boolean mUseWaveCheck;
@@ -86,10 +85,6 @@
return true;
}
});
- Preference footer = findPreference(KEY_FOOTER);
- if (isAmbientDisplayEnabled()) {
- getPreferenceScreen().removePreference(footer);
- }
}
private void getDozeSettings() {
@@ -107,8 +102,4 @@
String newValue = String.valueOf(mUseWaveCheck) + ":" + String.valueOf(mUsePocketCheck) + ":" + String.valueOf(mUseTiltCheck);
Settings.System.putString(getContext().getContentResolver(), OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS, newValue);
}
-
- private boolean isAmbientDisplayEnabled() {
- return Settings.Secure.getInt(getContext().getContentResolver(), Settings.Secure.DOZE_ENABLED, 1) == 1;
- }
}