diff options
| author | Sultan Qasim Khan <sultanqasim@gmail.com> | 2016-05-06 00:00:55 -0400 |
|---|---|---|
| committer | Sultan Qasim Khan <sultanqasim@gmail.com> | 2016-05-06 00:00:55 -0400 |
| commit | a94df03e2c55425747aeea9555f1e8298b5a8cb4 (patch) | |
| tree | 9b7b5dec890f1cad0e4f41ce149338a07d784cb6 | |
| parent | a8ccd6f7531f98bd5b3ebb5f1822e8b2d7c4c202 (diff) | |
condor: MotoDoze moved here
Change-Id: Ide4e91ffb36990a9836451fa8568137dfce337e4
46 files changed, 1380 insertions, 1 deletions
@@ -1,5 +1,5 @@ # -# Copyright (C) 2014 Prashant Gahlot (proxthehacker@gmail.com) +# Copyright (C) 2014-2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -37,3 +37,7 @@ DEVICE_PACKAGE_OVERLAYS := \ # Inherit from msm8610-common $(call inherit-product, device/motorola/msm8610-common/msm8610.mk) + +# Doze +PRODUCT_PACKAGES += \ + MotoDoze diff --git a/doze/Android.mk b/doze/Android.mk new file mode 100644 index 0000000..d014783 --- /dev/null +++ b/doze/Android.mk @@ -0,0 +1,19 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := optional + +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_PACKAGE_NAME := MotoDoze +LOCAL_CERTIFICATE := platform +LOCAL_PRIVILEGED_MODULE := true + +LOCAL_STATIC_JAVA_LIBRARIES := \ + org.cyanogenmod.platform.internal + +LOCAL_PROGUARD_FLAG_FILES := proguard.flags + +include $(BUILD_PACKAGE) + +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/doze/AndroidManifest.xml b/doze/AndroidManifest.xml new file mode 100644 index 0000000..c3426c7 --- /dev/null +++ b/doze/AndroidManifest.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.cyanogenmod.settings.device" + android:versionCode="1" + android:versionName="1.0" + android:sharedUserId="android.uid.system"> + + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> + <uses-permission android:name="android.permission.WAKE_LOCK" /> + + <uses-sdk + android:minSdkVersion="21" + android:targetSdkVersion="21"/> + + <application + android:label="MotoDoze" + android:persistent="true"> + + <receiver android:name="com.cyanogenmod.settings.device.BootCompletedReceiver"> + <intent-filter> + <action android:name="android.intent.action.BOOT_COMPLETED" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </receiver> + + <service android:name="com.cyanogenmod.settings.device.MotoDozeService" + android:permission="MotoDozeService"> + </service> + + <activity + android:name=".TouchscreenGestureSettings" + android:label="@string/screen_gestures_panel_title" + android:theme="@android:style/Theme.Material.Settings"> + <intent-filter> + <action android:name="com.android.settings.action.EXTRA_SETTINGS" /> + </intent-filter> + <meta-data + android:name="com.android.settings.category" + android:value="com.android.settings.category.device" /> + <meta-data + android:name="com.android.settings.icon" + android:resource="@drawable/ic_settings_gestures" /> + </activity> + + </application> +</manifest> diff --git a/doze/proguard.flags b/doze/proguard.flags new file mode 100644 index 0000000..3bb1f2c --- /dev/null +++ b/doze/proguard.flags @@ -0,0 +1,3 @@ +-keep class com.cyanogenmod.settings.device.* { + *; +} diff --git a/doze/res/drawable/ic_settings_gestures.xml b/doze/res/drawable/ic_settings_gestures.xml new file mode 100644 index 0000000..95cdede --- /dev/null +++ b/doze/res/drawable/ic_settings_gestures.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2015 The CyanogenMod 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" + android:viewportHeight="24"> + + <path + android:fillColor="@android:color/white" + android:pathData="M4.7,6.9c0.7-0.7,1.4-1.4,1.7-1.2c0.5,0.2,0,1-0.3,1.5c-0.2,0.4-2.8,3.9-2.8,6.3c0,1.3,0.5,2.3,1.3,3 +c0.7,0.6,1.7,0.7,2.6,0.5c1.1-0.3,1.9-1.4,3-2.8c1.2-1.5,2.8-3.4,4-3.4c1.6,0,1.6,1,1.7,1.8c-3.7,0.6-5.3,3.7-5.3,5.4 +s1.4,3.1,3.2,3.1c1.6,0,4.3-1.3,4.6-6.1H21v-2.5h-2.4c-0.1-1.7-1.1-4.2-4-4.2c-2.2,0-4.1,1.9-4.9,2.8c-0.6,0.7-2,2.5-2.3,2.7 +c-0.2,0.3-0.7,0.8-1.1,0.8c-0.4,0-0.7-0.8-0.4-1.9c0.3-1.1,1.4-2.9,1.8-3.5C8.5,8,9.1,7.2,9.1,5.9C9.1,3.7,7.4,3,6.6,3 +C5.3,3,4.1,4,3.9,4.3C3.5,4.6,3.2,4.9,3,5.2L4.7,6.9z +M13.9,18.6c-0.3,0-0.7-0.3-0.7-0.7c0-0.6,0.7-2.2,2.8-2.8 +C15.8,17.8,14.6,18.6,13.9,18.6z" /> +</vector> diff --git a/doze/res/values-af/strings.xml b/doze/res/values-af/strings.xml new file mode 100644 index 0000000..ab561a9 --- /dev/null +++ b/doze/res/values-af/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gebare</string> + <string name="ambient_display_title">Omgewings temperatuur skerm</string> + <string name="ambient_display_enable_title">Omgewings temperatuur skerm</string> + <string name="ambient_display_enable_summary">Skerm sal wakker word wanneer jy kennisgewings ontvang</string> + <string name="hand_wave_gesture_title">Handgebaar</string> + <string name="hand_wave_gesture_summary">Pols kennisgewings op die handgebaar</string> + <string name="pocket_gesture_title">Sak</string> + <string name="pocket_gesture_summary">Pols kennisgewings wanneer jy toestel uit jou sak haal</string> +</resources> diff --git a/doze/res/values-az-rAZ/strings.xml b/doze/res/values-az-rAZ/strings.xml new file mode 100644 index 0000000..230275f --- /dev/null +++ b/doze/res/values-az-rAZ/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Jestlər</string> + <string name="ambient_display_title">Ekran mühiti</string> + <string name="ambient_display_enable_title">Ekran mühiti</string> + <string name="ambient_display_enable_summary">Bildiriş gələndə ekranı oyandırar</string> + <string name="hand_wave_gesture_title">Əl yellə</string> + <string name="hand_wave_gesture_summary">Əl yelləyəndə bildirişləri at</string> + <string name="pocket_gesture_title">Cib</string> + <string name="pocket_gesture_summary">Cibdən çıxaranda bildirişləri at</string> +</resources> diff --git a/doze/res/values-ca/strings.xml b/doze/res/values-ca/strings.xml new file mode 100644 index 0000000..4a3dda4 --- /dev/null +++ b/doze/res/values-ca/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gestos</string> + <string name="ambient_display_title">Pantalla ambient</string> + <string name="ambient_display_enable_title">Pantalla ambient</string> + <string name="ambient_display_enable_summary">Encen la pantalla quan rebis notificacions</string> + <string name="hand_wave_gesture_title">Agita amb la ma</string> + <string name="hand_wave_gesture_summary">Mostra notificacions quan s\'agiti amb la ma</string> + <string name="pocket_gesture_title">Butxaca</string> + <string name="pocket_gesture_summary">Mostra notificacions quan te\'l treguis de la butxaca</string> +</resources> diff --git a/doze/res/values-cs/strings.xml b/doze/res/values-cs/strings.xml new file mode 100644 index 0000000..dbf1f76 --- /dev/null +++ b/doze/res/values-cs/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gesta</string> + <string name="ambient_display_title">Ambientní zobrazení</string> + <string name="ambient_display_enable_title">Ambientní zobrazení</string> + <string name="ambient_display_enable_summary">Probudit obrazovku při upozornění</string> + <string name="hand_wave_gesture_title">Mávání rukou</string> + <string name="hand_wave_gesture_summary">Upozornit pulsováním při zamáváním rukou</string> + <string name="pocket_gesture_title">Kapsa</string> + <string name="pocket_gesture_summary">Upozornit pulsováním při vyjmutí z kapsy</string> +</resources> diff --git a/doze/res/values-da/strings.xml b/doze/res/values-da/strings.xml new file mode 100644 index 0000000..c09a295 --- /dev/null +++ b/doze/res/values-da/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Bevægelser</string> + <string name="ambient_display_title">Inaktivitetsvisning</string> + <string name="ambient_display_enable_title">Inaktivitetsvisning</string> + <string name="ambient_display_enable_summary">Tænder skærmen når du modtager notifikationer</string> + <string name="hand_wave_gesture_title">Vink med hånden</string> + <string name="hand_wave_gesture_summary">Vibrér, hvis der er notifikationer, når du vinker over skærmen</string> + <string name="pocket_gesture_title">Lomme</string> + <string name="pocket_gesture_summary">Vibrér, hvis der er notifikationer, når telefonen tages op ad lommen</string> +</resources> diff --git a/doze/res/values-de/strings.xml b/doze/res/values-de/strings.xml new file mode 100644 index 0000000..00e9167 --- /dev/null +++ b/doze/res/values-de/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gesten</string> + <string name="ambient_display_title">Inaktivitätsdisplay</string> + <string name="ambient_display_enable_title">Inaktivitätsdisplay</string> + <string name="ambient_display_enable_summary">Bildschirm wecken, wenn Sie Benachrichtigungen erhalten</string> + <string name="hand_wave_gesture_title">Winken</string> + <string name="hand_wave_gesture_summary">Beim Winken Benachrichtigungen kurzzeitig einblenden</string> + <string name="pocket_gesture_title">Tasche</string> + <string name="pocket_gesture_summary">Beim Entfernen aus der Tasche Benachrichtigungen kurzzeitig einblenden</string> +</resources> diff --git a/doze/res/values-el/strings.xml b/doze/res/values-el/strings.xml new file mode 100644 index 0000000..40ec074 --- /dev/null +++ b/doze/res/values-el/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Χειρονομίες</string> + <string name="ambient_display_title">Οθόνη ambient</string> + <string name="ambient_display_enable_title">Οθόνη ambient</string> + <string name="ambient_display_enable_summary">Ενεργοποίηση της οθόνης όταν λαμβάνετε ειδοποιήσεις</string> + <string name="hand_wave_gesture_title">Αιώρηση χεριού</string> + <string name="hand_wave_gesture_summary">Παλμός ειδοποιήσεων κατά την αιώρηση του χεριού</string> + <string name="pocket_gesture_title">Τσέπη</string> + <string name="pocket_gesture_summary">Παλμός ειδοποιήσεων κατά την έξοδο από την τσέπη</string> +</resources> diff --git a/doze/res/values-es/strings.xml b/doze/res/values-es/strings.xml new file mode 100644 index 0000000..f295f8a --- /dev/null +++ b/doze/res/values-es/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gestos</string> + <string name="ambient_display_title">Pantalla ambiente</string> + <string name="ambient_display_enable_title">Pantalla ambiente</string> + <string name="ambient_display_enable_summary">Activar la pantalla cuando se reciben notificaciones</string> + <string name="hand_wave_gesture_title">Agitar con la mano</string> + <string name="hand_wave_gesture_summary">Lanzar notificaciones cuando se agite con la mano</string> + <string name="pocket_gesture_title">Bolsillo</string> + <string name="pocket_gesture_summary">Lanzar notificaciones cuando se saque del bolsillo</string> +</resources> diff --git a/doze/res/values-et-rEE/strings.xml b/doze/res/values-et-rEE/strings.xml new file mode 100644 index 0000000..062a674 --- /dev/null +++ b/doze/res/values-et-rEE/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Žestid</string> + <string name="ambient_display_title">Ambient kuva</string> + <string name="ambient_display_enable_title">Ambient kuva</string> + <string name="ambient_display_enable_summary">Ärata ekraan teavituste saabumisel</string> + <string name="hand_wave_gesture_title">Käe viibutus</string> + <string name="hand_wave_gesture_summary">Näita teavitust käe viibutusele</string> + <string name="pocket_gesture_title">Tasku</string> + <string name="pocket_gesture_summary">Näita teavitusi taskust välja võtmisel</string> +</resources> diff --git a/doze/res/values-eu-rES/strings.xml b/doze/res/values-eu-rES/strings.xml new file mode 100644 index 0000000..68175d6 --- /dev/null +++ b/doze/res/values-eu-rES/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Keinuak</string> + <string name="ambient_display_title">Ambient display</string> + <string name="ambient_display_enable_title">Ambient display</string> + <string name="ambient_display_enable_summary">Esnatu pantaila jakinarazpenak jasotzean</string> + <string name="hand_wave_gesture_title">Eskuarekin agurtu</string> + <string name="hand_wave_gesture_summary">Jakinarazpen argia eskuarekin agurtzean</string> + <string name="pocket_gesture_title">Poltsikoratu</string> + <string name="pocket_gesture_summary">Jakinarazpen argia poltsikotik ateratzean</string> +</resources> diff --git a/doze/res/values-fa/strings.xml b/doze/res/values-fa/strings.xml new file mode 100644 index 0000000..d3ab493 --- /dev/null +++ b/doze/res/values-fa/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">حرکات</string> + <string name="ambient_display_title">نمایش حساس به محیط</string> + <string name="ambient_display_enable_title">نمایش حساس به محیط</string> + <string name="ambient_display_enable_summary">روشن شدن صفحه هنگام دریافت اعلان</string> + <string name="hand_wave_gesture_title">حرکت دست</string> + <string name="hand_wave_gesture_summary">چشمک زدن اعلانها هنگام حرکت دست</string> + <string name="pocket_gesture_title">جیب</string> + <string name="pocket_gesture_summary">چشمک زدن اعلانها هنگام بیرون آوردن از جیب</string> +</resources> diff --git a/doze/res/values-fi/strings.xml b/doze/res/values-fi/strings.xml new file mode 100644 index 0000000..e5784a6 --- /dev/null +++ b/doze/res/values-fi/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Eleet</string> + <string name="ambient_display_title">Ambient-näyttö</string> + <string name="ambient_display_enable_title">Ambient-näyttö</string> + <string name="ambient_display_enable_summary">Herätä näyttö kun saat ilmoituksia</string> + <string name="hand_wave_gesture_title">Käden heilautus</string> + <string name="hand_wave_gesture_summary">Näytä ilmoitukset heilautettaessa kättä</string> + <string name="pocket_gesture_title">Tasku</string> + <string name="pocket_gesture_summary">Näytä ilmoitukset kun laite otetaan taskusta</string> +</resources> diff --git a/doze/res/values-fr/strings.xml b/doze/res/values-fr/strings.xml new file mode 100644 index 0000000..465c599 --- /dev/null +++ b/doze/res/values-fr/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gestes</string> + <string name="ambient_display_title">Affichage ambiant</string> + <string name="ambient_display_enable_title">Affichage ambiant</string> + <string name="ambient_display_enable_summary">Allume l\'écran lorsque vous recevez des notifications</string> + <string name="hand_wave_gesture_title">Passage de la main</string> + <string name="hand_wave_gesture_summary">Active les notifications en passant la main</string> + <string name="pocket_gesture_title">Poche</string> + <string name="pocket_gesture_summary">Active les notifications en sortie de poche</string> +</resources> diff --git a/doze/res/values-hu/strings.xml b/doze/res/values-hu/strings.xml new file mode 100644 index 0000000..5245949 --- /dev/null +++ b/doze/res/values-hu/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Mozdulatok</string> + <string name="ambient_display_title">Környezeti kijelző</string> + <string name="ambient_display_enable_title">Környezeti kijelző</string> + <string name="ambient_display_enable_summary">Képernyő ébresztése értesítések fogadásakor</string> + <string name="hand_wave_gesture_title">Lebegő simítás</string> + <string name="hand_wave_gesture_summary">Értesítések pulzálása lebegő simításnál</string> + <string name="pocket_gesture_title">Zseb</string> + <string name="pocket_gesture_summary">Értesítések pulzálása zsebből való kivétel után</string> +</resources> diff --git a/doze/res/values-in/strings.xml b/doze/res/values-in/strings.xml new file mode 100644 index 0000000..3f0be7a --- /dev/null +++ b/doze/res/values-in/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gerakan</string> + <string name="ambient_display_title">Tampilan ruangan</string> + <string name="ambient_display_enable_title">Tampilan ruangan</string> + <string name="ambient_display_enable_summary">Hidupkan layar saat menerima pemberitahuan</string> + <string name="hand_wave_gesture_title">Lambaian tangan</string> + <string name="hand_wave_gesture_summary">Pemberitahuan berkedip saat melambaikan tangan</string> + <string name="pocket_gesture_title">Saku</string> + <string name="pocket_gesture_summary">Pemberitahuan berkedip saat keluar dari saku</string> +</resources> diff --git a/doze/res/values-it/strings.xml b/doze/res/values-it/strings.xml new file mode 100644 index 0000000..885dd64 --- /dev/null +++ b/doze/res/values-it/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gesture</string> + <string name="ambient_display_title">Ambient display</string> + <string name="ambient_display_enable_title">Ambient display</string> + <string name="ambient_display_enable_summary">Attiva lo schermo quando ricevi notifiche</string> + <string name="hand_wave_gesture_title">Onda mano</string> + <string name="hand_wave_gesture_summary">Mostra notifiche al passaggio della mano</string> + <string name="pocket_gesture_title">Tasca</string> + <string name="pocket_gesture_summary">Mostra notifiche quando togli dalla tasca</string> +</resources> diff --git a/doze/res/values-iw/strings.xml b/doze/res/values-iw/strings.xml new file mode 100644 index 0000000..6f45963 --- /dev/null +++ b/doze/res/values-iw/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">מחוות</string> + <string name="ambient_display_title">התראות ברקע</string> + <string name="ambient_display_enable_title">התראות ברקע</string> + <string name="ambient_display_enable_summary">הפעל את המסך בעת קבלת התראות</string> + <string name="hand_wave_gesture_title">נפנוף יד</string> + <string name="hand_wave_gesture_summary">הצג התראות בנפנוף יד</string> + <string name="pocket_gesture_title">כיס</string> + <string name="pocket_gesture_summary">הצג התראות בהוצאה מהכיס</string> +</resources> diff --git a/doze/res/values-ja/strings.xml b/doze/res/values-ja/strings.xml new file mode 100644 index 0000000..94af9d8 --- /dev/null +++ b/doze/res/values-ja/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">ジェスチャー</string> + <string name="ambient_display_title">常時オンディスプレイ</string> + <string name="ambient_display_enable_title">常時オンディスプレイ</string> + <string name="ambient_display_enable_summary">通知を受信したときに画面を点灯させる</string> + <string name="hand_wave_gesture_title">手を振る</string> + <string name="hand_wave_gesture_summary">手を振ったときに通知を表示させる</string> + <string name="pocket_gesture_title">ポケット</string> + <string name="pocket_gesture_summary">ポケットから取り出したときに通知を表示させる</string> +</resources> diff --git a/doze/res/values-kn-rIN/strings.xml b/doze/res/values-kn-rIN/strings.xml new file mode 100644 index 0000000..f906504 --- /dev/null +++ b/doze/res/values-kn-rIN/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">ಸನ್ನೆಗಳು</string> + <string name="ambient_display_title">ಆವರಿಸಿದ ಪರದೆ</string> + <string name="ambient_display_enable_title">ಆವರಿಸಿದ ಪರದೆ</string> + <string name="ambient_display_enable_summary">ನೀವು ಅಧಿಸೂಚನೆಗಳನ್ನು ಸ್ವೀಕರಿಸಿದಾಗ ಪರದೆಯನ್ನು ಎಚ್ಚರಗೊಳಿಸಿ</string> + <string name="hand_wave_gesture_title">ಹ್ಯಾಂಡ್ ವೇವ್</string> + <string name="hand_wave_gesture_summary">ಹ್ಯಾಂಡ್ ವೇವ್ ಮಾಡಿದಾಗ ಅಧಿಸೂಚನೆಗಳನ್ನು ಪಲ್ಸ್ ಮಾಡು</string> + <string name="pocket_gesture_title">ಜೇಬು</string> + <string name="pocket_gesture_summary">ಜೇಬಿನಿಂದ ತೆಗೆದಾಗ ಅಧಿಸೂಚನೆಗಳನ್ನು ಪಲ್ಸ್ ಮಾಡು</string> +</resources> diff --git a/doze/res/values-ko/strings.xml b/doze/res/values-ko/strings.xml new file mode 100644 index 0000000..4a6a8e5 --- /dev/null +++ b/doze/res/values-ko/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">제스처</string> + <string name="ambient_display_title">절전 모드 자동 해제</string> + <string name="ambient_display_enable_title">절전 모드 자동 해제</string> + <string name="ambient_display_enable_summary">알림을 수신 시 절전 모드를 해제합니다.</string> + <string name="hand_wave_gesture_title">손 흔들기</string> + <string name="hand_wave_gesture_summary">손을 좌우로 흔들면 알림 표시</string> + <string name="pocket_gesture_title">주머니</string> + <string name="pocket_gesture_summary">주머니에서 꺼내면 알림 표시</string> +</resources> diff --git a/doze/res/values-lb/strings.xml b/doze/res/values-lb/strings.xml new file mode 100644 index 0000000..82c01d8 --- /dev/null +++ b/doze/res/values-lb/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gesten</string> + <string name="ambient_display_title">Ambiente Schierm</string> + <string name="ambient_display_enable_title">Ambiente Schierm</string> + <string name="ambient_display_enable_summary">Schierm waakreg maachen, wann s du Notifikatiounen empfänks</string> + <string name="hand_wave_gesture_title">Wénken</string> + <string name="hand_wave_gesture_summary">Puls-Notifikatioune beim Wénken</string> + <string name="pocket_gesture_title">Täsch</string> + <string name="pocket_gesture_summary">Puls-Notifikatioune beim Eraushuelen aus der Täsch</string> +</resources> diff --git a/doze/res/values-lt/strings.xml b/doze/res/values-lt/strings.xml new file mode 100644 index 0000000..fbd0001 --- /dev/null +++ b/doze/res/values-lt/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gestai</string> + <string name="ambient_display_title">Ambient display</string> + <string name="ambient_display_enable_title">Ambient display</string> + <string name="ambient_display_enable_summary">Pažadinti ekraną, kai gaunami pranešimai</string> + <string name="hand_wave_gesture_title">Rankos mostas</string> + <string name="hand_wave_gesture_summary">Pulsuoti pranešimus rankos mostu</string> + <string name="pocket_gesture_title">Kišenė</string> + <string name="pocket_gesture_summary">Pulsuoti pranešimus pašalinant iš kišenės</string> +</resources> diff --git a/doze/res/values-nl/strings.xml b/doze/res/values-nl/strings.xml new file mode 100644 index 0000000..b140802 --- /dev/null +++ b/doze/res/values-nl/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gebaren</string> + <string name="ambient_display_title">Omgevingsdisplay</string> + <string name="ambient_display_enable_title">Omgevingsdisplay</string> + <string name="ambient_display_enable_summary">Scherm aan bij het ontvangen van meldingen</string> + <string name="hand_wave_gesture_title">Handgebaar</string> + <string name="hand_wave_gesture_summary">Meldingen laten knipperen bij handgebaar</string> + <string name="pocket_gesture_title">Broekzak</string> + <string name="pocket_gesture_summary">Meldingen laten knipperen bij verwijderen uit broekzak</string> +</resources> diff --git a/doze/res/values-pl/strings.xml b/doze/res/values-pl/strings.xml new file mode 100644 index 0000000..df3db0e --- /dev/null +++ b/doze/res/values-pl/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gesty</string> + <string name="ambient_display_title">Aktywny wyświetlacz</string> + <string name="ambient_display_enable_title">Aktywny wyświetlacz</string> + <string name="ambient_display_enable_summary">Wybudź ekran, po otrzymaniu powiadomienia</string> + <string name="hand_wave_gesture_title">Machnij ręką</string> + <string name="hand_wave_gesture_summary">Pulsujące powiadomienia po machnięciu ręką</string> + <string name="pocket_gesture_title">Kieszeń</string> + <string name="pocket_gesture_summary">Pulsujące powiadomienia po wyjęciu z kieszeni</string> +</resources> diff --git a/doze/res/values-pt-rBR/strings.xml b/doze/res/values-pt-rBR/strings.xml new file mode 100644 index 0000000..a2426be --- /dev/null +++ b/doze/res/values-pt-rBR/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gestos</string> + <string name="ambient_display_title">Tela ambiente</string> + <string name="ambient_display_enable_title">Tela ambiente</string> + <string name="ambient_display_enable_summary">Ligar a tela quando receber notificações</string> + <string name="hand_wave_gesture_title">Agitar a mão</string> + <string name="hand_wave_gesture_summary">Pulsar notificações ao agitar a mão</string> + <string name="pocket_gesture_title">Bolso</string> + <string name="pocket_gesture_summary">Pulsar notificações após remover do bolso</string> +</resources> diff --git a/doze/res/values-pt-rPT/strings.xml b/doze/res/values-pt-rPT/strings.xml new file mode 100644 index 0000000..72c3aa0 --- /dev/null +++ b/doze/res/values-pt-rPT/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gestos</string> + <string name="ambient_display_title">Visualização de ambiente</string> + <string name="ambient_display_enable_title">Visualização de ambiente</string> + <string name="ambient_display_enable_summary">Ligar o ecrã quando receber notificações</string> + <string name="hand_wave_gesture_title">Passar a mão</string> + <string name="hand_wave_gesture_summary">Notificações Led ao passar a mão</string> + <string name="pocket_gesture_title">Bolso</string> + <string name="pocket_gesture_summary">Notificações Led ao retirar do bolso</string> +</resources> diff --git a/doze/res/values-ro/strings.xml b/doze/res/values-ro/strings.xml new file mode 100644 index 0000000..57b504b --- /dev/null +++ b/doze/res/values-ro/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gesturi</string> + <string name="ambient_display_title">Afișare ambientală</string> + <string name="ambient_display_enable_title">Afișare ambientală</string> + <string name="ambient_display_enable_summary">Trezește ecran când primiți notificări</string> + <string name="hand_wave_gesture_title">Unduire mână</string> + <string name="hand_wave_gesture_summary">Pulsează notificările la unduirea mâinii</string> + <string name="pocket_gesture_title">Buzunar</string> + <string name="pocket_gesture_summary">Pulsează notificările la scoaterea din buzunar</string> +</resources> diff --git a/doze/res/values-ru/strings.xml b/doze/res/values-ru/strings.xml new file mode 100644 index 0000000..d5a4a33 --- /dev/null +++ b/doze/res/values-ru/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Жесты</string> + <string name="ambient_display_title">Индикация событий</string> + <string name="ambient_display_enable_title">Индикация событий</string> + <string name="ambient_display_enable_summary">Включать экран при получении уведомлений</string> + <string name="hand_wave_gesture_title">Взмах</string> + <string name="hand_wave_gesture_summary">Проведите ладонью над экраном для просмотра уведомлений</string> + <string name="pocket_gesture_title">Карман</string> + <string name="pocket_gesture_summary">Отображать уведомления при извлечении устройства из кармана</string> +</resources> diff --git a/doze/res/values-sk/strings.xml b/doze/res/values-sk/strings.xml new file mode 100644 index 0000000..c4260be --- /dev/null +++ b/doze/res/values-sk/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Gestá</string> + <string name="ambient_display_title">Ambientné zobrazenie</string> + <string name="ambient_display_enable_title">Ambientné zobrazenie</string> + <string name="ambient_display_enable_summary">Prebudiť obrazovku po prijatí oznámení</string> + <string name="hand_wave_gesture_title">Mávnutie ruky</string> + <string name="hand_wave_gesture_summary">Pulzné oznámenia po mávnutí rukou</string> + <string name="pocket_gesture_title">Vrecko</string> + <string name="pocket_gesture_summary">Pulzné oznámenia po vybratí z vrecka</string> +</resources> diff --git a/doze/res/values-sl/strings.xml b/doze/res/values-sl/strings.xml new file mode 100644 index 0000000..ddd55a8 --- /dev/null +++ b/doze/res/values-sl/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Poteze</string> + <string name="ambient_display_title">Okoliški zaslon</string> + <string name="ambient_display_enable_title">Okoliški zaslon</string> + <string name="ambient_display_enable_summary">Zbudite zaslon, ko prejmete obvestila</string> + <string name="hand_wave_gesture_title">Mahanje z roko</string> + <string name="hand_wave_gesture_summary">Utripaj obvestila ob mahanju z roko</string> + <string name="pocket_gesture_title">Žep</string> + <string name="pocket_gesture_summary">Utripaj obvestila ob izvlečenju iz žepa</string> +</resources> diff --git a/doze/res/values-sr/strings.xml b/doze/res/values-sr/strings.xml new file mode 100644 index 0000000..db2897c --- /dev/null +++ b/doze/res/values-sr/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Гестови</string> + <string name="ambient_display_title">Амбијент приказ</string> + <string name="ambient_display_enable_title">Амбијент приказ</string> + <string name="ambient_display_enable_summary">Пробуди екран кад добијеш обавештење</string> + <string name="hand_wave_gesture_title">Покрет руком</string> + <string name="hand_wave_gesture_summary">Пулсно обавештење при покрету руком</string> + <string name="pocket_gesture_title">Џеп</string> + <string name="pocket_gesture_summary">Пулсно обавештење при уклањању из џепа</string> +</resources> diff --git a/doze/res/values-th/strings.xml b/doze/res/values-th/strings.xml new file mode 100644 index 0000000..4e237db --- /dev/null +++ b/doze/res/values-th/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">ท่าทาง</string> + <string name="ambient_display_title">หน้าจอแวดล้อม</string> + <string name="ambient_display_enable_title">หน้าจอแวดล้อม</string> + <string name="ambient_display_enable_summary">เปิดหน้าจอเมื่อมีการแจ้งเตือน</string> + <string name="hand_wave_gesture_title">การเคลื่อนไหวด้วยมือ</string> + <string name="hand_wave_gesture_summary">เช็คการแจ้งเตือนเมื่อมีการโบกมือ</string> + <string name="pocket_gesture_title">กระเป๋า</string> + <string name="pocket_gesture_summary">เช็คการแจ้งเตือนเมื่อนำออกจากกระเป๋า</string> +</resources> diff --git a/doze/res/values-tr/strings.xml b/doze/res/values-tr/strings.xml new file mode 100644 index 0000000..8e378e9 --- /dev/null +++ b/doze/res/values-tr/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Hareketler</string> + <string name="ambient_display_title">Bildirim ekranı</string> + <string name="ambient_display_enable_title">Bildirim ekranı</string> + <string name="ambient_display_enable_summary">Bildirim geldiğinde ekranı uyandırır</string> + <string name="hand_wave_gesture_title">El sallama</string> + <string name="hand_wave_gesture_summary">El sallayınca bildirimleri at</string> + <string name="pocket_gesture_title">Cep</string> + <string name="pocket_gesture_summary">Cepten çıkarınca bildirimleri at</string> +</resources> diff --git a/doze/res/values-uk/strings.xml b/doze/res/values-uk/strings.xml new file mode 100644 index 0000000..b9bcd0c --- /dev/null +++ b/doze/res/values-uk/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Жести</string> + <string name="ambient_display_title">Ambient display</string> + <string name="ambient_display_enable_title">Ambient display</string> + <string name="ambient_display_enable_summary">Вмикати екран, коли ви отримали сповіщення</string> + <string name="hand_wave_gesture_title">Жести рукою</string> + <string name="hand_wave_gesture_summary">Пульсуючі сповіщення на при жестах руками</string> + <string name="pocket_gesture_title">Кишеня</string> + <string name="pocket_gesture_summary">Пульсуючі сповіщення при вийманні з кишені</string> +</resources> diff --git a/doze/res/values-vi/strings.xml b/doze/res/values-vi/strings.xml new file mode 100644 index 0000000..13b32fa --- /dev/null +++ b/doze/res/values-vi/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">Cử chỉ</string> + <string name="ambient_display_title">Hiển thị môi trường xung quanh</string> + <string name="ambient_display_enable_title">Hiển thị môi trường xung quanh</string> + <string name="ambient_display_enable_summary">Sáng màn hình khi nhận thông báo</string> + <string name="hand_wave_gesture_title">Vẫy tay</string> + <string name="hand_wave_gesture_summary">Kích hoạt thông báo về vẫy tay</string> + <string name="pocket_gesture_title">Túi</string> + <string name="pocket_gesture_summary">Kích hoạt thông báo về loại bỏ khỏi túi</string> +</resources> diff --git a/doze/res/values-zh-rCN/strings.xml b/doze/res/values-zh-rCN/strings.xml new file mode 100644 index 0000000..623696d --- /dev/null +++ b/doze/res/values-zh-rCN/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="screen_gestures_panel_title">手势</string> + <string name="ambient_display_title">环境显示</string> + <string name="ambient_display_enable_title">环境显示</string> + <string name="ambient_display_enable_summary">当接收到通知时唤醒屏幕</string> + <string name="hand_wave_gesture_title">挥手</string> + <string name="hand_wave_gesture_summary">挥动手时闪烁通知呼吸灯</string> + <string name="pocket_gesture_title">口袋</string> + <string name="pocket_gesture_summary">从口袋中拿出时闪烁通知呼吸灯</string> +</resources> diff --git a/doze/res/values/strings.xml b/doze/res/values/strings.xml new file mode 100644 index 0000000..1509e06 --- /dev/null +++ b/doze/res/values/strings.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Gesture shortcuts --> + <string name="screen_gestures_panel_title">Gestures</string> + + <string name="ambient_display_title">Ambient display</string> + + <string name="ambient_display_enable_title">Ambient display</string> + <string name="ambient_display_enable_summary">Wake screen when you receive notifications</string> + + <string name="hand_wave_gesture_title">Hand wave</string> + <string name="hand_wave_gesture_summary">Pulse notifications on hand wave</string> + + <string name="pocket_gesture_title">Pocket</string> + <string name="pocket_gesture_summary">Pulse notifications on removal from pocket</string> +</resources> diff --git a/doze/res/xml/gesture_panel.xml b/doze/res/xml/gesture_panel.xml new file mode 100644 index 0000000..a02ffec --- /dev/null +++ b/doze/res/xml/gesture_panel.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> + + <PreferenceCategory + android:key="ambient_display_key" + android:title="@string/ambient_display_title" > + + <SwitchPreference + android:key="ambient_display_enable" + android:defaultValue="true" + android:title="@string/ambient_display_enable_title" + android:summary="@string/ambient_display_enable_summary" /> + + <SwitchPreference + android:key="gesture_hand_wave" + android:defaultValue="false" + android:title="@string/hand_wave_gesture_title" + android:summary="@string/hand_wave_gesture_summary" /> + + <SwitchPreference + android:key="gesture_pocket" + android:defaultValue="false" + android:title="@string/pocket_gesture_title" + android:summary="@string/pocket_gesture_summary" /> + </PreferenceCategory> + +</PreferenceScreen> diff --git a/doze/src/com/cyanogenmod/settings/device/BootCompletedReceiver.java b/doze/src/com/cyanogenmod/settings/device/BootCompletedReceiver.java new file mode 100644 index 0000000..b9687f4 --- /dev/null +++ b/doze/src/com/cyanogenmod/settings/device/BootCompletedReceiver.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015 The CyanogenMod 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. + */ + +package com.cyanogenmod.settings.device; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.util.Log; + +public class BootCompletedReceiver extends BroadcastReceiver { + + private static final boolean DEBUG = false; + private static final String TAG = "MotoDoze"; + + @Override + public void onReceive(final Context context, Intent intent) { + if (DEBUG) Log.d(TAG, "Starting service"); + context.startService(new Intent(context, MotoDozeService.class)); + } + +} diff --git a/doze/src/com/cyanogenmod/settings/device/MotoDozeService.java b/doze/src/com/cyanogenmod/settings/device/MotoDozeService.java new file mode 100644 index 0000000..5f77b9e --- /dev/null +++ b/doze/src/com/cyanogenmod/settings/device/MotoDozeService.java @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2015 The CyanogenMod 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. + */ + +package com.cyanogenmod.settings.device; + +import android.app.Service; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.SharedPreferences; +import android.hardware.Sensor; +import android.hardware.SensorEvent; +import android.hardware.SensorEventListener; +import android.hardware.SensorManager; +import android.os.IBinder; +import android.os.PowerManager; +import android.preference.PreferenceManager; +import android.provider.Settings; +import android.util.Log; + +import java.util.ArrayList; +import java.util.List; + +public class MotoDozeService extends Service { + private static final String TAG = "MotoDozeService"; + private static final boolean DEBUG = false; + + private static final String GESTURE_HAND_WAVE_KEY = "gesture_hand_wave"; + private static final String GESTURE_POCKET_KEY = "gesture_pocket"; + + private static final int POCKET_DELTA_NS = 1000 * 1000 * 1000; + + private Context mContext; + private MotoProximitySensor mSensor; + private PowerManager mPowerManager; + private PowerManager.WakeLock mWakeLock; + + private boolean mHandwaveGestureEnabled = false; + private boolean mPocketGestureEnabled = false; + + class MotoProximitySensor implements SensorEventListener { + private SensorManager mSensorManager; + private Sensor mSensor; + + private boolean mSawNear = false; + private long mInPocketTime = 0; + + public MotoProximitySensor(Context context) { + mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); + mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); + } + + @Override + public void onSensorChanged(SensorEvent event) { + boolean isNear = event.values[0] < mSensor.getMaximumRange(); + if (mSawNear && !isNear) { + if (shouldPulse(event.timestamp)) { + launchDozePulse(); + } + } else { + mInPocketTime = event.timestamp; + } + mSawNear = isNear; + } + + @Override + public void onAccuracyChanged(Sensor sensor, int accuracy) { + /* Empty */ + } + + private boolean shouldPulse(long timestamp) { + long delta = timestamp - mInPocketTime; + + if (mHandwaveGestureEnabled && mPocketGestureEnabled) { + return true; + } else if (mHandwaveGestureEnabled && !mPocketGestureEnabled) { + return delta < POCKET_DELTA_NS; + } else if (!mHandwaveGestureEnabled && mPocketGestureEnabled) { + return delta >= POCKET_DELTA_NS; + } + return false; + } + + public void enable() { + if (mHandwaveGestureEnabled || mPocketGestureEnabled) { + mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_NORMAL); + } + } + + public void disable() { + mSensorManager.unregisterListener(this, mSensor); + } + } + + @Override + public void onCreate() { + if (DEBUG) Log.d(TAG, "MotoDozeService Started"); + mContext = this; + mPowerManager = (PowerManager)getSystemService(Context.POWER_SERVICE); + mSensor = new MotoProximitySensor(mContext); + mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MotoDozeWakeLock"); + SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(mContext); + loadPreferences(sharedPrefs); + sharedPrefs.registerOnSharedPreferenceChangeListener(mPrefListener); + if (!isInteractive() && isDozeEnabled()) { + mSensor.enable(); + } + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + if (DEBUG) Log.d(TAG, "Starting service"); + IntentFilter screenStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON); + screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF); + mContext.registerReceiver(mScreenStateReceiver, screenStateFilter); + return START_STICKY; + } + + @Override + public IBinder onBind(Intent intent) { + return null; + } + + private void launchDozePulse() { + mContext.sendBroadcast(new Intent("com.android.systemui.doze.pulse")); + } + + private boolean isInteractive() { + return mPowerManager.isInteractive(); + } + + private boolean isDozeEnabled() { + return Settings.Secure.getInt(mContext.getContentResolver(), + Settings.Secure.DOZE_ENABLED, 1) != 0; + } + + private void onDisplayOn() { + if (DEBUG) Log.d(TAG, "Display on"); + mSensor.disable(); + if (isDozeEnabled() && !mWakeLock.isHeld()) { + if (DEBUG) Log.d(TAG, "Acquiring wakelock"); + mWakeLock.acquire(); + } + } + + private void onDisplayOff() { + if (DEBUG) Log.d(TAG, "Display off"); + if (isDozeEnabled()) { + mSensor.enable(); + } + if (mWakeLock.isHeld()) { + if (DEBUG) Log.d(TAG, "Releasing wakelock"); + mWakeLock.release(); + } + } + + private void loadPreferences(SharedPreferences sharedPreferences) { + mHandwaveGestureEnabled = sharedPreferences.getBoolean(GESTURE_HAND_WAVE_KEY, false); + mPocketGestureEnabled = sharedPreferences.getBoolean(GESTURE_POCKET_KEY, false); + } + + private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) { + onDisplayOff(); + } else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) { + onDisplayOn(); + } + } + }; + + private SharedPreferences.OnSharedPreferenceChangeListener mPrefListener = + new SharedPreferences.OnSharedPreferenceChangeListener() { + @Override + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + if (GESTURE_HAND_WAVE_KEY.equals(key)) { + mHandwaveGestureEnabled = sharedPreferences.getBoolean(GESTURE_HAND_WAVE_KEY, false); + } else if (GESTURE_POCKET_KEY.equals(key)) { + mPocketGestureEnabled = sharedPreferences.getBoolean(GESTURE_POCKET_KEY, false); + } + + if (isDozeEnabled() && !mWakeLock.isHeld()) { + if (DEBUG) Log.d(TAG, "Acquiring wakelock"); + mWakeLock.acquire(); + } + } + }; +} diff --git a/doze/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java b/doze/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java new file mode 100644 index 0000000..a13cc08 --- /dev/null +++ b/doze/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2015 The CyanogenMod 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. + */ + +package com.cyanogenmod.settings.device; + +import org.cyanogenmod.internal.util.ScreenType; + +import android.app.ActionBar; +import android.os.Bundle; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.SwitchPreference; +import android.provider.Settings; +import android.view.Menu; +import android.view.MenuItem; + +public class TouchscreenGestureSettings extends PreferenceActivity { + + private static final String KEY_AMBIENT_DISPLAY_ENABLE = "ambient_display_enable"; + private static final String KEY_GESTURE_POCKET = "gesture_pocket"; + private static final String KEY_GESTURE_HAND_WAVE = "gesture_hand_wave"; + + private SwitchPreference mAmbientDisplayPreference; + private SwitchPreference mPocketPreference; + private SwitchPreference mHandwavePreference; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + addPreferencesFromResource(R.xml.gesture_panel); + boolean dozeEnabled = isDozeEnabled(); + mAmbientDisplayPreference = + (SwitchPreference) findPreference(KEY_AMBIENT_DISPLAY_ENABLE); + // Read from DOZE_ENABLED secure setting + mAmbientDisplayPreference.setChecked(dozeEnabled); + mAmbientDisplayPreference.setOnPreferenceChangeListener(mAmbientDisplayPrefListener); + mPocketPreference = + (SwitchPreference) findPreference(KEY_GESTURE_POCKET); + mPocketPreference.setEnabled(dozeEnabled); + mHandwavePreference = + (SwitchPreference) findPreference(KEY_GESTURE_HAND_WAVE); + mHandwavePreference.setEnabled(dozeEnabled); + + final ActionBar bar = getActionBar(); + bar.setDisplayHomeAsUpEnabled(true); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + onBackPressed(); + return true; + } + return false; + } + + @Override + protected void onResume() { + super.onResume(); + + // If running on a phone, remove padding around the listview + if (!ScreenType.isTablet(this)) { + getListView().setPadding(0, 0, 0, 0); + } + } + + private boolean enableDoze(boolean enable) { + return Settings.Secure.putInt(getContentResolver(), + Settings.Secure.DOZE_ENABLED, enable ? 1 : 0); + } + + private boolean isDozeEnabled() { + return Settings.Secure.getInt(getContentResolver(), + Settings.Secure.DOZE_ENABLED, 1) != 0; + } + + private Preference.OnPreferenceChangeListener mAmbientDisplayPrefListener = + new Preference.OnPreferenceChangeListener() { + @Override + public boolean onPreferenceChange(Preference preference, Object newValue) { + boolean enable = (boolean) newValue; + boolean ret = enableDoze(enable); + if (ret) { + mPocketPreference.setEnabled(enable); + mHandwavePreference.setEnabled(enable); + } + return ret; + } + }; +} |
