diff --git a/res/layout-land/dialog_battery_settings.xml b/res/layout-land/dialog_battery_settings.xml
new file mode 100644
index 000000000..330a7d887
--- /dev/null
+++ b/res/layout-land/dialog_battery_settings.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-land/dialog_color_picker.xml b/res/layout-land/dialog_color_picker.xml
new file mode 100644
index 000000000..334f76f6d
--- /dev/null
+++ b/res/layout-land/dialog_color_picker.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-land/dialog_light_settings.xml b/res/layout-land/dialog_light_settings.xml
new file mode 100644
index 000000000..e4ec129c3
--- /dev/null
+++ b/res/layout-land/dialog_light_settings.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/app_item.xml b/res/layout/app_item.xml
new file mode 100644
index 000000000..9d116a4d9
--- /dev/null
+++ b/res/layout/app_item.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/dialog_battery_settings.xml b/res/layout/dialog_battery_settings.xml
index cea2c90a9..0792d54d9 100644
--- a/res/layout/dialog_battery_settings.xml
+++ b/res/layout/dialog_battery_settings.xml
@@ -12,85 +12,63 @@
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. -->
-
-
-
+ limitations under the License.
+-->
+
-
+ android:layout_marginEnd="10dp"
+ android:layout_marginStart="10dp" />
-
-
+ android:maxLength="6" />
-
-
-
-
-
+
-
-
-
-
-
-
-
+ android:layout_gravity="center_vertical"
+ android:layout_weight="0.5" />
+
-
+
diff --git a/res/layout/dialog_color_picker.xml b/res/layout/dialog_color_picker.xml
new file mode 100644
index 000000000..e6113826b
--- /dev/null
+++ b/res/layout/dialog_color_picker.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/dialog_light_settings.xml b/res/layout/dialog_light_settings.xml
index e619ceb71..d185ceea6 100644
--- a/res/layout/dialog_light_settings.xml
+++ b/res/layout/dialog_light_settings.xml
@@ -12,131 +12,100 @@
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. -->
-
-
-
+ limitations under the License.
+-->
+
-
+ android:layout_marginEnd="10dp"
+ android:layout_marginStart="10dp" />
-
-
+ android:maxLength="6" />
-
-
-
-
-
+
-
-
-
-
-
-
-
+ android:layout_gravity="center_vertical"
+ android:layout_weight="0.5" />
+
-
-
-
-
-
+ android:paddingBottom="5dip" >
-
-
-
-
+
diff --git a/res/layout/preference_application_light.xml b/res/layout/preference_application_light.xml
index 72b8e1b8c..152bacd57 100644
--- a/res/layout/preference_application_light.xml
+++ b/res/layout/preference_application_light.xml
@@ -5,7 +5,7 @@
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
android:paddingStart="5dp"
- android:paddingEnd="?android:attr/scrollbarSize"
+ android:paddingEnd="@dimen/color_preference_end"
android:background="?android:attr/selectableItemBackground" >
diff --git a/res/layout/preference_battery_light.xml b/res/layout/preference_battery_light.xml
index a1d77c843..99d3583e3 100644
--- a/res/layout/preference_battery_light.xml
+++ b/res/layout/preference_battery_light.xml
@@ -5,7 +5,7 @@
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
android:paddingStart="5dp"
- android:paddingEnd="?android:attr/scrollbarSize"
+ android:paddingEnd="@dimen/color_preference_end"
android:background="?android:attr/selectableItemBackground" >
diff --git a/res/layout/preference_color_picker.xml b/res/layout/preference_color_picker.xml
new file mode 100644
index 000000000..99d3583e3
--- /dev/null
+++ b/res/layout/preference_color_picker.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/preference_number_picker_dialog.xml b/res/layout/preference_number_picker_dialog.xml
new file mode 100644
index 000000000..6dac6dc93
--- /dev/null
+++ b/res/layout/preference_number_picker_dialog.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
diff --git a/res/values-ca/custom_strings.xml b/res/values-ca/custom_strings.xml
new file mode 100644
index 000000000..9cca110e3
--- /dev/null
+++ b/res/values-ca/custom_strings.xml
@@ -0,0 +1,575 @@
+
+
+
+
+ OK
+ reinicialitzar
+
+ Barres i menús
+ Pantalla activa
+ Barra d\'estat
+ Barra de navegació
+ Estil de la bateria
+ Control de brillantor
+ Ajust de la brillantor lliscant a través de la barra d\'estat
+ Brillantor automàtica està activada
+ Estil de l\'estat del senyal
+ Icona
+ Ocult
+ Texte
+ Percentatge
+ Cercle
+ Cercle amb percentatge
+ Recompte de notificacions
+ Mostra el número de notificacions pendents
+
+
+ Triar font de la icona
+ Icones del sistema
+ Galeria
+ Pack d\'icones
+
+ Aplicacions
+ Trieu aplicació
+ Afegir
+
+
+ Edita la configuració de llum
+ Durada de l\'impuls i la velocitat
+ Color
+ Normal
+ Personalitzat
+ Prova
+ Esborrar
+ ¿Eliminar l\'element seleccionat?
+ Apagar la pantalla per veure la notificació seleccionada en l\'acció o descartar aquesta caixa de diàleg per aturar la prova
+ Descartar
+
+
+ Habilitar
+ General
+ Aplicacions
+ Telèfon
+ Utilitza valors personalitzats
+ Habilitat
+ Deshabilitat
+ Per defecte
+ Trucada perduda
+ Correu de veu
+ Mostra quan la pantalla està activa
+
+
+ Sempre actiu
+ Molt curt
+ Curt
+ Normal
+ Llarg
+ Molt llarg
+ Molt ràpid
+ Ràpid
+ Normal
+ Lent
+ Molt lent
+
+ Verd
+ Vermell
+
+
+ Habilitat
+ Pols si la bateria baixa
+ Colors
+ Bateria baixa
+ Carregant
+ Carregat (90%)
+ Carregat (100%)
+ Edita la configuració de la bateria
+
+
+ Configuració de la lluminositat
+ Valor actual de la pantalla: %d
+ Valor actual del botó: %d
+
+ Ajust de sensibilitat
+ Mitjà
+ Molt baix
+ Baix
+ Mitjà
+ Alt
+ Molt alt
+
+ Pantalla
+ Nivells automàtics
+ Nivells de brillantor de la pantalla per la manera automàtica
+ Nivells automàtics
+ Nivells de brillantor del botó en mode automàtic
+ Mode fosc
+ No ajustar la brillantor botó
+ Enllaç a la pantalla
+ Utilitza el mateix valor que la pantalla per la brillantor dels botons
+ Nivell manual
+ Nivell de brillantor del botó per a la manera manual
+ Brillantor del botó en manual
+
+ Brillantor automàtica
+ Valor actual del sensor de llum: %d lux
+ Nivells de brillantor automàtica
+ %1$d
+ %1$d+
+ Ajustar
+ Tancar
+ Reiniciar
+ Dividir nivell de brillantor
+ Nivell de brillantor
+ Lluminositat ambiental (lux)
+ Brillo
+ ¿Reiniciar nivells?
+ Tots els nivells de brillantor es restabliran als valors per defecte.
+ Dividir posició (entre %1$d i %2$d lux)
+ Opcions de nivell de llum
+ Edita
+ Dividir
+ Eliminar
+ Sensor
+ Temps d\'espera
+ Desactivat en el valor 0
+ Botó de brillantor
+ Botó ajustos de brillantor
+
+
+ Volum
+ Botó activar
+ Al prende un botó de volum despertarà el dispositiu
+ Control de la música
+ Pulsació llarga per canviar entre cançons amb la pantalla apagada
+ Auriculars
+ Auriculars llança veu
+ En prémer el botó de l\'auricular llançarà controls de veu
+
+
+ Trànsit de xarxa
+ Monitor de trànsit a barra d\'estat
+ Unitats
+ Interval d\'actualització
+ Desactivat
+ Sortint
+ Entrant
+ Sortint y entrant
+ Bits per segon
+ Bytes per segon
+ 500 ms
+ 1000 ms
+ 1500 ms
+ 2000 ms
+
+
+ Indicadors d\'activitat
+ Mostra indicadors en barres de senyal
+
+
+ Botons
+ Accions dels botons
+ Botó enrere
+ Botó inici
+ Botó menú
+ Botó cercar
+ Botó canvi d\'aplicació
+ Accions personalitzades
+ Botó enrere
+ Botó enrere (pulsació llarga)
+ Botó inici
+ Botó inici (pulsació llarga)
+ Botó inici (doble pulsació)
+ Botó menú
+ Botó menú (pulsació llarga)
+ Botó recerca
+ Botó recerca (pulsació llarga)
+ Botó canvi d\'aplicació
+ Botó canvi d\'aplicació (pulsació llarga)
+ Cap acció
+ Menú obrir/tancar
+ Aplicacions recents
+ Assistent de recerca
+ Cerca per veu
+ Cerca dins de l\'aplicació
+ Botó inici
+ Botó enrere
+ Canviar a l\'última aplicació
+ Matar aplicació
+ Anar a dormir
+ Pulsació normal
+ Pulsació llarga
+ Doble pulsació
+ Sense acció
+ Vostè no té assignada una acció al botó de \"Inici\"! Això pot fer que el dispositiu sigui inservible!
+ Vibra en tocar
+ Depèn de \"Vibra en tocar\" en la configuració de so
+ Mostra la barra de navegació
+ Forçar activar barra de navegació
+ Desactivar tecles
+ Forçar desactivar tecles
+
+
+ Menú d\'encesa
+ Captura de pantalla
+ Mostra opció per capturar la pantalla en menú d\'encesa
+ Gravar la pantalla
+ Mostra opció per gravar la pantalla a través de menús d\'encesa
+ Dades mòbils
+ Mostra opció de dades mòbils al menú d\'encesa
+ Mode avió
+ Mostra opció de mode avió al menú d\'encesa
+ Commutar so
+ Mostra opció de mode avió al menú d\'encesa
+
+
+ Pantalla activa
+ Canviar la configuració de pantalla activa
+ Habilitar
+ Pantalla activa habilitada
+ Pantalla activa deshabilitada
+ Mode drecera
+ Mode butxaca llançarà la pantalla de bloqueig quan no hi ha notificacions i està habilitada la seguretat
+ Text de la notificació
+ Mostra el text de la notificació entorn a l\'anell
+ Vista de notificació personalitzada
+ Utilitza l\'estil de pantalla activa per als detalls de notificació
+ Notificacions menys freqüents
+ Limita el nombre de notificacions a una vegada per període de temps
+ Doble pulsació per dormir
+ Apaga la pantalla amb doble pulsació
+ Ajustos de \"Shake\"
+ Agitar per tornar a mostrar
+ Agitar el dispositiu per tornar a mostrar les notificacions
+ Esdeveniment predeterminat
+ Després de rebre la notificació no s\'executarà la pantalla activa fins que l\'usuari agiti el dispositiu
+ Intensitat
+ Intensitat de la sacsejada necessària per mostrar notificacions
+ Temps d\'espera
+ Segons que \"Shake\" està actiu després de rebre una notificació, 0 significa sempre actiu.
+ Ignorar \"Quiet Hours\"
+ Permet agitar durant hores en silenci
+ Interval
+ Temps mínim entre moviments consecutius
+ Mostra en curs
+ Mostra notificacions no eliminables
+ Amagar baixa prioritat
+ Amagar notificacions marcades com de baixa prioritat
+ Mode butxaca
+ Mostra notificacions pendents després de treure l\'aparell de la seva butxaca
+ Tornar a visualitzar notificacions
+ Temps d\'espera per tornar a visualitzar
+ Temps d\'espera per al llindar de proximitat
+ Temps que el sensor de proximitat ha d\'estar cobert abans d\'activar la pantalla
+ Brillantor de la pantalla
+ Configuració avançada
+ Aplicacions excloses
+ Cap notificació seran mostrades per aquestes aplicacions
+ Mode de privacitat
+ Mostra els detalls per a les notificacions d\'aquestes aplicacions
+ Mostra data
+ Mostra AM/PM
+ Mode de llum del sol
+ S\'utilitza en el control de brillantor manual
+ Mostrar la data sobre el rellotge
+ Mostra l\'indicador AM / PM quan s\'utilitza el format de 12 hores
+ Invertir colors en ambient lluminós
+ Apagat automàtic
+ Apagar després de encendre en mode butxaca i tornar a la butxaca
+ Mai
+ 1 minut
+ 5 minuts
+ 15 minuts
+ 30 minuts
+ 1 hora
+ 2 hores
+ 5 hores
+ 3 segons
+ 5 segons
+ 8 segons
+ 10 segons
+ 15 segons
+ 25 segons
+ Immediat
+ 1 segon
+ 2 segons
+ 3 segons
+ 4 segons
+ 5 segons
+ Apagat
+ Notificacions només
+ Sempre
+
+ Vista recents
+
+
+ Botó per esborrar tot
+ Mostra un botó per esborrar tot a la vista d\'aplicacions recents
+ Posició del botó per esborrar tot
+ Trieu la posició del botó
+ Dalt a l\'esquerra
+ Dalt a la dreta
+ Baix a l\'esquerra
+ Baix a la dreta
+
+
+ Indicador de memòria
+ Mostra un indicador de memòria a la vista d\'aplicacions recents
+ Posició de l\'indicador de memòria
+ Trieu la posició de l\'indicador de memòria
+
+
+ Tauler de notificacions
+ Capçalera contextual
+ Estableix una imatge de fons basada en la data i hora actuals
+
+
+ Cap
+ Trucada
+ Multimèdia
+ Volum per defecte
+ Trieu quin volum es canvia per defecte
+
+
+ Botons i disseny
+ Configurar botons de la barra de navegació
+ 1 - Per iniciar l\'edició, toc a la icona de bloqueig \n\n2 - Premeu qualsevol botó per assignar o canviar la funcionalitat \n\n3 - Premeu qualsevol botó per canviar l\'ordre \n\n4 - Per guardar, premeu el icona de bloqueig de nou \n\n5 - per restaurar els valors per defecte del sistema, premeu el botó de reinici \n\n
+ \u2022 Les accions només es poden assignar a un botó a la vegada\n\n\u2022 El botó d\'inici no pot ser reassignat\n\n\u2022 Botons laterals no poden ser reorganitzats
+ Consells ràpids
+ ¿Esborrar els paràmetres actuals i restaurar els valors predeterminats?
+ Configuració de la barra de navegació guardada
+ Restablerts valors de la barra de navegació
+ Editable
+ Bloquejat
+
+
+ Dreceres d\'inici ràpid
+ Configura dreceres de la barra de navegació personalitzada
+ ¿Eliminar tots els accessos directes de la barra de navegació creats per l\'usuari i restaurar els valors predeterminats?
+ Restablir valors predeterminats dels accessos directes de la barra de navegació
+ Obrir canvi d\'IME
+ Matar aplicació
+ Cap
+ Capturar pantalla
+ Trucada/Vibració
+ Trucada/Silenci
+ Trucada/Vibració/Silenci
+ Apagar pantalla
+ Conmuntar torxa
+ Google Now
+ Trieu l\'acció
+ Canviar a l\'última aplicació
+
+
+ Arrossegueu el control lliscant per assignar accessos directes
+ Dreceres del control lliscant
+ Veure o canviar els accessos directes personalitzats de la pantalla de bloqueig
+ Restablir valors predeterminats de les dreceres a la pantalla de bloqueig
+ Reinicialitzar
+ ¿Eliminar tots els accessos directes de la pantalla de bloqueig creats per l\'usuari i restaurar els valors predeterminats?
+ Buit
+ Edita accés directe i la icona
+ Seleccionar o canviar l\'aplicació o activitat desitjada i la icona associada
+
+
+ Activitats
+ Selecciona aplicació personalitzada
+ Selecciona activitat personalitzada
+ Seleccioneu la icona
+ Alarma
+ Navegador
+ Calendari
+ Càmera
+ Chrome
+ Contactes
+ Email
+ Email Holo
+ Facebook
+ Galleria
+ Gmail
+ Google (petit)
+ Google Plus
+ Hangouts
+ Maps
+ Pel·lícula
+ Música
+ Navegació
+ Telèfon
+ Podcast
+ Rss
+ Cerca
+ Snapchat
+ SMS
+ Twitter
+
+ Ajustos ràpids
+
+
+ Ajustaments ràpids configurables
+ Activar/desactivar canvis dinàmics
+
+
+ Accés ràpid
+ Ajustaments ràpids desplegables amb un dit
+ Desactivat
+ Centre
+ Esquerra
+ Dreta
+
+
+ Accés intel·ligent
+ Obriu els ajustaments ràpids quan no hi ha notificacions presents
+ Desactivat
+ Si no hi ha notificacions eliminables
+ Si no hi ha notificacions
+
+
+ Control del cursor
+ Esquerra/dreta
+ Dreta/esquerra
+
+
+ Lliscat ràpid
+ Lliscar per canviar ràpidament entre els ajustaments ràpids i tauler de notificacions
+
+
+ Pulsació llarga per matar aplicació
+ Pulsació llarga matarà aplicació en primer pla
+
+
+ Paquets de so
+ Instal·lar paquets de so
+ Instal·lar nous paquets de so afegits a la carpeta Soundpacks en la memòria interna
+ Seleccioneu el paquet de so
+ Seleccioneu el paquet de so actiu
+ Per defecte (Sistema)
+ Error instal·lant paquet de so
+
+ OmniSwitch
+ Ús per recents
+ Utilitza OmniSwitch en lloc de la vista per defecte
+ Configuració
+ Obre la configuració de OmniSwitch
+ Avís
+ OmniSwitch no està instal·lat
+ OmniSwitch no està instal·lat
+ Informació
+ Assegureu-vos que ha habilitat OmniSwitch. Vostè pot fer això mitjançant l\'ús de \"Configuració\".
+
+ Emular la tecla de menú de hardware
+ Força l\'ocultació del menú de tres punts en les aplicacions. Requereix reinici de l\'aplicació
+
+ Mostra el menú de tres punts
+ Força la visualització del menú de tres punts en les aplicacions. Requereix reinici de l\'aplicació
+
+
+ Rellotge i data
+ Estil del rellotge i data
+ Alineació
+ Activat
+ Desactivat
+ Color
+ Restaurar color
+ Mostra rellotge i data
+ AM/PM
+ Rellotge de 24 hores està habilitat
+ Dia de la setmana
+ Dia abreujat de la setmana abans de l\'hora
+ Rellotge a la dreta
+ Rellotge centrat
+ No mostrar
+ Data
+ Veure dates personalitzat abans que el rellotge
+ Estil de la data
+ Format de la data
+ Mida normal de la font
+ Mida petita de la font
+ No mostrar
+ No mostrar
+ Mida petita de la font
+ Mida normal de la font
+ Normal
+ Minúscules
+ Mayúscules
+
+
+ Indicar bateria en l\'anell de desbloqueig
+
+
+ Widgets
+ Privacitat
+ Fons
+ Més
+
+
+ Maximitzar
+ Càmera
+ Activar widget de la càmera
+
+
+ Menú d\'encesa
+ Activar menú d\'encesa
+
+
+ Veure a través
+ Les seves dades poden ser visibles per als que l\'envolten
+ Difuminar contingut
+ Intensitat de l\'efecte de difuminat
+ Wallpaper
+ L\'efecte \'veure a través\' ha de ser desactivat
+
+
+ Dimensions
+ Configurar l\'ample i l\'altura de la barra de navegació
+ ¿Restablir totes les entrades a les dimensions per defecte?
+ Alçada de la barra de navegació
+ Alçada de la barra de navegació en la manera retrat.
+ Alçada de la barra de navegació en la manera paisatge
+ Alçada de la barra de navegació en la manera paisatge.
+ Ample de la barra de navegació
+ Alçada de la barra de navegació si la barra està al llarg d\'un costat
+ 42 dp (predeterminat)
+ 36 dp
+ 30 dp
+ 24 dp
+ 48 dp (predeterminat)
+ 44 dp
+ 40 dp
+ 42 dp
+ 0 dp (apagat)
+
+
+ Dreceres de capçalera
+ Tiemps
+ Data
+ Predeterminat
+
+ Color
+
+
+ Voltejar botons de volum
+ Voltejar botons de volum segons la posició del terminal
+ Configuració de rotació avançades
+ Tancar
+ Deshabilitar a 90 graus
+ Deshabilitar a 270 graus
+
+
+ Mode inmersiu
+ Desactivar mode inmersiu
+
diff --git a/res/values-cs/custom_strings.xml b/res/values-cs/custom_strings.xml
index c334a099c..6df15dba0 100644
--- a/res/values-cs/custom_strings.xml
+++ b/res/values-cs/custom_strings.xml
@@ -117,7 +117,7 @@
Úrovně jasu obrazovky automatického režimu
Automatické úrovně
Úrovně jasu tlačítka automatického režimu
- Tlačítka
+ Tlačítka
Tmavý režim
Nenastavovat jas tlačítka
Odkaz na obrazovce
@@ -395,4 +395,15 @@
Dlouhým stiskem tlačítka zpět vynutit ukončení aplikace
Dlouhým stiskem tlačítka zpět vynutíte ukončení aplikace v popředí
+
+ Baterie kolem odemykacího kruhu
+
+
+ Widget fotoaparátu
+ Zobrazit widget fotoaparátu vpravo od obrazovky odmeknutí
+
+
+ Povolit nabídku Vypnout
+ Zobrazit nabídku Vypnout při zamčené obrazovce
+
diff --git a/res/values-de/custom_strings.xml b/res/values-de/custom_strings.xml
index 602a244a5..833ecaf3b 100644
--- a/res/values-de/custom_strings.xml
+++ b/res/values-de/custom_strings.xml
@@ -118,7 +118,7 @@
Helligkeitsstufen für Automodus
Automatische Stufen
Tastenhelligkeit im Automodus
- Tasten
+ Tasten
Dunkler Modus
Tastenhelligkeit nicht einstellen
Mit Bildschirm verknüpfen
@@ -385,6 +385,23 @@
Nachrichten
Twitter
+
+ Farben
+ Dynamischer Farbwechsel
+ Farbe ändern an
+ Deaktiviert
+ Aktionsleistenfarbe
+ Bildschirmfarbe
+ Statusleiste
+ Navigationsleiste
+ Beide
+ Farben umkehren
+ Umkehren der Farben einschalten
+ Farbe der Navigationsleiste
+ Aktuelle Farbe zur Navigationsleiste hinzufügen
+ Deckkraft der Statusleiste
+ Deckkraft der Navigationsleiste
+
Schnelleinstellungen konfigurierbar
Aktivieren/Deaktivieren dynamischer Zeilenänderungen
@@ -470,4 +487,21 @@
Normal
Kleinbuchstaben
Großbuchstaben
+
+ Sperrbildschirm Widgets maximieren
+
+
+ Kamera-Widget
+ Nach rechts wischen, um Kamera-Widget zu zeigen
+
+
+ Ausschalt-Menü aktivieren
+ Ausschalt-Menü anzeigen, wenn der Bildschirm gesperrt ist
+
+
+ Durchsichtig
+ Zeigt den Inhalt hinter dem Sperrbildschirm. Daten könnten für umstehende sichtbar sein.
+
+
+ Batteriestatus um Entsperrsysmbol
diff --git a/res/values-el/custom_strings.xml b/res/values-el/custom_strings.xml
new file mode 100644
index 000000000..dcfafdf90
--- /dev/null
+++ b/res/values-el/custom_strings.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ Μπαταρία γύρω από δακτύλιο ξεκλειδώματος
+
+
diff --git a/res/values-es/custom_strings.xml b/res/values-es/custom_strings.xml
new file mode 100644
index 000000000..f83cbabc4
--- /dev/null
+++ b/res/values-es/custom_strings.xml
@@ -0,0 +1,575 @@
+
+
+
+
+ OK
+ Reinicializar
+
+ Barras y menús
+ Pantalla activa
+ Barra de estado
+ Barra de navegación
+ Estilo de la batería
+ Control de brillo
+ Ajuste el brillo deslizando a través de la barra de estado
+ Brillo automático está activado
+ Estilo del estado de la señal
+ Icono
+ Oculto
+ Texto
+ Porcentaje
+ Círculo
+ Círculo con porcentaje
+ Recuento de notificaciones
+ Muestra el número de notificaciones pendientes
+
+
+ Elegir fuente del icono
+ Iconos del sistema
+ Galería
+ Pack de iconos
+
+ Aplicaciones
+ Elija aplicación
+ Añadir
+
+
+ Editar la configuración de luz
+ Duración del impulso y la velocidad
+ Color
+ Normal
+ Personalizado
+ Prueba
+ Borrar
+ ¿Eliminar el elemento seleccionado?
+ Apagar la pantalla para ver la notificación seleccionada en la acción o descartar este cuadro de diálogo para detener la prueba
+ Descartar
+
+
+ Habilitar
+ General
+ Aplicaciones
+ Teléfono
+ Usar valores personalizados
+ Habilitado
+ Deshabilitado
+ Predeterminado
+ LLamada perdida
+ Correo de voz
+ Mostrar cuando la pantalla está activa
+
+
+ Siempre activo
+ Muy corto
+ Corto
+ Normal
+ Largo
+ Muy largo
+ Muy rápido
+ Rapido
+ Normal
+ Lento
+ Muy lento
+
+ Verde
+ Rojo
+
+
+ Habilitado
+ Pulso si la batería baja
+ Colores
+ Batería baja
+ Cargando
+ Cargado (90%)
+ Cargado (100%)
+ Editar la configuración de la batería
+
+
+ Configuración de la luminosidad
+ Valor actual de la pantalla: %d
+ Valor actual del botón: %d
+
+ Ajuste de sensibilidad
+ Medio
+ Muy bajo
+ Bajo
+ Medio
+ Alto
+ Muy alto
+
+ Pantalla
+ Niveles automáticos
+ Niveles de brillo de la pantalla para el modo automático
+ Niveles automáticos
+ Niveles de brillo del botón en modo automático
+ Modo oscuro
+ No ajustar el brillo del botón
+ Enlace a la pantalla
+ Usar el mismo valor que la pantalla para el brillo de los botones
+ Nivel manual
+ Nivel de brillo del botón para el modo manual
+ Brillo del botón en manual
+
+ Brillo automático
+ Valor actual del sensor de luz: %d lux
+ Niveles de brillo automático
+ %1$d
+ %1$d+
+ Ajustar
+ Cerrar
+ Reiniciar
+ Dividir nivel de brillo
+ Nivel de brillo
+ Luminosidad ambiental (lux)
+ Brillo
+ ¿Reiniciar niveles?
+ Todos los niveles de brillo se restablecerán a sus valores predeterminados.
+ Dividir posicion (entre %1$d y %2$d lux)
+ Opciones de nivel de luz
+ Editar
+ Dividir
+ Eliminar
+ Sensor
+ Tiempo de espera
+ Deshabilitado en el valor 0
+ Botón de brillo
+ Botón ajustes de brillo
+
+
+ Volumen
+ Botón activar
+ Al pulsar un botón de volumen despertará el dispositivo
+ Control de la música
+ Pulsación larga para cambiar entre canciones con la pantalla apagada
+ Auriculares
+ Auriculares lanza voz
+ Al pulsar el botón del auricular lanzará controles de voz
+
+
+ Tráfico de red
+ Monitor de tráfico en barra de estado
+ Unidades
+ Intervalo de actualización
+ Desactivado
+ Saliente
+ Entrante
+ Saliente y entrante
+ Bits por segundo
+ Bytes por segundo
+ 500 ms
+ 1000 ms
+ 1500 ms
+ 2000 ms
+
+
+ Indicadores de actividad
+ Mostrar indicadores en barras de señal
+
+
+ Botones
+ Acciones de los botones
+ Botón atrás
+ Botón inicio
+ Botón menú
+ Botón buscar
+ Botón cambio de aplicación
+ Acciones personalizadas
+ Botón atrás
+ Botón atrás (pulsación larga)
+ Botón inicio
+ Botón inicio (pulsación larga)
+ Botón inicio (doble pulsación)
+ Botón menú
+ Botón menú (pulsación larga)
+ Botón búsqueda
+ Botón búsqueda (pulsación larga)
+ Botón cambio de aplicación
+ Botón cambio de aplicación (pulsación larga)
+ Ninguna acción
+ Menú abrir/cerrar
+ Aplicaciones recientes
+ Asistente de búsqueda
+ Búsqueda por voz
+ Búsqueda dentro de la aplicación
+ Botón inicio
+ Botón atrás
+ Cambiar a la última aplicación
+ Matar aplicación
+ Ir a dormir
+ Pulsación normal
+ Pulsación larga
+ Doble pulsación
+ Sin acción
+ Usted no tiene asignada una acción al botón de \"Inicio\"! Esto puede hacer que el dispositivo sea inservible!
+ Vibrar al tocar
+ Depende de \"Vibrar al tocar\" en la configuración de sonido
+ Mostrar barra de navegación
+ Forzar activar barra de navegación
+ Desactivar teclas
+ Forzar desactivar teclas
+
+
+ Menú de encendido
+ Captura de pantalla
+ Mostrar opción para capturar la pantalla en menú de encendido
+ Grabar la pantalla
+ Mostrar opción para grabar la pantalla en menú de encendido
+ Datos móviles
+ Mostrar opción de datos móviles en el menú de encendido
+ Modo avión
+ Mostrar opción de modo avión en el menú de encendido
+ Conmutar sonido
+ Mostrar opción de modo avión en el menú de encendido
+
+
+ Pantalla activa
+ Cambiar la configuración de pantalla activa
+ Habilitar
+ Pantalla activa habilitada
+ Pantalla activa deshabilitada
+ Modo atajo
+ Modo bolsillo lanzará la pantalla de bloqueo cuando no existen notificaciones y está habilitada la seguridad
+ Texto de la notificación
+ Mostrar el texto de la notificación entorno al anillo
+ Vista de notificación personalizada
+ Usar el estilo de pantalla activa para los detalles de notificación
+ Notificaciones menos frecuentes
+ Limita el número de notificaciones a una vez por período de tiempo
+ Doble pulsación para dormir
+ Apaga la pantalla con doble pulsación
+ Ajustes de \"Shake\"
+ Agitar para volver a mostrar
+ Agitar el dispositivo para volver a mostrar las notificaciones
+ Evento predeterminado
+ Después de recibir la notificación no se ejecutará la pantalla activa hasta que el usuario agite el dispositivo
+ Intensidad
+ Intensidad de la sacudida necesaria para mostrar notificaciones
+ Tiempo de espera
+ Segundos que \"Shake\" está activo después de recibir una notificación, 0 significa siempre activo.
+ Ignorar \"Quiet Hours\"
+ Permite agitar durante horas en silencio
+ Intérvalo
+ Tiempo mínimo entre movimientos consecutivos
+ Mostrar en curso
+ Mostrar notificaciones no eliminables
+ Ocultar baja prioridad
+ Ocultar notificaciones marcadas como de baja prioridad
+ Modo bolsillo
+ Mostrar notificaciones pendientes después de sacar el aparato de su bolsillo
+ Volver a visualizar notificaciones
+ Tiempo de espera para volver a visualizar
+ Tiempo de espera para umbral de proximidad
+ Tiempo que el sensor de proximidad debe estar cubierto antes de activar la pantalla
+ Brillo de la pantalla
+ Ajustes avanzados
+ Aplicaciones excluidas
+ Ninguna notificación será mostrada para estas aplicaciones
+ Modo de privacidad
+ No mostrar detalles para las notificaciones de estas aplicaciones
+ Mostrar fecha
+ Mostrar AM/PM
+ Modo de luz del sol
+ Se utiliza en el control de brillo manual
+ Mostrar la fecha sobre el reloj
+ Mostrar indicador AM / PM cuando se utiliza el formato de 12 horas
+ Invertir colores en ambiente luminoso
+ Apagado automático
+ Apagar después de encenderse en modo bolsillo y volver al bolsillo
+ Nunca
+ 1 minuto
+ 5 minutos
+ 15 minutos
+ 30 minutos
+ 1 hora
+ 2 horas
+ 5 horas
+ 3 segundos
+ 5 segundos
+ 8 segundos
+ 10 segundos
+ 15 segundos
+ 25 segundos
+ Inmediato
+ 1 segundo
+ 2 segundos
+ 3 segundos
+ 4 segundos
+ 5 segundos
+ Apagado
+ Notificaciones sólo
+ Siempre
+
+ Vista recientes
+
+
+ Botón para borrar todo
+ Muestra un botón para borrar todo en la vista de aplicaciones recientes
+ Posición del boton para borrar todo
+ Elija la posición del botón
+ Arriba a la izquierda
+ Arriba a la derecha
+ Abajo a la izquierda
+ Abajo a la derecha
+
+
+ Indicador de memoria
+ Muestra un indicador de memoria en la vista de aplicaciones recientes
+ Posición del indicador de memoria
+ Elija la posición del indicador de memoria
+
+
+ Panel de notificaciones
+ Encabezado contextual
+ Establece una imagen de fondo basada en la fecha y hora actuales
+
+
+ Ninguno
+ LLamada
+ Multimedia
+ Volumen por defecto
+ Elija qué volumen se cambia de forma predeterminada
+
+
+ Botones y diseño
+ Configurar botones de la barra de navegación
+ 1 - Para iniciar la edición, toque en el icono de bloqueo\n\n2 - Pulse cualquier botón para asignar o cambiar la funcionalidad\n\n3 - Mantenga pulsado cualquier botón para cambiar el orden\n\n4 - Para guardar, pulse el icono de bloqueo de nuevo\n\n5 - Para restaurar los valores por defecto del sistema, pulse el botón de reinicio\n\n
+ \u2022 Las acciones sólo se pueden asignar a un botón a la vez\n\n\u2022 El botón de inicio no puede ser reasignado\n\n\u2022 Botones laterales no pueden ser reorganizados
+ Consejos rápidos
+ ¿Borrar los ajustes actuales y restaurar a los valores predeterminados?
+ Configuración de la barra de navegación guardada
+ Restablecidos valores de la barra de navegación
+ Editable
+ Bloqueado
+
+
+ Atajos de inicio rápido
+ Configurar accesos directos de la barra de navegación personalizada
+ ¿Eliminar todos los accesos directos de la barra de navegación creados por el usuario y restaurar a los valores predeterminados?
+ Restablecer valores predeterminados de los accesos directos de la barra de navegación
+ Abrir cambio de IME
+ Matar aplicación
+ Ninguno
+ Capturar pantalla
+ LLamada/Vibración
+ LLamada/Silencio
+ LLamada/Vibración/Silencio
+ Apagar pantalla
+ Conmuntar antorcha
+ Google Now
+ Elija la acción
+ Cambiar a la última aplicación
+
+
+ Arrastre el control deslizante para asignar accesos directos
+ Atajos del control deslizante
+ Ver o cambiar los accesos directos personalizados de la pantalla de bloqueo
+ Restablecer valores predeterminados de los atajos en la pantalla de bloqueo
+ Reinicializar
+ ¿Eliminar todos los accesos directos de la pantalla de bloqueo creados por el usuario y restaurar a los valores predeterminados?
+ Vacio
+ Editar acceso directo y el icono
+ Seleccionar o cambiar la aplicación o actividad deseada y el icono asociado
+
+
+ Actividades
+ Seleccionar aplicación personalizada
+ Seleccionar actividad personalizada
+ Seleccione el icono
+ Alarma
+ Navegador
+ Calendario
+ Cámara
+ Chrome
+ Contactos
+ Email
+ Email Holo
+ Facebook
+ Gallería
+ Gmail
+ Google (pequeño)
+ Google Plus
+ Hangouts
+ Maps
+ Película
+ Música
+ Navegación
+ Teléfono
+ Podcast
+ Rss
+ Búsqueda
+ Snapchat
+ SMS
+ Twitter
+
+ Ajustes rápidos
+
+
+ Ajustes rápidos configurables
+ Activar/desactivar cambios dinámicos
+
+
+ Acceso rápido
+ Ajustes rápidos desplegables con un dedo
+ Deshabilitado
+ Centro
+ Izquierda
+ Derecha
+
+
+ Acceso inteligente
+ Abra los ajustes rápidos cuando no hay notificaciones presentes
+ Deshabilitado
+ Si no hay notificaciones eliminables
+ Si no hay notificaciones
+
+
+ Control del cursor
+ Izquierda/derecha
+ Derecha/izquierda
+
+
+ Deslizado rápido
+ Deslizar para cambiar rápidamente entre los ajustes rápidos y panel de notificaciones
+
+
+ Pulsación larga para matar aplicación
+ Pulsación larga matará aplicación en primer plano
+
+
+ Paquetes de sonido
+ Instalar paquetes de sonido
+ Instalar nuevos paquetes de sonido añadidos en la carpeta Soundpacks en la memoria interna
+ Seleccione el paquete de sonido
+ Seleccione el paquete de sonido activo
+ Predeterminado (Sistema)
+ Error instalando paquete de sonido
+
+ OmniSwitch
+ Uso para recientes
+ Usar OmniSwitch en lugar de la vista por defecto
+ Configuración
+ Abre la configuración de OmniSwitch
+ Advertencia
+ OmniSwitch no esta instalado
+ OmniSwitch no esta instalado
+ Información
+ Asegúrese de que ha habilitado OmniSwitch. Usted puede hacer esto mediante el uso de \"Configuración\".
+
+ Emular la tecla de menú de hardware
+ Fuerza la ocultación del menú de tres puntos en las aplicaciones. Requiere reinicio de la aplicación
+
+ Mostrar menú de tres puntos
+ Fuerza la visualización del menú de tres puntos en las aplicaciones. Requiere reinicio de la aplicación
+
+
+ Reloj y fecha
+ Estilo del reloj y fecha
+ Alineación
+ Activado
+ Desactivado
+ Color
+ Restaurar color
+ Mostrar reloj y fecha
+ AM/PM
+ Reloj de 24 horas está habilitado
+ Día de la semana
+ Día abreviado de la semana antes de la hora
+ Reloj a la derecha
+ Reloj centrado
+ No mostrar
+ Fecha
+ Ver fechas personalizado antes que el reloj
+ Estilo de la fecha
+ Formato de la fecha
+ Tamaño normal de la fuente
+ Tamaño pequeño de la fuente
+ No mostrar
+ No mostrar
+ Tamaño pequeño de la fuente
+ Tamaño normal de la fuente
+ Normal
+ Minúsculas
+ Mayúsculas
+
+
+ Indicar batería en el anillo de desbloqueo
+
+
+ Widgets
+ Privacidad
+ Fondo
+ Más
+
+
+ Maximizar
+ Cámara
+ Activar widget de la cámara
+
+
+ Menú de encendido
+ Activar menú de encendido
+
+
+ Ver a través
+ Sus datos pueden ser visibles para los que le rodean
+ Difuminar contenido
+ Intensidad del efecto de difuminado
+ Wallpaper
+ El efecto \'ver a través\' debe ser desactivado
+
+
+ Dimensiones
+ Configurar el ancho y la altura de la barra de navegación
+ ¿Restablecer todas las entradas a las dimensiones por defecto?
+ Altura de la barra de navegación
+ Altura de la barra de navegación en el modo retrato.
+ Altura de la barra de navegación en el modo paisaje
+ Altura de la barra de navegación en el modo paisaje.
+ Ancho de la barra de navegación
+ Altura de la barra de navegación si la barra está a lo largo de un lado
+ 42 dp (predeterminado)
+ 36 dp
+ 30 dp
+ 24 dp
+ 48 dp (predeterminado)
+ 44 dp
+ 40 dp
+ 42 dp
+ 0 dp (apagado)
+
+
+ Atajos de cabecera
+ Tiempo
+ Fecha
+ Predeterminado
+
+ Color
+
+
+ Voltear botones de volumen
+ Voltear botones de volumen según la posición del terminal
+ Configuración avanzada de rotación
+ Cerrar
+ Deshabilitar a 90 grados
+ Deshabilitar a 270 grados
+
+
+ Modo inmersivo
+ Desactivar modo inmersivo
+
diff --git a/res/values-fr/custom_strings.xml b/res/values-fr/custom_strings.xml
index 404baa920..1c8d2ebd2 100644
--- a/res/values-fr/custom_strings.xml
+++ b/res/values-fr/custom_strings.xml
@@ -60,6 +60,7 @@
Défaut
Appel manqué
Messagerie vocale
+ Afficher lorsque l\'écran est actif
Toujours activé
Très court
Court
@@ -96,7 +97,8 @@
Niveaux de luminosité de l\'écran pour le mode automatique
Niveaux automatique
Niveaux de luminosité des boutons pour le mode automatique
- Boutons
+ Boutons
+ Paramètres de luminosité des boutons
Mode sombre
Ne pas définir la luminosité du bouton
Lier à l\'écran
@@ -187,6 +189,10 @@
Vous n\'avez pas assigné de bouton à l\'action \"Accueil\"\u00A0! Cela peut rendre votre appareil inutilisable\u00A0!
Vibrer au toucher
Cette option dépend de l\'option \"Vibrer au toucher\" des paramètres du son
+ Afficher la barre de navigation
+ Forcer l\'activation de la barre de navigation
+ Désactiver les touches
+ Forcer la désactivation des touches
Menu marche/arrêt
Capture d\'écran
Afficher les options de capture d\'écran dans le menu marche/arrêt
@@ -203,22 +209,39 @@
Activer
ActiveDisplay activé
ActiveDisplay désactivé
- Outrepasser Active Display
- Lors qu\'aucune notification ne sera présente, le mode de poche verrouillera votre appareil
+ Outrepasser ActiveDisplay
+ Lorsqu\'aucune notification ne sera présente, le mode de poche verrouillera votre appareil
Texte des notifications
Afficher le texte des notifications autour du cercle
Utiliser les notifications personnalisées
- Utiliser le style d\'affichage d\'Active Display pour afficher les détails des notifications au lieu du style du système
+ Utiliser le style d\'affichage d\'ActiveDisplay pour afficher les détails des notifications au lieu du style du système
+ Notification moins fréquente
+ Limiter la notification à une par période
+ Veille avec double appui
+ Éteindre l\'écran avec un double appui
+ Paramètres lorsque secoué
+ Secouer pour réafficher
+ Secouer votre appareil pour réafficher les notifications
+ Événement par défaut
+ Après avoir reçu une notification ne pas activer ActiveDisplay jusqu\'à la prochain secousse de l\'utilisateur
+ Intensité
+ Intensité nécessaire des secousses pour afficher les notifications
+ Délai
+ Temps en seconde pendant lequel les notifications restent actives après une secousse, 0 signifie toujours actif
+ Outrepasser les heures silencieuses
+ Autoriser les secousses pendant les heures silencieuses
+ Intervalle
+ Temps minimum entre deux secousses consécutifs
Toutes les notifications
Afficher toutes les notifications, y compris les notifications non-effaçables
Masquer les faibles priorités
- Cachez les notifications de faible priorité, comme celle de Google Now
+ Masquer les notifications de faible priorité, comme celle de Google Now
Mode de poche
Afficher ActiveDisplay lorsque vous sortez l\'appareil de votre poche
Ré-afficher les notifications
Durée d\'affichage
Seuil de proximité
- Définir le délai pendant lequel le capteur doit être recouvert avant qu\'Active Display soit affiché
+ Définir le délai pendant lequel le capteur doit être recouvert avant qu\'ActiveDisplay soit affiché
Luminosité des notifications
Personnalisation
Applications exclues
@@ -279,6 +302,7 @@
Volume par défaut
Définir quel volume modifier par défaut
Boutons et agencement
+ Configurer les boutons de la barre de navigation
1 - Pour commencer l\'édition, appuyer sur le cadenas\n\n2 - Appuyer sur un des boutons pour assigner ou changer une fonctionnalité\n\n3 - Exercer une pression longue pour modifier l\'ordre\n\n4 - Pour enregistrer, appuyer à nouveau sur le cadenas\n\n5 - Pour remettre à zéro, appuyer sur le bouton \"Réinitialiser\"\n\n
\u2022 Les actions ne peuvent être assignées qu\'une seule fois\n\n\u2022 Le bouton Accueil ne peut pas être réassigné\n\n\u2022 Les boutons sur le bord ne peuvent être déplacés
Conseils pratiques
@@ -288,6 +312,7 @@
Éditable
Verrouillé
Raccourcis de lancement rapide
+ Configurer les raccourcis de la barre de navigation personnalisée
Supprimer tous les raccourcis de la barre de navigation et revenir à la configuration d\'origine\u00A0?
Raccourcis de la barre de navigation réinitialisés
Changer la méthode de saisie
@@ -329,6 +354,7 @@
Email Holo
Facebook
Galerie
+ Gmail
Google (petit)
Google+
Hangouts
@@ -340,6 +366,7 @@
Podcast
RSS
Recherche
+ Snapchat
Messages
Twitter
Volet des paramètres
@@ -395,7 +422,7 @@
AM/PM
L\'heure sur 24 heures est activée
Jour de la semaine
- Jour abrégée de la semaine avant l\'heure
+ Jour abrégé de la semaine avant l\'heure
À droite
Au centre
Ne pas afficher
@@ -412,4 +439,51 @@
Normale
Minuscule
Majuscule
+ Niveau de batterie autour de l\'anneau de déverrouillage
+ Widgets
+ Privé
+ Arrière plan
+ Plus
+ Maximisé
+ Appareil photo
+ Activer le widget appareil photo
+ Menu Marche/Arrêt
+ Activer le menu Marche/Arrêt
+ Affichage transparent
+ Vos données peuvent être visibles à ceux autour de vous
+ Effet de flou
+ Intensité de l\'effet de flou
+ Fond d\'écran
+ L\'effet de flou doit être désactivé
+ Dimensions
+ Configurer la hauteur et la largeur de la barre de navigation
+ Réinitialiser toutes les dimensions\u00A0?
+ Hauteur de la barre de navigation
+ Hauteur de la barre de navigation en mode portrait
+ Hauteur de la barre de navigation paysage
+ Hauteur de la barre de navigation en mode paysage
+ Largeur de la barre de navigation
+ Largeur de la barre de navigation lors qu\'elle est placée sur un coté
+ 42 dp (défaut)
+ 36 dp
+ 30 dp
+ 24 dp
+ 48 dp (défaut)
+ 44 dp
+ 40 dp
+ 42 dp
+ 0 dp (désactivé)
+ Raccourcis d\'en-tête
+ Heure
+ Date
+ Défaut
+ Couleur
+ Rotation des boutons
+ Ajuster l\'action des boutons de volume en fonction de l\'orientation
+ Paramètres avancés de rotation
+ Fermer
+ Désactivé à 90 degrés
+ Désactivé à 270 degrés
+ Mode immersif
+ Désactiver le mode immersif
diff --git a/res/values-it/custom_strings.xml b/res/values-it/custom_strings.xml
index 4f9511550..e0160d8c4 100644
--- a/res/values-it/custom_strings.xml
+++ b/res/values-it/custom_strings.xml
@@ -116,7 +116,7 @@
I livelli di luminosità dello schermo sono in modalità automatica
Livelli automatici
I livelli dei pusalti sono in modalità automatica
- Pulsanti
+ Pulsanti
Modalità buia
Non impostare la luminosità pulsanti
Passa a schermo
@@ -388,4 +388,9 @@
Tasto indietro per chiudere le applicazioni
Tieni premuto il tasto indietro per chiudere le applicazioni recenti
+
+
+ Batteria anello di sblocco
+
+ Massimizza widget lockscreen
diff --git a/res/values-nl/custom_strings.xml b/res/values-nl/custom_strings.xml
index e5526e0f5..9b25f1dc5 100644
--- a/res/values-nl/custom_strings.xml
+++ b/res/values-nl/custom_strings.xml
@@ -117,7 +117,7 @@
Schermhelderheid automatisch bepalen
Automatische waardes
Knoppenhelderheid automatisch bepalen
- Knoppen
+ Knoppen
Donkere modus
Geen knoppenhelderheid
Link naar scherm
@@ -405,4 +405,7 @@
Lang drukken op terug sluit app
Door lang op de terug knop te drukken sluit de app op de voorgrond
+
+
+ Batterij-niveau om ontgrendelingsring
\ No newline at end of file
diff --git a/res/values-pl/custom_strings.xml b/res/values-pl/custom_strings.xml
index e049fe08e..a15ab8c7c 100644
--- a/res/values-pl/custom_strings.xml
+++ b/res/values-pl/custom_strings.xml
@@ -115,7 +115,7 @@
Poziomy jasności ekranu dla trybu automatycznego
Automatyczne poziomy
Poziomy jasności przycisku dla trybu automatycznego
- Przyciski
+ Przyciski
Tryb ciemny
Nie ustawiaj jasnośći przycisków
Powiąż z ekranem
@@ -377,4 +377,6 @@
Lewo/prawo
Prawo/lewo
+
+ Stan baterii wokół pierścienia odblokowania
diff --git a/res/values-pt/custom_strings.xml b/res/values-pt/custom_strings.xml
index 13768820f..82adb3921 100644
--- a/res/values-pt/custom_strings.xml
+++ b/res/values-pt/custom_strings.xml
@@ -112,7 +112,7 @@
Níveis de brilho da tela para modo automático
Níveis automáticos
Níveis ade brilho do botão para modo automático
- Botões
+ Botões
Modo escuro
"Não definir brilho do botão"
Link com a tela
@@ -389,4 +389,6 @@
Esquerda/direita
Direita/esquerda
+
+ Bateria ao redor do anel de desbloqueio
diff --git a/res/values-ru/custom_strings.xml b/res/values-ru/custom_strings.xml
new file mode 100644
index 000000000..df26670b4
--- /dev/null
+++ b/res/values-ru/custom_strings.xml
@@ -0,0 +1,571 @@
+
+
+
+
+ ОК
+ Сброс
+
+ Панели и меню
+ Активные уведомления
+ Строка состояния
+ Панель навигации
+ Стиль индикатора батареи
+ Управление яркостью
+ Регулировать яркость экрана движением пальца по строке состояния
+ Включена автоматическая регулировка яркости
+ Стиль индикатора сигнала
+ Значок
+ Не показывать индикатор
+ Текст
+ Проценты
+ Круг
+ Круг с процентами
+ Счётчик уведомлений
+ Показывать количество новых уведомлений в строке состояния
+
+
+ Выберите источник иконки
+ Системные иконки
+ Галерея
+ Набор иконок
+
+ Приложения
+ Выберите приложение
+ Добавить
+
+
+ Изменить настройки индикатора
+ Длительность и скорость мигания
+ Цвет
+ Нормально
+ Пользовательский
+ Тест
+ Удалить
+ Удалить выбранные элементы?
+ Выключите экран, чтобы увидеть выбранные настройки индикатора в действии или закройте этот диалог для остановки теста
+ Отклонить
+
+
+ Включить
+ Основные
+ Приложения
+ Телефон
+ Собственные значения
+ Включен
+ Отключен
+ По умолчанию
+ Пропущенный вызов
+ Голосовая почта
+ Показывать, когда экран включен
+
+
+ Всегда вкл.
+ Очень коротко
+ Коротко
+ Нормально
+ Долго
+ Очень долго
+ Очень быстро
+ Быстро
+ Нормально
+ Долго
+ Очень долго
+
+ Зелёный
+ Красный
+
+
+ Включен
+ Индикация разрядки батареи
+ Цвета
+ Батарея разряжена
+ Заряжается
+ Заряжена на (90%)
+ Полностью заряжена
+ Изменить настройки батареи
+
+
+ Настройка яркости
+ Текущее значение экрана: %d
+ Текущее значение кнопок: %d
+
+ Настройка чувствительности
+ Средняя
+ Очень низкая
+ Низкая
+ Средняя
+ Высокая
+ Очень высокая
+
+ Экран
+ Автоматическая яркость
+ Яркость экрана в автоматическом режиме
+ Автоматическая яркость подсветки
+ Яркость подсветки кнопок в автоматическом режиме
+ Кнопки
+ Отключить подсветку
+ Подсветка кнопок отключена
+ Ссылаться на яркость экрана
+ Яркость кнопок будет та же, что и у экрана
+ Ручная настройка
+ Ручная настройка яркости подсветки кнопок
+ Ручная настройка яркости
+
+ Автоматическая яркость
+ Текущее значение датчика: %d lux
+ Автоматические уровни яркости
+ %1$d
+ %1$d+
+ Регулировать
+ Закрыть
+ Сбросить
+ Разделенный уровень яркости
+ Уровень яркости
+ Яркость Окружающей среды (lux)
+ Яркость
+ Сбросить уровни яркости ?
+ Все уровни яркости будут сброшены к значениям по умолчанию.
+ Разделенная позиция (между%1$d и %2$d lux)
+ Настройки уровня света
+ Редактировать
+ Разделить
+ Удалить
+ Датчик
+ Тайм-аут
+ Отключается при нулевом значении
+ Яркость кнопок
+ Настройки яркости кнопок
+
+
+ Кнопки громкости
+ Пробуждение кнопками громкости
+ Нажатие на кнопки громкости пробуждает устройство.
+ Управление музыкой кнопками громкости
+ Когда экран выключен, долгое нажатие кнопок громкости переключает музыкальные треки
+ Гарнитура
+ Кнопки гарнитуры запускают голосовое управление
+ Нажатие кнопок гарнитуры запускает голосовое управление
+
+
+ Индикатор сетевого трафика
+ Показывать скорость передачи данных
+ Единицы измерения
+ Частота обновления
+ Отключен
+ Исходящий
+ Входящий
+ Исходящий и входящий
+ Бит в секунду
+ Байт в секунду
+ 500 мс
+ 1000 мс
+ 1500 мс
+ 2000 мс
+
+
+ Индикатор сетевой активности
+ Показывать индикатор сетевой активности в строке сосояния на значках сети или WiFi
+
+
+ Кнопки
+ Назначения кнопок
+ Назад
+ Домой
+ Меню
+ Поиск
+ Переключение приложений
+ Включить свои назначения
+ Кнопка \"Назад\"
+ Кнопка \"Назад\" (долгое нажатие)
+ Кнопка \"Домой\"
+ Кнопка \"Домой\" (долгое нажатие)
+ Кнопка \"Домой\" (двойное нажатие)
+ Кнопка \"Меню\"
+ Кнопка \"Меню\" (долгое нажатие)
+ Кнопка \"Поиск\"
+ Кнопка \"Поиск\" (долгое нажатие)
+ Кнопка переключения приложений
+ Кнопка переключения приложений (долгое нажатие)
+ Нет действия
+ Открыть/закрыть меню
+ Недавние приложения
+ Запустить поиск
+ Запустить голосовой поиск
+ In-app search
+ Эмулировать кнопку Меню
+ Эмулировать кнопку Назад
+ Переключиться на последнее приложение
+ Закрыть приложение
+ Выключить экран
+ Обычное нажатие
+ Долгое нажатие
+ Двойное нажатие
+ Нет кнопки Домой
+ Вы не назначили кнопку \"Домой\"! Это может сделать устройство непригодным для использования!
+ Вибрировать при нажатии
+ Зависит от параметра \"Виброотклик\" в настройках звука
+ Включить панель навигации
+ Принудительно включить панель навигации
+ Отключить кнопки
+ Принудительно отключить аппаратные кнопки
+
+
+ Меню кнопки питания
+ Снимок экрана
+ Отображать \"Снимок экрана\" в меню кнопки питания
+ Запись с экрана
+ Отображать \"Запись с экрана\" в меню кнопки питания
+ Передача данных
+ Отображать \"Передачу данных\" в меню кнопки питания
+ Режим полёта
+ Отображать \"Режим полёта\" в меню кнопки питания
+ Звуковая панель
+ Отображать \"Звуковую панель\" в меню кнопки питания
+
+
+ Активные Уведомления
+ Сменить настройки Активных Уведомлений
+ Включить
+ Активные Уведомления включены
+ Активные Уведомления выключены
+ Игнорировать \"Активные Уведомления\"
+ Режим \"В кармане\" запустит экран блокировки, когда нет уведомлений
+ Текст уведомлений
+ Показывать текст уведомления вокруг кольца
+ Расширенный вид уведомления
+ Отображать детали уведомлений
+ Уменьшить частоту уведомлений
+ Огриничить количество уведомлений за промежуток времени
+ Блокировка двойным нажатием
+ Двойное нажатие выключит экран
+ Настройки встряхивания
+ Встряхнуть для отображения
+ Встряхните устройство для повторного отображения уведомления
+ Для всех событий
+ При получении нового уведомления \"Активные Уведомления\" не будут работать, пока пользователь не встряхнёт устройство
+ Интенсивность
+ Интенсивность встряхивания, необходимая для отображения уведомлений
+ Время ожидания
+ Время, которое \"Встряхивание\" активно после получения уведомления, 0 означает всегда активно.
+ Игнорировать \"Тихие часы\"
+ Разрешить \"Встряхивание\" во время \"Тихих часов\"
+ Интервал
+ Минимальное время между встряхиваниями
+ Показывать неудаляемые уведомления
+ Показывать уведомления, которые нельзя удалить
+ Скрыть низкий приоритет
+ Скрыть уведомления более низкого приоритета
+ Режим \"В кармане\"
+ Включает экран и отображает все уведомления, когда устройство достали из кармана. Отключает экран, когда устройство кладут обратно в карман.
+ Повторное отображение уведомлений
+ Время до отключения экрана
+ Порог активации датчика
+ Время, которое датчик должен быть прикрыт, чтобы появились \"Активные Уведомления\"
+ Яркость экрана
+ Расширенные настройки
+ Исключения
+ Уведомления от этих приложений не будут показываться
+ Режим \"Конфиденциальности\"
+ Детали уведомлений от этих приложений не будут показаны
+ Показывать дату
+ Показывать AM/PM
+ Режим \"Дневного света\"
+ Использовать ручную настройку яркости
+ Отображать дату над часами
+ Отображать AM/PM при использовании 12-часового формата времени
+ Инвертировать цвета в условиях яркого освещения
+ Авто-блокировка
+ Блокировать устройство при возвращении его в карман
+ Никогда
+ 1 минута
+ 5 минут
+ 15 минут
+ 30 минут
+ 1 час
+ 2 часа
+ 5 часов
+ 3 секунды
+ 5 секунд
+ 8 секунд
+ 10 секунд
+ 15 секунд
+ 25 секунд
+ Мгновенно
+ 1 секунда
+ 2 секунды
+ 3 секунды
+ 4 секунды
+ 5 секунд
+ Выкл.
+ Только уведомления
+ Всегда
+
+ Вид \"Недавних приложений\"
+
+
+ Кнопка \"Очистить всё\"
+ Показывать кнопку \"Очистить всё\"
+ Расположение кнопки \"Очистить всё\"
+ Выберите, где будет располагаться кнопка \"Очистить всё\"
+ Вверху слева
+ Вверху справа
+ Внизу слева
+ Внизу справа
+
+
+ Индикатор использования ОЗУ
+ Отображать Индикатор использования ОЗУ в недавних приложениях
+ Позиция индикатора использования ОЗУ
+ Выберите позицию индикатора использования ОЗУ
+
+
+ Панель уведомлений
+ Заголовок панели уведомлений
+ Устанавить случайное фоновое изображение в заголовке панели уведомлений, там, где располагается текущая дата и время
+
+
+ Не изменять
+ Звонка
+ Мультимедиа
+ По умолчанию
+ Выберите, громкость чего изменяется по умолчанию
+
+
+ Кнопки и их расположение
+ Настройки кнопок панели навигации
+ 1 - Для редактирования нажмите значок замка\n\n2 - Нажмите кнопку для изменения её функциональности\n\n3 - Долгим нажатием по кнопке можно перенести её влево или вправо\n\n4 - Для сохранения снова нажмите на значок замка\n\n5 - Для восстановления настроек нажмите кнопку Сброс\n\n
+ \u2022 Одно действие может быть назначено только на одну кнопку\n\n\u2022 Нельзя изменить назначение кнопки Домой\n\n\u2022 Нельзя перемещать боковые кнопки
+ Ограничения
+ Удалить текущие настройки и восстановить значения по умолчанию?
+ Настройки панели навигации сохранены
+ Настройки панели навигации сброшены по умолчанию
+ Режим правки
+ Заблокировано
+
+
+ Ярлыки быстрого запуска
+ Настроить ярлыки быстрого запуска
+ Удалить пользовательские настройки ярлыков быстрого запуска?
+ Ярлыки быстрого запуска были сброшены к значениям по умолчанию
+ Выбор способа ввода
+ Закрыть приложение
+ Действия нет
+ Снимок экрана
+ Звук/Вибрация
+ Звук/Беззвучный
+ Звук/Вибрация/Беззвучный
+ Выключить экран
+ Фонарь
+ Google Now
+ Выбор действия
+ Перейти к последнему открытому приложению
+
+
+ Потяните ползунок к цели, чтобы назначить ярлык
+ Ярлыки кольца блокировки
+ Установка или настройка ярлыков кольца блокировки
+ Ярлыки кольца блокировки сброшены по умолчанию
+ Сброс
+ Удалить все созданные ярлыки кольца блокировки и восстановить значения по умолчанию?
+ Пусто
+ Изменить ярлык и значок
+ Выберите или измените нужные приложения или действие и значок
+
+
+ Действия
+ Выбрать собственное приложение
+ Выбрать собственное действие
+ Выбрать значок
+ Часы
+ Браузер
+ Календарь
+ Камера
+ Chrome
+ Contacts
+ Email
+ Email Holo
+ Facebook
+ Gmail
+ Галерея
+ Google (малый)
+ Google Plus
+ Hangouts
+ Карты
+ Видео
+ Музыка
+ Навигация
+ Телефон
+ Подкасты
+ Rss
+ Поиск
+ Сообщения
+ Twitter
+
+ Панель быстрых настроек
+
+
+ Настраиваемая сетка
+ Включить/выключить динамическое изменение сетки
+
+
+ Быстрый доступ
+ Край строки уведомлений при опускании вниз открывает панель быстрых настроек
+ Выкл.
+ По центру
+ Левый
+ Правый
+
+
+ \"Умная\" панель уведомлений
+ Открывать быстрые настройки, если нет уведомлений
+ Выкл.
+ Без удаляемых
+ Без постоянных
+
+
+ Перемещение курсора кнопками громкости
+ Кнопка \"+\" двигает курсор влево, \"-\"-вправо
+ Кнопка \"+\" двигает курсор вправо, \"-\"-влево
+
+
+ Быстрое переключение
+ Переключение свайпом между панелью уведомлений и быстрыми настройками
+
+
+ Закрывать удержанием кнопки \"Назад\"
+ Долгое нажатие кнопки \"Назад\" закроет текущее приложение
+
+
+ Звуковые пакеты
+ Установить звуковой пакет
+ Новые установленные звуковые пакеты добавляются в папку \"SoundPacks\" во внутренней памяти устройства
+ Выбрать звуковой пакет
+ Выберите активный звуковой пакет для использования
+ По умолчанию (системный)
+ Ошибка при установке звукового пакета
+
+ OmniSwitch
+ Использовать для \"Недавних приложений\"
+ Использовать OmniSwitch по умолчанию в качестве \"Недавних приложений\"
+ Настройки
+ Открыть настройки OmniSwitch
+ Внимание
+ OmniSwitch не установлен
+ OmniSwitch не установлен
+ Примечание
+ Убедитесь, что вы включили OmniSwitch. Вы можете это сделать с помощью \"Настроек\" ниже
+
+ Скрывать кнопку Меню (три точки)
+ Принудительно скрывать кнопку Меню (три точки). Требуется перезапуск приложения
+
+ Показывать кнопку Меню (три точки)
+ Всегда показывать кнопку Меню (три точки). Требуется перезапуск приложения
+
+
+ Время и дата
+ Стиль времени и даты
+ Выравнивание часов
+ Включены
+ Выключены
+ Цвет часов
+ Сбросить цвет
+ Показывать часы и дату
+ Показывать AM/PM
+ 24-часовой формат часов
+ День недели
+ День недели перед часами коротко
+ Часы справа
+ Часы по центру
+ Не показывать
+ Дата
+ Отображать дату перед часами
+ Стиль даты
+ Формат даты
+ Обычный размер шрифта
+ Малый размер шрифта
+ Не показывать
+ Не показывать
+ Малый размер шрифта
+ Обычный размер шрифта
+ Обычный
+ Строчные
+ ПРОПИСНЫЕ
+
+
+ Индикатор батареи вокруг кольца разблокировки
+
+
+ Виджеты
+ Безопасность
+ Фон
+ Ещё...
+
+
+ Развёрнутые виджеты
+ Камера
+ Включить виджет камеры
+
+
+ Меню кнопки питания
+ Активировать Меню кнопки питания
+
+
+ Вид \"насквозь\"
+ Показывает содержимое позади экрана блокировки, ваши данные могут быть видны для окружающих
+ Радиус размытия
+ Интенсивность эффекта размытия
+ Обои экрана блокировки
+ Вид \"насквозь\" должен быть отключен.
+
+
+ Размеры
+ Настроить ширину и высоту панели навигации
+ Сбросить все стили и размеры на значения по умолчанию?
+ Высота панели навигации
+ Высота панели навигации в портретном режиме.
+ Высота панели навигации в ландшафте
+ Высота панели навигации в ландшафтном режиме.
+ Ширина панели навигации
+ Или высота, если панель находится сбоку.
+ 42 dp (по умолчанию)
+ 36 dp
+ 30 dp
+ 24 dp
+ 48 dp (по умолчанию)
+ 44 dp
+ 40 dp
+ 42 dp
+ 0 dp (выкл)
+
+
+ Элементы заголовка
+ Время
+ Дата
+ По умолчанию
+
+ Цвет
+
+
+ Поворот кнопок громкости
+ Менять назначение кнопок регулировки громкости согласно ориентации экрана
+ Расширенные настройки поворота
+ Закрыть
+ Отключать под углом 90 градусов
+ Отключать под углом 270 градусов
+
diff --git a/res/values-sv/custom_strings.xml b/res/values-sv/custom_strings.xml
index 9624d3cd5..340bee62b 100644
--- a/res/values-sv/custom_strings.xml
+++ b/res/values-sv/custom_strings.xml
@@ -96,7 +96,7 @@
Skärmljusnivåer för automatiskt läge
Automatiska nivåer
Knappljusnivåer för automatiskt läge
- Knappar
+ Knappar
Mörkt läge
Ställ inte in knappljusstyrka
Sammanlänka med skärm
@@ -317,4 +317,5 @@
Pekarkontroll
Vänster/höger
Höger/vänster
+ Batteri runt upplåsningsring
diff --git a/res/values-zh-rCN/custom_strings.xml b/res/values-zh-rCN/custom_strings.xml
index 5e37101fd..7289bf553 100644
--- a/res/values-zh-rCN/custom_strings.xml
+++ b/res/values-zh-rCN/custom_strings.xml
@@ -117,7 +117,7 @@
自动模式下的屏幕亮度等级
自动等级
自动模式下的按钮亮度等级
- 按钮
+ 按钮
全黑模式
不要设置按钮亮度
与屏幕同步
@@ -384,4 +384,18 @@
左/右
右/左
+
+ 在解锁环周围显示电量圈
+
+
+ 相机小部件
+ 向左滑动以启动相机
+
+
+ 启用电源菜单
+ 屏幕锁定时显示电源菜单
+
+
+ 透明锁屏
+ 显示锁屏后的内容。您的个人信息可被您周围的人看见
diff --git a/res/values/config.xml b/res/values/config.xml
index 07f9d3f3b..e89dca19d 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -30,4 +30,7 @@
false
+
+ true
diff --git a/res/values/custom_arrays.xml b/res/values/custom_arrays.xml
index 116801186..d5906e705 100644
--- a/res/values/custom_arrays.xml
+++ b/res/values/custom_arrays.xml
@@ -65,7 +65,7 @@
- 250
- 500
- 1000
- - 2500
+ - 2000
- 5000
@@ -233,6 +233,7 @@
- @string/icon_picker_email2
- @string/icon_picker_facebook
- @string/icon_picker_gallery
+ - @string/icon_picker_gmail
- @string/icon_picker_google_small
- @string/icon_picker_googleplus
- @string/icon_picker_googletalk
@@ -245,6 +246,7 @@
- @string/icon_picker_podcast
- @string/icon_picker_rss
- @string/icon_picker_search
+ - @string/icon_picker_snapchat
- @string/icon_picker_twitter
@@ -259,6 +261,7 @@
- ic_lockscreen_email2_normal
- ic_lockscreen_facebook_normal
- ic_lockscreen_gallery_normal
+ - ic_lockscreen_gmail_normal
- ic_lockscreen_google_small_normal
- ic_lockscreen_gplus_normal
- ic_lockscreen_gtalk_normal
@@ -271,9 +274,29 @@
- ic_lockscreen_podcast_normal
- ic_lockscreen_rss_normal
- ic_lockscreen_google_normal
+ - ic_lockscreen_snapchat_normal
- ic_lockscreen_twitter_normal
+
+
+ - @string/tinted_statusbar_off
+ - @string/tinted_statusbar_actionbar
+ - @string/tinted_statusbar_system
+
+
+
+ - 0
+ - 1
+ - 2
+
+
+
+ - @string/tinted_statusbar_statusbar
+ - @string/tinted_statusbar_navbar
+ - @string/tinted_statusbar_all
+
+
- @string/quick_pulldown_off
@@ -424,4 +447,66 @@
- 2000
+
+
+ - @string/navigation_bar_size_42_dp_default
+ - @string/navigation_bar_size_40_dp
+ - @string/navigation_bar_size_36_dp
+ - @string/navigation_bar_size_30_dp
+ - @string/navigation_bar_size_24_dp
+ - @string/navigation_bar_size_0_dp
+
+
+
+ - 42
+ - 40
+ - 36
+ - 30
+ - 24
+ - 0
+
+
+
+ - @string/navigation_bar_size_48_dp_default
+ - @string/navigation_bar_size_44_dp
+ - @string/navigation_bar_size_42_dp
+ - @string/navigation_bar_size_40_dp
+ - @string/navigation_bar_size_36_dp
+ - @string/navigation_bar_size_30_dp
+ - @string/navigation_bar_size_24_dp
+ - @string/navigation_bar_size_0_dp
+
+
+
+ - 48
+ - 44
+ - 42
+ - 40
+ - 36
+ - 30
+ - 24
+ - 0
+
+
+
+ - @string/navigation_bar_size_48_dp_default
+ - @string/navigation_bar_size_44_dp
+ - @string/navigation_bar_size_42_dp
+ - @string/navigation_bar_size_40_dp
+ - @string/navigation_bar_size_36_dp
+ - @string/navigation_bar_size_30_dp
+ - @string/navigation_bar_size_24_dp
+ - @string/navigation_bar_size_0_dp
+
+
+
+ - 48
+ - 44
+ - 42
+ - 40
+ - 36
+ - 30
+ - 24
+ - 0
+
diff --git a/res/values/custom_attrs.xml b/res/values/custom_attrs.xml
index 83648286c..05861838a 100644
--- a/res/values/custom_attrs.xml
+++ b/res/values/custom_attrs.xml
@@ -25,4 +25,9 @@
-
\ No newline at end of file
+
+
+
+
+
+
diff --git a/res/values/custom_dimens.xml b/res/values/custom_dimens.xml
new file mode 100755
index 000000000..8e62137c7
--- /dev/null
+++ b/res/values/custom_dimens.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ 16dip
+ 16dip
+ 32dip
+ 20dip
+
diff --git a/res/values/custom_strings.xml b/res/values/custom_strings.xml
index b773338f3..ac2fddf43 100644
--- a/res/values/custom_strings.xml
+++ b/res/values/custom_strings.xml
@@ -22,7 +22,7 @@
Reset
Bars and menus
- ActiveDisplay
+ Active display
Status bar
Navigation bar
Battery style
@@ -118,7 +118,6 @@
Screen brightness levels for automatic mode
Automatic levels
Button brightness levels for automatic mode
- Buttons
Dark mode
Don\'t set button brightness
Link to screen
@@ -149,6 +148,8 @@
Sensor
Timeout
Disabled on value 0
+ Button brightness
+ Button brightness settings
Volume
@@ -218,6 +219,10 @@
You have no button assigned to the \"Home\" action! This can make your device unusable!
Vibrate on touch
Enable depends on \"Vibrate on touch\" in sound settings
+ Show navigation bar
+ Force enable navigation bar
+ Disable hardware keys
+ Force disable hardware keys
Power menu
@@ -238,14 +243,31 @@
Enable
Active display enabled
Active display disabled
- Bypass active display
- When no notifications exist, pocket mode will launch the lockscreen
+ Bypass mode
+ Pocket mode will launch the lockscreen when no notifications exist and lockscreen secure enabled
Notification text
Show the notification text around the ring
- Use custom notification view
- Use Active display style for showing notification details, rather than system style
- Ongoing notifications
- Show ongoing, non-clearable notifications
+ Custom notification view
+ Use active display style for notification details
+ Less frequent notification
+ Limit the notification to once per time period
+ Double tap to sleep
+ Turn screen off with double tap
+ Shake settings
+ Shake to redisplay
+ Shake device to redisplay notifications
+ Default event
+ After receive a notification won\'t run active display until user shakes
+ Intensity
+ Intensity of shake needed to display notifications
+ Timeout
+ Seconds that shake is active after receiving a notification, 0 means always active.
+ Bypass Quiet Hours
+ Allow shake during Quiet Hours
+ Interval
+ Minimum time between consecutive shakes
+ Show ongoing
+ Show non-clearable notifications
Hide low priority
Hide notifications marked as low priority
Pocket mode
@@ -253,22 +275,22 @@
Re-display notifications
Display timeout
Proximity time threshold
- Duration the proximity sensor must be covered before Active display is shown
- Notification brightness
+ Time the proximity sensor must be covered before active display is shown
+ Display brightness
Advanced settings
Excluded apps
No notifications will be shown for these apps
Privacy mode
- No details will be shown for notifications belonging to these apps
+ No details will be shown for notifications from these apps
Show date
Show AM/PM
Sunlight mode
- Active display brightness (Only applies when automatic brightness is disabled)
+ Used on manual brightness control
Show the date above the clock
Show AM/PM indicator when using the 12-hour time format
- Invert colors when in bright areas such as under direct sunlight
- Auto-sleep display
- Put device to sleep again if it was woken by Pocket mode, and is returned to the pocket
+ Invert colors in bright environment
+ Auto-sleep
+ Put to sleep after woken by pocket mode and returned to the pocket
Never
1 minute
5 minutes
@@ -313,8 +335,8 @@
Notification drawer
- Contextual notification panel header
- Sets the background of the notification panel header to an image based on the current date and time
+ Contextual header
+ Sets the background of the header to an image based on the current date and time
None
@@ -325,6 +347,7 @@
Buttons and layout
+ Configure navigation bar buttons
1 - To begin editing, tap the lock icon\n\n2 - Tap any button to assign or change functionality\n\n3 - Long press any button to rearrange the order\n\n4 - To save, tap the lock icon again\n\n5 - To restore system default, tap the reset button\n\n
\u2022 Actions can only be assigned to one button at a time\n\n\u2022 The home button cannot be re-assigned\n\n\u2022 Side buttons cannot be rearranged
Quick tips
@@ -336,6 +359,7 @@
Quick launch shortcuts
+ Configure custom navigation bar shortcuts
Delete all user created navigation bar shortcuts and restore to default?
Navigation bar shortcuts reset to default
Open IME Switcher
@@ -377,6 +401,7 @@
Email Holo
Facebook
Gallery
+ Gmail
Google (small)
Google Plus
Hangouts
@@ -388,9 +413,27 @@
Podcast
Rss
Search
+ Snapchat
Messaging
Twitter
+
+ Colors
+ Dynamic color change
+ Apply color to
+ Disabled
+ Action bar color
+ Screen color
+ Status bar
+ Navigation bar
+ Both
+ Reverse color
+ Enable using reverse color
+ Notification drawer color
+ Apply current color to notification drawer
+ Status bar opacity
+ Navigation bar opacity
+
Quick settings
@@ -409,7 +452,7 @@
Smart pulldown
Open quick settings when there are no notifications present
Disabled
- If no cleareable notifications
+ If no clearable notifications
If no notifications
@@ -460,6 +503,7 @@
Color
Reset color
Show clock and date
+ Always show on lockscreen
AM/PM
24-hour clock is enabled
Day of the week
@@ -481,4 +525,65 @@
Lowercase
Uppercase
+
+ Battery around unlock ring
+
+
+ Widgets
+ Privacy
+ Background
+ More
+
+
+ Maximize
+ Camera
+ Enable camera widget
+
+
+ Power menu
+ Enable power menu
+
+
+ See through
+ Your data may be visible to those around you
+ Blur content
+ Intensity for the blur effect
+ Wallpaper
+ See through needs to be disabled
+
+
+ Dimensions
+ Configure width and height of navigation bar
+ Reset all dimensions entries to default?
+ Navigation bar height
+ Navigation bar height while in portrait.
+ Navigation bar height landscape
+ Navigation bar height while in landscape.
+ Navigation bar width
+ Navigation bar height if the bar is along a side
+ 42 dp (default)
+ 36 dp
+ 30 dp
+ 24 dp
+ 48 dp (default)
+ 44 dp
+ 40 dp
+ 42 dp
+ 0 dp (off)
+
+
+ Header shortcuts
+ Time
+ Date
+ Default
+
+ Color
+
+
+ Match rotation
+ Adjust volume buttons action based on current rotation
+
+
+ Immersive mode
+ Disable immersive mode
diff --git a/res/xml/active_display_settings.xml b/res/xml/active_display_settings.xml
index b7f396d00..9a0f588ac 100644
--- a/res/xml/active_display_settings.xml
+++ b/res/xml/active_display_settings.xml
@@ -24,9 +24,9 @@
android:summaryOff="@string/ad_enable_summary_off"
android:summaryOn="@string/ad_enable_summary_on" />
-
@@ -38,23 +38,20 @@
android:summary="@string/ad_bypass_summary"
android:dependency="ad_enable"/>
-
-
-
@@ -84,27 +81,89 @@
android:entryValues="@array/ad_redisplay_values"
android:dependency="ad_enable"/>
+
+
+ android:key="ad_shake_event"
+ android:title="@string/ad_shake_event_settings_title" />
-
+
+
+
+
+ android:title="@string/ad_shake_threshold_title"
+ android:summary="@string/ad_shake_threshold_summary"
+ android:max="20"
+ settings:min="5"
+ settings:interval="1"
+ settings:unitsLeft=""
+ settings:unitsRight=""
+ android:dependency="active_display_shake_event" />
-
+ android:title="@string/ad_shake_long_threshold_title"
+ android:summary="@string/ad_shake_long_threshold_summary"
+ android:max="5"
+ settings:min="1"
+ settings:interval="1"
+ settings:unitsLeft=""
+ settings:unitsRight="s"
+ android:dependency="active_display_shake_event" />
-
+
+
+
+
+
+
+
+
@@ -116,6 +175,20 @@
android:summary="@string/ad_show_ampm_summary"
android:dependency="ad_enable"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
diff --git a/res/xml/button_brightness_settings.xml b/res/xml/button_brightness_settings.xml
new file mode 100644
index 000000000..60d0095d8
--- /dev/null
+++ b/res/xml/button_brightness_settings.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/xml/button_settings.xml b/res/xml/button_settings.xml
index 8e3b7812c..635be164c 100644
--- a/res/xml/button_settings.xml
+++ b/res/xml/button_settings.xml
@@ -63,12 +63,28 @@
android:entries="@array/volume_key_cursor_control_entries"
android:entryValues="@array/volume_key_cursor_control_values" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/xml/more_interface_settings.xml b/res/xml/more_interface_settings.xml
index 5f82d68dc..f0c1a0c95 100644
--- a/res/xml/more_interface_settings.xml
+++ b/res/xml/more_interface_settings.xml
@@ -23,54 +23,55 @@
+ android:title="@string/bars_and_menus_category_recent_panel_title" >
-
+
-
+
-
-
-
+
+
+
+ android:title="@string/omniswitch_category">
-
+
-
+
+
diff --git a/res/xml/navbar_dimen_settings.xml b/res/xml/navbar_dimen_settings.xml
new file mode 100644
index 000000000..d28e6dea5
--- /dev/null
+++ b/res/xml/navbar_dimen_settings.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/res/xml/notification_light_settings.xml b/res/xml/notification_light_settings.xml
index f38f4f091..4ffebf7c5 100644
--- a/res/xml/notification_light_settings.xml
+++ b/res/xml/notification_light_settings.xml
@@ -29,7 +29,8 @@
+ android:persistent="false"
+ android:dependency="notification_light_pulse" />
+
+
+
+
+
+
+
+
diff --git a/res/xml/og_security_settings_chooser.xml b/res/xml/og_security_settings_chooser.xml
new file mode 100644
index 000000000..662f7e2df
--- /dev/null
+++ b/res/xml/og_security_settings_chooser.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/xml/status_bar_clock_style.xml b/res/xml/status_bar_clock_style.xml
index 28f90624b..6701997bc 100644
--- a/res/xml/status_bar_clock_style.xml
+++ b/res/xml/status_bar_clock_style.xml
@@ -18,12 +18,19 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/status_bar_clock_title">
-
+
+
nextAction = mKeySettings.values().iterator();
while (nextAction.hasNext()){
@@ -621,4 +670,18 @@ public void removeListEntry(ListPreference list, String valuetoRemove) {
list.setEntries(entries.toArray(new CharSequence[entries.size()]));
list.setEntryValues(values.toArray(new CharSequence[values.size()]));
}
+
+ private void updateDisableHWKeyEnablement(boolean harwareKeysDisable) {
+ boolean enableHWKeyRebinding = Settings.System.getInt(getContentResolver(),
+ Settings.System.HARDWARE_KEY_REBINDING, 0) == 1;
+
+ mVirtualKeyHapticFeedback.setEnabled(!harwareKeysDisable);
+ mForceShowOverflowMenu.setEnabled(!harwareKeysDisable);
+ mButtonBrightness.setEnabled(!harwareKeysDisable);
+ mKeysHomeCategory.setEnabled(!harwareKeysDisable && enableHWKeyRebinding);
+ mKeysBackCategory.setEnabled(!harwareKeysDisable && enableHWKeyRebinding);
+ mKeysMenuCategory.setEnabled(!harwareKeysDisable && enableHWKeyRebinding);
+ mKeysAppSwitchCategory.setEnabled(!harwareKeysDisable && enableHWKeyRebinding);
+ mKeysAssistCategory.setEnabled(!harwareKeysDisable && enableHWKeyRebinding);
+ }
}
diff --git a/src/org/omnirom/omnigears/batterylight/BatteryLightDialog.java b/src/org/omnirom/omnigears/batterylight/BatteryLightDialog.java
index 062ed11bb..e31f00261 100644
--- a/src/org/omnirom/omnigears/batterylight/BatteryLightDialog.java
+++ b/src/org/omnirom/omnigears/batterylight/BatteryLightDialog.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Daniel Nilsson
- * Copyright (C) 2012 THe CyanogenMod Project
+ * Copyright (C) 2012 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.
diff --git a/src/org/omnirom/omnigears/batterylight/BatteryLightPreference.java b/src/org/omnirom/omnigears/batterylight/BatteryLightPreference.java
index 90e6f8fb6..1b6cdf0c7 100644
--- a/src/org/omnirom/omnigears/batterylight/BatteryLightPreference.java
+++ b/src/org/omnirom/omnigears/batterylight/BatteryLightPreference.java
@@ -88,8 +88,8 @@ protected void onBindView(View view) {
}
private void updatePreferenceViews() {
- final int width = (int) mResources.getDimension(R.dimen.device_memory_usage_button_width);
- final int height = (int) mResources.getDimension(R.dimen.device_memory_usage_button_height);
+ final int width = (int) mResources.getDimension(R.dimen.color_preference_width);
+ final int height = (int) mResources.getDimension(R.dimen.color_preference_height);
if (mLightColorView != null) {
mLightColorView.setEnabled(true);
diff --git a/src/org/omnirom/omnigears/brightness/AutoBrightnessDialog.java b/src/org/omnirom/omnigears/brightness/AutoBrightnessDialog.java
index 801609f17..672767a32 100644
--- a/src/org/omnirom/omnigears/brightness/AutoBrightnessDialog.java
+++ b/src/org/omnirom/omnigears/brightness/AutoBrightnessDialog.java
@@ -266,12 +266,19 @@ private void updateSettings(boolean forceDefault) {
if (lux == null || values == null) {
final Resources res = getContext().getResources();
- lux = res.getIntArray(com.android.internal.R.array.config_autoBrightnessLevels);
- if (mScreenMode){
- values = res.getIntArray(com.android.internal.R.array.config_autoBrightnessLcdBacklightValues);
- } else {
- values = res.getIntArray(com.android.internal.R.array.config_autoBrightnessButtonBacklightValues);
+ if (lux == null){
+ lux = res.getIntArray(com.android.internal.R.array.config_autoBrightnessLevels);
+ }
+ if (values == null){
+ if (mScreenMode){
+ values = res.getIntArray(com.android.internal.R.array.config_autoBrightnessLcdBacklightValues);
+ } else {
+ values = res.getIntArray(com.android.internal.R.array.config_autoBrightnessButtonBacklightValues);
+ }
}
+ }
+
+ if (lux == null && values == null) {
mIsDefault = true;
} else {
mIsDefault = false;
diff --git a/src/org/omnirom/omnigears/brightness/BrightnessSettings.java b/src/org/omnirom/omnigears/brightness/BrightnessSettings.java
index 1283f279e..58f9c891c 100644
--- a/src/org/omnirom/omnigears/brightness/BrightnessSettings.java
+++ b/src/org/omnirom/omnigears/brightness/BrightnessSettings.java
@@ -40,39 +40,22 @@
import android.app.AlertDialog;
import android.text.TextWatcher;
import android.text.Editable;
-import android.widget.Button;
import android.widget.EditText;
import android.widget.SeekBar;
import android.widget.TextView;
import org.omnirom.omnigears.R;
-import org.omnirom.omnigears.chameleonos.SeekBarPreference;
public class BrightnessSettings extends SettingsPreferenceFragment implements
Preference.OnPreferenceChangeListener {
private static final String TAG = "BrightnessSettings";
private static final String KEY_AUTOMATIC_SENSITIVITY = "auto_brightness_sensitivity";
- private static final String KEY_BUTTON_BRIGHTNESS_CATEGORY = "button_brightness_category";
- private static final String KEY_BUTTON_NO_BRIGHTNESS = "button_no_brightness";
- private static final String KEY_BUTTON_LINK_BRIGHTNESS = "button_link_brightness";
private static final String KEY_SCREEN_AUTO_BRIGHTNESS = "screen_auto_brightness";
- private static final String KEY_BUTTON_AUTO_BRIGHTNESS = "button_auto_brightness";
- private static final String KEY_BUTTON_MANUAL_BRIGHTNESS = "button_manual_brightness";
- private static final String KEY_BUTTON_TIMEOUT = "button_timeout";
private ListPreference mAutomaticSensitivity;
- private CheckBoxPreference mNoButtonBrightness;
- private CheckBoxPreference mLinkButtonBrightness;
private Preference mAutomaticScreenBrightness;
- private Preference mAutomaticButtonBrightness;
- private Preference mManualButtonBrightness;
private AutoBrightnessDialog mScreenBrightnessDialog;
- private AutoBrightnessDialog mButtonBrightnessDialog;
- private ManualButtonBrightnessDialog mManualBrightnessDialog;
- private boolean mButtonBrightnessSupport;
- private IPowerManager mPowerService;
- private SeekBarPreference mButtonTimoutBar;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -81,8 +64,6 @@ public void onCreate(Bundle savedInstanceState) {
PreferenceScreen prefSet = getPreferenceScreen();
ContentResolver resolver = getActivity().getContentResolver();
- mButtonBrightnessSupport = getResources().getBoolean(com.android.internal.R.bool.config_button_brightness_support);
-
mAutomaticSensitivity = (ListPreference) findPreference(KEY_AUTOMATIC_SENSITIVITY);
float currentSensitivity = Settings.System.getFloat(resolver,
Settings.System.AUTO_BRIGHTNESS_RESPONSIVENESS, 1.0f);
@@ -93,52 +74,6 @@ public void onCreate(Bundle savedInstanceState) {
mAutomaticSensitivity.setOnPreferenceChangeListener(this);
mAutomaticScreenBrightness = (Preference) findPreference(KEY_SCREEN_AUTO_BRIGHTNESS);
-
- if (!mButtonBrightnessSupport){
- removePreference(KEY_BUTTON_BRIGHTNESS_CATEGORY);
- } else {
- mNoButtonBrightness = (CheckBoxPreference) findPreference(KEY_BUTTON_NO_BRIGHTNESS);
- mNoButtonBrightness.setChecked(Settings.System.getInt(resolver,
- Settings.System.CUSTOM_BUTTON_DISABLE_BRIGHTNESS, 0) != 0);
-
- mLinkButtonBrightness = (CheckBoxPreference) findPreference(KEY_BUTTON_LINK_BRIGHTNESS);
- mLinkButtonBrightness.setChecked(Settings.System.getInt(resolver,
- Settings.System.CUSTOM_BUTTON_USE_SCREEN_BRIGHTNESS, 0) != 0);
-
- mAutomaticButtonBrightness = (Preference) findPreference(KEY_BUTTON_AUTO_BRIGHTNESS);
- mManualButtonBrightness = (Preference) findPreference(KEY_BUTTON_MANUAL_BRIGHTNESS);
-
- mButtonTimoutBar = (SeekBarPreference) findPreference(KEY_BUTTON_TIMEOUT);
- int currentTimeout = Settings.System.getInt(resolver,
- Settings.System.BUTTON_BACKLIGHT_TIMEOUT, 0);
- mButtonTimoutBar.setValue(currentTimeout);
- mButtonTimoutBar.setOnPreferenceChangeListener(this);
-
- mPowerService = IPowerManager.Stub.asInterface(ServiceManager.getService("power"));
-
- updateEnablement();
- }
- }
-
- private void updateEnablement() {
- if (mButtonBrightnessSupport){
- if (mNoButtonBrightness.isChecked()){
- mLinkButtonBrightness.setEnabled(false);
- mButtonTimoutBar.setEnabled(false);
- mAutomaticButtonBrightness.setEnabled(false);
- mManualButtonBrightness.setEnabled(false);
- } else if (mLinkButtonBrightness.isChecked()){
- mNoButtonBrightness.setEnabled(false);
- mAutomaticButtonBrightness.setEnabled(false);
- mManualButtonBrightness.setEnabled(false);
- } else {
- mNoButtonBrightness.setEnabled(true);
- mLinkButtonBrightness.setEnabled(true);
- mButtonTimoutBar.setEnabled(true);
- mAutomaticButtonBrightness.setEnabled(true);
- mManualButtonBrightness.setEnabled(true);
- }
- }
}
@Override
@@ -153,36 +88,15 @@ public void onPause() {
if (mScreenBrightnessDialog != null) {
mScreenBrightnessDialog.dismiss();
}
- if (mButtonBrightnessDialog != null) {
- mButtonBrightnessDialog.dismiss();
- }
- if (mManualBrightnessDialog != null) {
- mManualBrightnessDialog.dismiss();
- }
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
if (preference == mAutomaticScreenBrightness) {
showScreenAutoBrightnessDialog();
- } else if (preference == mAutomaticButtonBrightness) {
- showButtonAutoBrightnessDialog();
- } else if (preference == mManualButtonBrightness) {
- showButtonManualBrightnessDialog();
- } else if (preference == mNoButtonBrightness) {
- boolean checked = ((CheckBoxPreference)preference).isChecked();
- Settings.System.putInt(getActivity().getContentResolver(),
- Settings.System.CUSTOM_BUTTON_DISABLE_BRIGHTNESS, checked ? 1:0);
- updateEnablement();
- } else if (preference == mLinkButtonBrightness) {
- boolean checked = ((CheckBoxPreference)preference).isChecked();
- Settings.System.putInt(getActivity().getContentResolver(),
- Settings.System.CUSTOM_BUTTON_USE_SCREEN_BRIGHTNESS, checked ? 1:0);
- updateEnablement();
- } else {
- return false;
+ return true;
}
- return true;
+ return super.onPreferenceTreeClick(preferenceScreen, preference);
}
@Override
@@ -197,10 +111,6 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
Settings.System.AUTO_BRIGHTNESS_RESPONSIVENESS, sensitivity);
updateAutomaticSensityDescription(value);
- } else if (preference == mButtonTimoutBar) {
- int buttonTimeout = (Integer) objValue;
- Settings.System.putInt(getContentResolver(),
- Settings.System.BUTTON_BACKLIGHT_TIMEOUT, buttonTimeout);
} else {
return false;
}
@@ -228,155 +138,4 @@ private void showScreenAutoBrightnessDialog() {
mScreenBrightnessDialog = new AutoBrightnessDialog(getActivity(), true);
mScreenBrightnessDialog.show();
}
-
- private void showButtonAutoBrightnessDialog() {
- if (mButtonBrightnessDialog != null && mButtonBrightnessDialog.isShowing()) {
- return;
- }
-
- mButtonBrightnessDialog = new AutoBrightnessDialog(getActivity(), false);
- mButtonBrightnessDialog.show();
- }
-
- private void showButtonManualBrightnessDialog() {
- if (mManualBrightnessDialog != null && mManualBrightnessDialog.isShowing()) {
- return;
- }
-
- mManualBrightnessDialog = new ManualButtonBrightnessDialog(getActivity());
- mManualBrightnessDialog.show();
- }
-
- private class ManualButtonBrightnessDialog extends AlertDialog implements DialogInterface.OnClickListener {
-
- private SeekBar mBacklightBar;
- private EditText mBacklightInput;
- private int mCurrentBrightness;
- private boolean mIsDragging = false;
-
- public ManualButtonBrightnessDialog(Context context) {
- super(context);
- }
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- final View v = getLayoutInflater().inflate(R.layout.dialog_manual_brightness, null);
- final Context context = getContext();
-
- mBacklightBar = (SeekBar) v.findViewById(R.id.backlight);
- mBacklightInput = (EditText) v.findViewById(R.id.backlight_input);
-
- setTitle(R.string.dialog_manual_brightness_title);
- setCancelable(true);
- setView(v);
-
- try {
- mCurrentBrightness = mPowerService.getCurrentButtonBrightnessValue();
- } catch(Exception e){
- }
-
- mBacklightBar.setMax(brightnessToProgress(PowerManager.BRIGHTNESS_ON));
- initListeners();
- init();
-
- setButton(DialogInterface.BUTTON_POSITIVE, context.getString(R.string.ok), this);
- setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(R.string.cancel), this);
-
- super.onCreate(savedInstanceState);
- }
-
- private int brightnessToProgress(int brightness) {
- return brightness * 100;
- }
-
- private int progressToBrightness(int progress) {
- int brightness = progress / 100;
- return brightness;
- }
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if (which == DialogInterface.BUTTON_POSITIVE) {
- try {
- int newBacklight = Integer.valueOf(mBacklightInput.getText().toString());
- Settings.System.putInt(getContext().getContentResolver(),
- Settings.System.CUSTOM_BUTTON_BRIGHTNESS, newBacklight);
- } catch (NumberFormatException e) {
- Log.d(TAG, "NumberFormatException " + e);
- }
- }
- }
-
- private void init() {
- int currentValue = Settings.System.getInt(getContext().getContentResolver(),
- Settings.System.CUSTOM_BUTTON_BRIGHTNESS, 100);
-
- mBacklightBar.setProgress(brightnessToProgress(currentValue));
- mBacklightInput.setText(String.valueOf(currentValue));
- }
-
- private void initListeners() {
- mBacklightBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
- @Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- if (mIsDragging) {
- int brightness = progressToBrightness(seekBar.getProgress());
- mBacklightInput.setText(String.valueOf(brightness));
- try {
- mPowerService.setButtonBrightness(brightness);
- } catch(Exception e){
- }
- }
- }
- @Override
- public void onStartTrackingTouch(SeekBar seekBar) {
- int brightness = progressToBrightness(seekBar.getProgress());
- try {
- mPowerService.setButtonBrightness(brightness);
- } catch(Exception e){
- }
- mIsDragging = true;
- }
- @Override
- public void onStopTrackingTouch(SeekBar seekBar) {
- try {
- mPowerService.setButtonBrightness(mCurrentBrightness);
- } catch(Exception e){
- }
- mIsDragging = false;
- }
- });
-
- mBacklightInput.addTextChangedListener(new TextWatcher() {
- @Override
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
- }
- @Override
- public void onTextChanged(CharSequence s, int start, int before, int count) {
- }
- @Override
- public void afterTextChanged(Editable s) {
- boolean ok = false;
- try {
- int minValue = 0;
- int maxValue = PowerManager.BRIGHTNESS_ON;
- int newBrightness = Integer.valueOf(s.toString());
-
- if (newBrightness >= minValue && newBrightness <= maxValue) {
- ok = true;
- mBacklightBar.setProgress(brightnessToProgress(newBrightness));
- }
- } catch (NumberFormatException e) {
- //ignored, ok is false ayway
- }
-
- Button okButton = mManualBrightnessDialog.getButton(DialogInterface.BUTTON_POSITIVE);
- if (okButton != null) {
- okButton.setEnabled(ok);
- }
- }
- });
- }
- }
}
-
diff --git a/src/org/omnirom/omnigears/brightness/ButtonBrightnessSettings.java b/src/org/omnirom/omnigears/brightness/ButtonBrightnessSettings.java
new file mode 100644
index 000000000..1948fc92a
--- /dev/null
+++ b/src/org/omnirom/omnigears/brightness/ButtonBrightnessSettings.java
@@ -0,0 +1,323 @@
+/*
+ * Copyright (C) 2014 The OmniROM Project
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package org.omnirom.omnigears.brightness;
+
+import com.android.settings.SettingsPreferenceFragment;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.PowerManager;
+import android.os.IPowerManager;
+import android.os.ServiceManager;
+import android.preference.Preference;
+import android.preference.PreferenceGroup;
+import android.preference.PreferenceScreen;
+import android.preference.ListPreference;
+import android.preference.CheckBoxPreference;
+import android.preference.PreferenceCategory;
+import android.provider.Settings;
+import android.view.View;
+import android.util.Log;
+import android.app.AlertDialog;
+import android.text.TextWatcher;
+import android.text.Editable;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.SeekBar;
+import android.widget.TextView;
+
+import org.omnirom.omnigears.R;
+import org.omnirom.omnigears.chameleonos.SeekBarPreference;
+
+public class ButtonBrightnessSettings extends SettingsPreferenceFragment implements
+ Preference.OnPreferenceChangeListener {
+ private static final String TAG = "ButtonBrightnessSettings";
+
+ private static final String KEY_BUTTON_NO_BRIGHTNESS = "button_no_brightness";
+ private static final String KEY_BUTTON_LINK_BRIGHTNESS = "button_link_brightness";
+ private static final String KEY_BUTTON_AUTO_BRIGHTNESS = "button_auto_brightness";
+ private static final String KEY_BUTTON_MANUAL_BRIGHTNESS = "button_manual_brightness";
+ private static final String KEY_BUTTON_TIMEOUT = "button_timeout";
+
+ private CheckBoxPreference mNoButtonBrightness;
+ private CheckBoxPreference mLinkButtonBrightness;
+ private Preference mAutomaticButtonBrightness;
+ private Preference mManualButtonBrightness;
+ private AutoBrightnessDialog mButtonBrightnessDialog;
+ private ManualButtonBrightnessDialog mManualBrightnessDialog;
+ private IPowerManager mPowerService;
+ private SeekBarPreference mButtonTimoutBar;
+
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.button_brightness_settings);
+
+ PreferenceScreen prefSet = getPreferenceScreen();
+ ContentResolver resolver = getActivity().getContentResolver();
+
+ mNoButtonBrightness = (CheckBoxPreference) findPreference(KEY_BUTTON_NO_BRIGHTNESS);
+ mNoButtonBrightness.setChecked(Settings.System.getInt(resolver,
+ Settings.System.CUSTOM_BUTTON_DISABLE_BRIGHTNESS, 0) != 0);
+
+ mLinkButtonBrightness = (CheckBoxPreference) findPreference(KEY_BUTTON_LINK_BRIGHTNESS);
+ mLinkButtonBrightness.setChecked(Settings.System.getInt(resolver,
+ Settings.System.CUSTOM_BUTTON_USE_SCREEN_BRIGHTNESS, 0) != 0);
+
+ mAutomaticButtonBrightness = (Preference) findPreference(KEY_BUTTON_AUTO_BRIGHTNESS);
+ mManualButtonBrightness = (Preference) findPreference(KEY_BUTTON_MANUAL_BRIGHTNESS);
+
+ mButtonTimoutBar = (SeekBarPreference) findPreference(KEY_BUTTON_TIMEOUT);
+ int currentTimeout = Settings.System.getInt(resolver,
+ Settings.System.BUTTON_BACKLIGHT_TIMEOUT, 0);
+ mButtonTimoutBar.setValue(currentTimeout);
+ mButtonTimoutBar.setOnPreferenceChangeListener(this);
+
+ mPowerService = IPowerManager.Stub.asInterface(ServiceManager.getService("power"));
+
+ updateEnablement();
+ }
+
+ private void updateEnablement() {
+ if (mNoButtonBrightness.isChecked()){
+ mLinkButtonBrightness.setEnabled(false);
+ mButtonTimoutBar.setEnabled(false);
+ mAutomaticButtonBrightness.setEnabled(false);
+ mManualButtonBrightness.setEnabled(false);
+ } else if (mLinkButtonBrightness.isChecked()){
+ mNoButtonBrightness.setEnabled(false);
+ mAutomaticButtonBrightness.setEnabled(false);
+ mManualButtonBrightness.setEnabled(false);
+ } else {
+ mNoButtonBrightness.setEnabled(true);
+ mLinkButtonBrightness.setEnabled(true);
+ mButtonTimoutBar.setEnabled(true);
+ mAutomaticButtonBrightness.setEnabled(true);
+ mManualButtonBrightness.setEnabled(true);
+ }
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+
+ if (mButtonBrightnessDialog != null) {
+ mButtonBrightnessDialog.dismiss();
+ }
+ if (mManualBrightnessDialog != null) {
+ mManualBrightnessDialog.dismiss();
+ }
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+ if (preference == mAutomaticButtonBrightness) {
+ showButtonAutoBrightnessDialog();
+ return true;
+ } else if (preference == mManualButtonBrightness) {
+ showButtonManualBrightnessDialog();
+ return true;
+ } else if (preference == mNoButtonBrightness) {
+ boolean checked = ((CheckBoxPreference)preference).isChecked();
+ Settings.System.putInt(getActivity().getContentResolver(),
+ Settings.System.CUSTOM_BUTTON_DISABLE_BRIGHTNESS, checked ? 1:0);
+ updateEnablement();
+ return true;
+ } else if (preference == mLinkButtonBrightness) {
+ boolean checked = ((CheckBoxPreference)preference).isChecked();
+ Settings.System.putInt(getActivity().getContentResolver(),
+ Settings.System.CUSTOM_BUTTON_USE_SCREEN_BRIGHTNESS, checked ? 1:0);
+ updateEnablement();
+ return true;
+ }
+ return super.onPreferenceTreeClick(preferenceScreen, preference);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object objValue) {
+ final String key = preference.getKey();
+
+ if (preference == mButtonTimoutBar) {
+ int buttonTimeout = (Integer) objValue;
+ Settings.System.putInt(getContentResolver(),
+ Settings.System.BUTTON_BACKLIGHT_TIMEOUT, buttonTimeout);
+ } else {
+ return false;
+ }
+ return true;
+ }
+
+ private void showButtonAutoBrightnessDialog() {
+ if (mButtonBrightnessDialog != null && mButtonBrightnessDialog.isShowing()) {
+ return;
+ }
+
+ mButtonBrightnessDialog = new AutoBrightnessDialog(getActivity(), false);
+ mButtonBrightnessDialog.show();
+ }
+
+ private void showButtonManualBrightnessDialog() {
+ if (mManualBrightnessDialog != null && mManualBrightnessDialog.isShowing()) {
+ return;
+ }
+
+ mManualBrightnessDialog = new ManualButtonBrightnessDialog(getActivity());
+ mManualBrightnessDialog.show();
+ }
+
+ private class ManualButtonBrightnessDialog extends AlertDialog implements DialogInterface.OnClickListener {
+
+ private SeekBar mBacklightBar;
+ private EditText mBacklightInput;
+ private int mCurrentBrightness;
+ private boolean mIsDragging = false;
+
+ public ManualButtonBrightnessDialog(Context context) {
+ super(context);
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ final View v = getLayoutInflater().inflate(R.layout.dialog_manual_brightness, null);
+ final Context context = getContext();
+
+ mBacklightBar = (SeekBar) v.findViewById(R.id.backlight);
+ mBacklightInput = (EditText) v.findViewById(R.id.backlight_input);
+
+ setTitle(R.string.dialog_manual_brightness_title);
+ setCancelable(true);
+ setView(v);
+
+ try {
+ mCurrentBrightness = mPowerService.getCurrentButtonBrightnessValue();
+ } catch(Exception e){
+ }
+
+ mBacklightBar.setMax(brightnessToProgress(PowerManager.BRIGHTNESS_ON));
+ initListeners();
+ init();
+
+ setButton(DialogInterface.BUTTON_POSITIVE, context.getString(R.string.ok), this);
+ setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(R.string.cancel), this);
+
+ super.onCreate(savedInstanceState);
+ }
+
+ private int brightnessToProgress(int brightness) {
+ return brightness * 100;
+ }
+
+ private int progressToBrightness(int progress) {
+ int brightness = progress / 100;
+ return brightness;
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ try {
+ int newBacklight = Integer.valueOf(mBacklightInput.getText().toString());
+ Settings.System.putInt(getContext().getContentResolver(),
+ Settings.System.CUSTOM_BUTTON_BRIGHTNESS, newBacklight);
+ } catch (NumberFormatException e) {
+ Log.d(TAG, "NumberFormatException " + e);
+ }
+ }
+ }
+
+ private void init() {
+ int currentValue = Settings.System.getInt(getContext().getContentResolver(),
+ Settings.System.CUSTOM_BUTTON_BRIGHTNESS, 100);
+
+ mBacklightBar.setProgress(brightnessToProgress(currentValue));
+ mBacklightInput.setText(String.valueOf(currentValue));
+ }
+
+ private void initListeners() {
+ mBacklightBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ if (mIsDragging) {
+ int brightness = progressToBrightness(seekBar.getProgress());
+ mBacklightInput.setText(String.valueOf(brightness));
+ try {
+ mPowerService.setButtonBrightness(brightness);
+ } catch(Exception e){
+ }
+ }
+ }
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ int brightness = progressToBrightness(seekBar.getProgress());
+ try {
+ mPowerService.setButtonBrightness(brightness);
+ } catch(Exception e){
+ }
+ mIsDragging = true;
+ }
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ try {
+ mPowerService.setButtonBrightness(mCurrentBrightness);
+ } catch(Exception e){
+ }
+ mIsDragging = false;
+ }
+ });
+
+ mBacklightInput.addTextChangedListener(new TextWatcher() {
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ }
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ }
+ @Override
+ public void afterTextChanged(Editable s) {
+ boolean ok = false;
+ try {
+ int minValue = 0;
+ int maxValue = PowerManager.BRIGHTNESS_ON;
+ int newBrightness = Integer.valueOf(s.toString());
+
+ if (newBrightness >= minValue && newBrightness <= maxValue) {
+ ok = true;
+ mBacklightBar.setProgress(brightnessToProgress(newBrightness));
+ }
+ } catch (NumberFormatException e) {
+ //ignored, ok is false ayway
+ }
+
+ Button okButton = mManualBrightnessDialog.getButton(DialogInterface.BUTTON_POSITIVE);
+ if (okButton != null) {
+ okButton.setEnabled(ok);
+ }
+ }
+ });
+ }
+ }
+}
+
diff --git a/src/org/omnirom/omnigears/chameleonos/ActiveDisplaySettings.java b/src/org/omnirom/omnigears/chameleonos/ActiveDisplaySettings.java
index b13c80be7..5de3a49ed 100644
--- a/src/org/omnirom/omnigears/chameleonos/ActiveDisplaySettings.java
+++ b/src/org/omnirom/omnigears/chameleonos/ActiveDisplaySettings.java
@@ -45,43 +45,43 @@ public class ActiveDisplaySettings extends SettingsPreferenceFragment implements
private static final String TAG = "ActiveDisplaySettings";
private static final String KEY_ENABLED = "ad_enable";
- private static final String KEY_SHOW_TEXT = "ad_text";
- private static final String KEY_SHOW_CONTENT = "ad_content";
+ private static final String KEY_ANNOYING = "ad_annoying";
private static final String KEY_BYPASS_CONTENT = "ad_bypass";
- private static final String KEY_ALL_NOTIFICATIONS = "ad_all_notifications";
- private static final String KEY_HIDE_LOW_PRIORITY = "ad_hide_low_priority";
private static final String KEY_POCKET_MODE = "ad_pocket_mode";
private static final String KEY_SUNLIGHT_MODE = "ad_sunlight_mode";
private static final String KEY_REDISPLAY = "ad_redisplay";
private static final String KEY_EXCLUDED_APPS = "ad_excluded_apps";
private static final String KEY_PRIVACY_APPS = "ad_privacy_apps";
- private static final String KEY_SHOW_DATE = "ad_show_date";
private static final String KEY_SHOW_AMPM = "ad_show_ampm";
private static final String KEY_BRIGHTNESS = "ad_brightness";
private static final String KEY_TIMEOUT = "ad_timeout";
private static final String KEY_THRESHOLD = "ad_threshold";
private static final String KEY_TURNOFF_MODE = "ad_turnoff_mode";
+ private static final String KEY_SHAKE_THRESHOLD = "ad_shake_threshold";
+ private static final String KEY_SHAKE_LONGTHRESHOLD = "ad_shake_long_threshold";
+ private static final String KEY_SHAKE_TIMEOUT = "ad_shake_timeout";
private ContentResolver mResolver;
private Context mContext;
private SwitchPreference mEnabledPref;
- private CheckBoxPreference mShowTextPref;
- private CheckBoxPreference mShowContentPref;
- private CheckBoxPreference mBypassPref;
- private CheckBoxPreference mAllNotificationsPref;
- private CheckBoxPreference mHideLowPriorityPref;
- private ListPreference mPocketModePref;
- private CheckBoxPreference mSunlightModePref;
- private ListPreference mRedisplayPref;
private AppMultiSelectListPreference mExcludedAppsPref;
private AppMultiSelectListPreference mPrivacyAppsPref;
- private CheckBoxPreference mShowDatePref;
+ private CheckBoxPreference mBypassPref;
private CheckBoxPreference mShowAmPmPref;
+ private CheckBoxPreference mSunlightModePref;
+ private CheckBoxPreference mTurnOffModePref;
private SeekBarPreference mBrightnessLevel;
+ private SeekBarPreference mAnnoyingNotification;
+ private SeekBarPreference mShakeThreshold;
+ private SeekBarPreference mShakeLongThreshold;
+ private SeekBarPreference mShakeTimeout;
private ListPreference mDisplayTimeout;
+ private ListPreference mPocketModePref;
private ListPreference mProximityThreshold;
- private CheckBoxPreference mTurnOffModePref;
+ private ListPreference mRedisplayPref;
+ private int mMinimumBacklight;
+ private int mMaximumBacklight;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -98,14 +98,6 @@ public void onCreate(Bundle savedInstanceState) {
Settings.System.ENABLE_ACTIVE_DISPLAY, 0) == 1));
mEnabledPref.setOnPreferenceChangeListener(this);
- mShowTextPref = (CheckBoxPreference) prefSet.findPreference(KEY_SHOW_TEXT);
- mShowTextPref.setChecked((Settings.System.getInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_TEXT, 0) == 1));
-
- mShowContentPref = (CheckBoxPreference) prefSet.findPreference(KEY_SHOW_CONTENT);
- mShowContentPref.setChecked((Settings.System.getInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_CONTENT, 1) != 0));
-
mBypassPref = (CheckBoxPreference) prefSet.findPreference(KEY_BYPASS_CONTENT);
mPocketModePref = (ListPreference) prefSet.findPreference(KEY_POCKET_MODE);
mProximityThreshold = (ListPreference) prefSet.findPreference(KEY_THRESHOLD);
@@ -123,27 +115,19 @@ public void onCreate(Bundle savedInstanceState) {
int mode = Settings.System.getInt(mResolver,
Settings.System.ACTIVE_DISPLAY_POCKET_MODE, 0);
mPocketModePref.setValue(String.valueOf(mode));
- updatePocketModeSummary(mode);
+ mPocketModePref.setSummary(mPocketModePref.getEntry());
mPocketModePref.setOnPreferenceChangeListener(this);
long threshold = Settings.System.getLong(mResolver,
Settings.System.ACTIVE_DISPLAY_THRESHOLD, 5000L);
mProximityThreshold.setValue(String.valueOf(threshold));
- updateThresholdSummary(threshold);
+ mProximityThreshold.setSummary(mProximityThreshold.getEntry());
mProximityThreshold.setOnPreferenceChangeListener(this);
mTurnOffModePref.setChecked((Settings.System.getInt(mResolver,
Settings.System.ACTIVE_DISPLAY_TURNOFF_MODE, 0) == 1));
}
- mAllNotificationsPref = (CheckBoxPreference) prefSet.findPreference(KEY_ALL_NOTIFICATIONS);
- mAllNotificationsPref.setChecked((Settings.System.getInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_ALL_NOTIFICATIONS, 0) == 1));
-
- mHideLowPriorityPref = (CheckBoxPreference) prefSet.findPreference(KEY_HIDE_LOW_PRIORITY);
- mHideLowPriorityPref.setChecked((Settings.System.getInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_HIDE_LOW_PRIORITY_NOTIFICATIONS, 0) == 1));
-
mSunlightModePref = (CheckBoxPreference) prefSet.findPreference(KEY_SUNLIGHT_MODE);
if (!DeviceUtils.deviceSupportsLightSensor(mContext)) {
@@ -157,37 +141,57 @@ public void onCreate(Bundle savedInstanceState) {
long timeout = Settings.System.getLong(mResolver,
Settings.System.ACTIVE_DISPLAY_REDISPLAY, 0);
mRedisplayPref.setValue(String.valueOf(timeout));
- updateRedisplaySummary(timeout);
+ mRedisplayPref.setSummary(mRedisplayPref.getEntry());
mRedisplayPref.setOnPreferenceChangeListener(this);
+ mAnnoyingNotification = (SeekBarPreference) prefSet.findPreference(KEY_ANNOYING);
+ mAnnoyingNotification.setValue(Settings.System.getInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_ANNOYING, 0));
+ mAnnoyingNotification.setOnPreferenceChangeListener(this);
+
+ mShakeThreshold = (SeekBarPreference) prefSet.findPreference(KEY_SHAKE_THRESHOLD);
+ mShakeThreshold.setValue(Settings.System.getInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_SHAKE_THRESHOLD, 10));
+ mShakeThreshold.setOnPreferenceChangeListener(this);
+
+ mShakeLongThreshold = (SeekBarPreference) prefSet.findPreference(KEY_SHAKE_LONGTHRESHOLD);
+ mShakeLongThreshold.setValue(Settings.System.getInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_SHAKE_LONGTHRESHOLD, 2));
+ mShakeLongThreshold.setOnPreferenceChangeListener(this);
+
+ mShakeTimeout = (SeekBarPreference) prefSet.findPreference(KEY_SHAKE_TIMEOUT);
+ mShakeTimeout.setValue(Settings.System.getInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_SHAKE_TIMEOUT, 10));
+ mShakeTimeout.setOnPreferenceChangeListener(this);
+
mExcludedAppsPref = (AppMultiSelectListPreference) prefSet.findPreference(KEY_EXCLUDED_APPS);
Set excludedApps = getExcludedApps();
- if (excludedApps != null) mExcludedAppsPref.setValues(excludedApps);
+ if (excludedApps != null) {
+ mExcludedAppsPref.setValues(excludedApps);
+ }
mExcludedAppsPref.setOnPreferenceChangeListener(this);
mPrivacyAppsPref = (AppMultiSelectListPreference) prefSet.findPreference(KEY_PRIVACY_APPS);
Set privacyApps = getPrivacyApps();
- if (privacyApps != null) mPrivacyAppsPref.setValues(privacyApps);
+ if (privacyApps != null) {
+ mPrivacyAppsPref.setValues(privacyApps);
+ }
mPrivacyAppsPref.setOnPreferenceChangeListener(this);
- mShowDatePref = (CheckBoxPreference) prefSet.findPreference(KEY_SHOW_DATE);
- mShowDatePref.setChecked((Settings.System.getInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_SHOW_DATE, 0) == 1));
-
mShowAmPmPref = (CheckBoxPreference) prefSet.findPreference(KEY_SHOW_AMPM);
mShowAmPmPref.setChecked((Settings.System.getInt(mResolver,
Settings.System.ACTIVE_DISPLAY_SHOW_AMPM, 0) == 1));
mShowAmPmPref.setEnabled(!is24Hour());
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
- int minimumBacklight = pm.getMinimumScreenBrightnessSetting();
- int maximumBacklight = pm.getMaximumScreenBrightnessSetting();
+ mMinimumBacklight = pm.getMinimumScreenBrightnessSetting();
+ mMaximumBacklight = pm.getMaximumScreenBrightnessSetting();
mBrightnessLevel = (SeekBarPreference) prefSet.findPreference(KEY_BRIGHTNESS);
- mBrightnessLevel.setMaxValue(maximumBacklight - minimumBacklight);
- mBrightnessLevel.setMinValue(minimumBacklight);
- mBrightnessLevel.setValue(Settings.System.getInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_BRIGHTNESS, maximumBacklight) - minimumBacklight);
+ int brightness = Settings.System.getInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_BRIGHTNESS, mMaximumBacklight);
+ int realBrightness = Math.round(((float)brightness / (float)mMaximumBacklight) * 100);
+ mBrightnessLevel.setValue(realBrightness);
mBrightnessLevel.setOnPreferenceChangeListener(this);
try {
@@ -200,18 +204,21 @@ public void onCreate(Bundle savedInstanceState) {
}
mDisplayTimeout = (ListPreference) prefSet.findPreference(KEY_TIMEOUT);
- mDisplayTimeout.setOnPreferenceChangeListener(this);
timeout = Settings.System.getLong(mResolver,
Settings.System.ACTIVE_DISPLAY_TIMEOUT, 8000L);
mDisplayTimeout.setValue(String.valueOf(timeout));
- updateTimeoutSummary(timeout);
+ mDisplayTimeout.setSummary(mDisplayTimeout.getEntry());
+ mDisplayTimeout.setOnPreferenceChangeListener(this);
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (preference == mRedisplayPref) {
- int timeout = Integer.valueOf((String) newValue);
- updateRedisplaySummary(timeout);
+ int val = Integer.parseInt((String) newValue);
+ int index = mRedisplayPref.findIndexOfValue((String) newValue);
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_REDISPLAY, val);
+ mRedisplayPref.setSummary(mRedisplayPref.getEntries()[index]);
return true;
} else if (preference == mEnabledPref) {
Settings.System.putInt(mResolver,
@@ -219,8 +226,11 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
((Boolean) newValue).booleanValue() ? 1 : 0);
return true;
} else if (preference == mPocketModePref) {
- int mode = Integer.valueOf((String) newValue);
- updatePocketModeSummary(mode);
+ int val = Integer.parseInt((String) newValue);
+ int index = mPocketModePref.findIndexOfValue((String) newValue);
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_POCKET_MODE, val);
+ mPocketModePref.setSummary(mPocketModePref.getEntries()[index]);
return true;
} else if (preference == mExcludedAppsPref) {
storeExcludedApps((Set) newValue);
@@ -228,18 +238,44 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
} else if (preference == mPrivacyAppsPref) {
storePrivacyApps((Set) newValue);
return true;
+ } else if (preference == mAnnoyingNotification) {
+ int annoying = ((Integer)newValue).intValue();
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_ANNOYING, annoying);
+ return true;
+ } else if (preference == mShakeThreshold) {
+ int threshold = ((Integer)newValue).intValue();
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_SHAKE_THRESHOLD, threshold);
+ return true;
+ } else if (preference == mShakeLongThreshold) {
+ int longThreshold = ((Integer)newValue).intValue();
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_SHAKE_LONGTHRESHOLD, longThreshold);
+ return true;
+ } else if (preference == mShakeTimeout) {
+ int timeout = ((Integer)newValue).intValue();
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_SHAKE_TIMEOUT, timeout);
+ return true;
} else if (preference == mBrightnessLevel) {
int brightness = ((Integer)newValue).intValue();
- Settings.System.putInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_BRIGHTNESS, brightness);
+ int realBrightness = Math.max(mMinimumBacklight, Math.round(((float)brightness / (float)100) * mMaximumBacklight));
+ Settings.System.putInt(mResolver, Settings.System.ACTIVE_DISPLAY_BRIGHTNESS, realBrightness);
return true;
} else if (preference == mDisplayTimeout) {
- long timeout = Integer.valueOf((String) newValue);
- updateTimeoutSummary(timeout);
+ int val = Integer.parseInt((String) newValue);
+ int index = mDisplayTimeout.findIndexOfValue((String) newValue);
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_TIMEOUT, val);
+ mDisplayTimeout.setSummary(mDisplayTimeout.getEntries()[index]);
return true;
} else if (preference == mProximityThreshold) {
- long threshold = Integer.valueOf((String) newValue);
- updateThresholdSummary(threshold);
+ int val = Integer.parseInt((String) newValue);
+ int index = mProximityThreshold.findIndexOfValue((String) newValue);
+ Settings.System.putInt(mResolver,
+ Settings.System.ACTIVE_DISPLAY_THRESHOLD, val);
+ mProximityThreshold.setSummary(mProximityThreshold.getEntries()[index]);
return true;
}
return false;
@@ -248,41 +284,16 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
boolean value;
- if (preference == mShowTextPref) {
- value = mShowTextPref.isChecked();
- Settings.System.putInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_TEXT,
- value ? 1 : 0);
- } else if (preference == mShowContentPref) {
- value = mShowContentPref.isChecked();
- Settings.System.putInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_CONTENT,
- value ? 1 : 0);
- } else if (preference == mBypassPref) {
+ if (preference == mBypassPref) {
value = mBypassPref.isChecked();
Settings.System.putInt(mResolver,
Settings.System.ACTIVE_DISPLAY_BYPASS,
value ? 1 : 0);
- } else if (preference == mAllNotificationsPref) {
- value = mAllNotificationsPref.isChecked();
- Settings.System.putInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_ALL_NOTIFICATIONS,
- value ? 1 : 0);
- } else if (preference == mHideLowPriorityPref) {
- value = mHideLowPriorityPref.isChecked();
- Settings.System.putInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_HIDE_LOW_PRIORITY_NOTIFICATIONS,
- value ? 1 : 0);
} else if (preference == mSunlightModePref) {
value = mSunlightModePref.isChecked();
Settings.System.putInt(mResolver,
Settings.System.ACTIVE_DISPLAY_SUNLIGHT_MODE,
value ? 1 : 0);
- } else if (preference == mShowDatePref) {
- value = mShowDatePref.isChecked();
- Settings.System.putInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_SHOW_DATE,
- value ? 1 : 0);
} else if (preference == mShowAmPmPref) {
value = mShowAmPmPref.isChecked();
Settings.System.putInt(mResolver,
@@ -300,43 +311,12 @@ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preferen
return true;
}
- private void updatePocketModeSummary(int value) {
- mPocketModePref.setSummary(
- mPocketModePref.getEntries()[mPocketModePref.findIndexOfValue("" + value)]);
- Settings.System.putInt(mResolver,
- Settings.System.ACTIVE_DISPLAY_POCKET_MODE, value);
- }
-
- private void updateRedisplaySummary(long value) {
- mRedisplayPref.setSummary(mRedisplayPref.getEntries()[mRedisplayPref.findIndexOfValue("" + value)]);
- Settings.System.putLong(mResolver,
- Settings.System.ACTIVE_DISPLAY_REDISPLAY, value);
- }
-
- private void updateTimeoutSummary(long value) {
- try {
- mDisplayTimeout.setSummary(mDisplayTimeout.getEntries()[mDisplayTimeout.findIndexOfValue("" + value)]);
- Settings.System.putLong(mResolver,
- Settings.System.ACTIVE_DISPLAY_TIMEOUT, value);
- } catch (ArrayIndexOutOfBoundsException e) {
- }
- }
-
- private void updateThresholdSummary(long value) {
- try {
- mProximityThreshold.setSummary(mProximityThreshold.getEntries()[mProximityThreshold.findIndexOfValue("" + value)]);
- Settings.System.putLong(mResolver,
- Settings.System.ACTIVE_DISPLAY_THRESHOLD, value);
- } catch (ArrayIndexOutOfBoundsException e) {
- }
- }
-
private Set getExcludedApps() {
String excluded = Settings.System.getString(mResolver,
Settings.System.ACTIVE_DISPLAY_EXCLUDED_APPS);
- if (TextUtils.isEmpty(excluded))
+ if (TextUtils.isEmpty(excluded)) {
return null;
-
+ }
return new HashSet(Arrays.asList(excluded.split("\\|")));
}
@@ -355,9 +335,9 @@ private void storeExcludedApps(Set values) {
private Set getPrivacyApps() {
String privacies = Settings.System.getString(mResolver,
Settings.System.ACTIVE_DISPLAY_PRIVACY_APPS);
- if (TextUtils.isEmpty(privacies))
+ if (TextUtils.isEmpty(privacies)) {
return null;
-
+ }
return new HashSet(Arrays.asList(privacies.split("\\|")));
}
diff --git a/src/org/omnirom/omnigears/chameleonos/AppMultiSelectListPreference.java b/src/org/omnirom/omnigears/chameleonos/AppMultiSelectListPreference.java
index 6600a47cc..2e8e19d36 100644
--- a/src/org/omnirom/omnigears/chameleonos/AppMultiSelectListPreference.java
+++ b/src/org/omnirom/omnigears/chameleonos/AppMultiSelectListPreference.java
@@ -175,14 +175,17 @@ protected void onDialogClosed(boolean positiveResult) {
@Override
protected Object onGetDefaultValue(TypedArray a, int index) {
final CharSequence[] defaultValues = a.getTextArray(index);
- final int valueCount = defaultValues.length;
- final Set result = new HashSet();
+ if (defaultValues != null) {
+ final int valueCount = defaultValues.length;
+ final Set result = new HashSet();
- for (int i = 0; i < valueCount; i++) {
- result.add(defaultValues[i].toString());
- }
+ for (int i = 0; i < valueCount; i++) {
+ result.add(defaultValues[i].toString());
+ }
- return result;
+ return result;
+ }
+ return null;
}
@Override
@@ -256,11 +259,11 @@ public static AppViewHolder createOrRecycle(LayoutInflater inflater, View conver
private final static Comparator sDisplayNameComparator
= new Comparator() {
- public final int
- compare(MyApplicationInfo a, MyApplicationInfo b) {
- return collator.compare(a.label, b.label);
- }
private final Collator collator = Collator.getInstance();
+
+ public final int compare(MyApplicationInfo a, MyApplicationInfo b) {
+ return collator.compare(a.label, b.label);
+ }
};
}
diff --git a/src/org/omnirom/omnigears/chameleonos/SeekBarPreference.java b/src/org/omnirom/omnigears/chameleonos/SeekBarPreference.java
index 50c83e54c..ea76ca8f0 100644
--- a/src/org/omnirom/omnigears/chameleonos/SeekBarPreference.java
+++ b/src/org/omnirom/omnigears/chameleonos/SeekBarPreference.java
@@ -100,7 +100,7 @@ public void onDependencyChanged(Preference dependency, boolean disableDependent)
@Override
protected View onCreateView(ViewGroup parent){
-
+
RelativeLayout layout = null;
try {
LayoutInflater mInflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@@ -119,7 +119,7 @@ public void onBindView(View view) {
// move our seekbar to the new view we've been given
ViewParent oldContainer = mSeekBar.getParent();
ViewGroup newContainer = (ViewGroup) view.findViewById(R.id.seekBarPrefBarContainer);
-
+
if (oldContainer != newContainer) {
// remove the seekbar from the old view
if (oldContainer != null) {
@@ -173,7 +173,7 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
// change rejected, revert to the previous value
if (!callChangeListener(newValue)) {
seekBar.setProgress(mCurrentValue - mMinValue);
- return;
+ return;
}
// change accepted, store it
@@ -190,7 +190,7 @@ public void onStopTrackingTouch(SeekBar seekBar) {
notifyChanged();
}
- @Override
+ @Override
protected Object onGetDefaultValue(TypedArray ta, int index){
int defaultValue = ta.getInt(index, DEFAULT_VALUE);
return defaultValue;
diff --git a/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java b/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java
index 81a8f6d8c..b17869b7d 100644
--- a/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java
+++ b/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java
@@ -34,10 +34,14 @@
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
+import android.preference.PreferenceCategory;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
+import org.omnirom.omnigears.preference.SystemCheckBoxPreference;
+import org.omnirom.omnigears.chameleonos.SeekBarPreference;
import com.android.internal.util.omni.DeviceUtils;
+import com.android.settings.Utils;
public class BarsSettings extends SettingsPreferenceFragment implements
Preference.OnPreferenceChangeListener {
@@ -54,11 +58,20 @@ public class BarsSettings extends SettingsPreferenceFragment implements
private static final String NETWORK_TRAFFIC_PERIOD = "network_traffic_period";
private static final String STATUS_BAR_NETWORK_ACTIVITY = "status_bar_network_activity";
private static final String SOFT_BACK_KILL_APP = "soft_back_kill_app";
+ private static final String TINTED_STATUSBAR = "tinted_statusbar";
+ private static final String TINTED_STATUSBAR_OPTION = "tinted_statusbar_option";
+ private static final String TINTED_STATUSBAR_FILTER = "status_bar_tinted_filter";
+ private static final String TINTED_STATUSBAR_TRANSPARENT = "tinted_statusbar_transparent";
+ private static final String TINTED_NAVBAR_TRANSPARENT = "tinted_navbar_transparent";
+ private static final String TINTED_FULL_MODE = "status_bar_tinted_full_mode";
private static final String EMULATE_MENU_KEY = "emulate_menu_key";
+ private static final String CATEGORY_TINTED = "category_tinted_statusbar";
private CheckBoxPreference mStatusBarBrightnessControl;
private CheckBoxPreference mStatusBarNotifCount;
private CheckBoxPreference mQuickSettingsDynamic;
+ private ListPreference mTintedStatusbar;
+ private ListPreference mTintedStatusbarOption;
private ListPreference mQuickPulldown;
private ListPreference mSmartPulldown;
private ListPreference mNetTrafficState;
@@ -67,6 +80,10 @@ public class BarsSettings extends SettingsPreferenceFragment implements
private CheckBoxPreference mStatusBarNetworkActivity;
private CheckBoxPreference mSoftBackKillApp;
private CheckBoxPreference mEmulateMenuKey;
+ private SystemCheckBoxPreference mTintedStatusbarFilter;
+ private SystemCheckBoxPreference mTintedFullMode;
+ private SeekBarPreference mTintedStatusbarTransparency;
+ private SeekBarPreference mTintedNavbarTransparency;
private int mNetTrafficVal;
private int MASK_UP;
@@ -104,10 +121,38 @@ public void onCreate(Bundle savedInstanceState) {
Settings.System.STATUS_BAR_NOTIF_COUNT, 0) == 1);
mStatusBarNotifCount.setOnPreferenceChangeListener(this);
+ final PreferenceCategory tintedCategory =
+ (PreferenceCategory) prefSet.findPreference(CATEGORY_TINTED);
+
+ int tintedStatusbar = getTintedStatusbarColor(resolver);
+
+ mTintedStatusbar = (ListPreference) findPreference(TINTED_STATUSBAR);
+ mTintedStatusbar.setValue(String.valueOf(tintedStatusbar));
+ mTintedStatusbar.setSummary(mTintedStatusbar.getEntry());
+ mTintedStatusbar.setOnPreferenceChangeListener(this);
+
+ mTintedStatusbarFilter = (SystemCheckBoxPreference) findPreference(TINTED_STATUSBAR_FILTER);
+ mTintedStatusbarFilter.setEnabled(tintedStatusbar != 0);
+
+ int tintedStatusbarOption = getTintedStatusbarOption(resolver);
+
+ mTintedFullMode = (SystemCheckBoxPreference) findPreference(TINTED_FULL_MODE);
+ mTintedFullMode.setEnabled((tintedStatusbar == 2) &&
+ (tintedStatusbarOption == 0 || tintedStatusbarOption == 2));
+
+ mTintedStatusbarTransparency = (SeekBarPreference) findPreference(TINTED_STATUSBAR_TRANSPARENT);
+ mTintedStatusbarTransparency.setValue(Settings.System.getInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_STATBAR_TRANSPARENT, 100));
+ mTintedStatusbarTransparency.setEnabled(tintedStatusbar != 0);
+ mTintedStatusbarTransparency.setOnPreferenceChangeListener(this);
+
+ mTintedStatusbarOption = (ListPreference) findPreference(TINTED_STATUSBAR_OPTION);
+ mTintedNavbarTransparency = (SeekBarPreference) findPreference(TINTED_NAVBAR_TRANSPARENT);
+
mQuickPulldown = (ListPreference) findPreference(QUICK_PULLDOWN);
mSmartPulldown = (ListPreference) findPreference(SMART_PULLDOWN);
- if (DeviceUtils.isPhone(getActivity())) {
+ if (Utils.isPhone(getActivity())) {
int quickPulldown = Settings.System.getInt(resolver,
Settings.System.QS_QUICK_PULLDOWN, 0);
mQuickPulldown.setValue(String.valueOf(quickPulldown));
@@ -168,15 +213,24 @@ public void onCreate(Bundle savedInstanceState) {
prefSet.removePreference(findPreference(NETWORK_TRAFFIC_PERIOD));
}
- boolean hasNavBar = getResources().getBoolean(
- com.android.internal.R.bool.config_showNavigationBar);
- // Also check, if users without navigation bar force enabled it.
- hasNavBar = hasNavBar || (SystemProperties.getInt("qemu.hw.mainkeys", 1) == 0);
+ boolean hasNavBar = DeviceUtils.deviceSupportNavigationBar(getActivity());
// Hide navigation bar category on devices without navigation bar
if (!hasNavBar) {
+ tintedCategory.removePreference(mTintedStatusbarOption);
+ tintedCategory.removePreference(mTintedNavbarTransparency);
prefSet.removePreference(findPreference(CATEGORY_NAVBAR));
} else {
+ mTintedStatusbarOption.setValue(String.valueOf(tintedStatusbarOption));
+ mTintedStatusbarOption.setSummary(mTintedStatusbarOption.getEntry());
+ mTintedStatusbarOption.setEnabled(tintedStatusbar != 0);
+ mTintedStatusbarOption.setOnPreferenceChangeListener(this);
+
+ mTintedNavbarTransparency.setValue(Settings.System.getInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_NAVBAR_TRANSPARENT, 100));
+ mTintedNavbarTransparency.setEnabled(tintedStatusbar != 0);
+ mTintedNavbarTransparency.setOnPreferenceChangeListener(this);
+
mSoftBackKillApp = (CheckBoxPreference) prefSet.findPreference(SOFT_BACK_KILL_APP);
mSoftBackKillApp.setChecked(Settings.System.getInt(resolver,
Settings.System.SOFT_BACK_KILL_APP_ENABLE, 0) == 1);
@@ -209,6 +263,41 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
boolean value = (Boolean) objValue;
Settings.System.putInt(resolver,
Settings.System.QUICK_SETTINGS_TILES_ROW, value ? 1 : 0);
+ } else if (preference == mTintedStatusbar) {
+ int val = Integer.parseInt((String) objValue);
+ int index = mTintedStatusbar.findIndexOfValue((String) objValue);
+ Settings.System.putInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_COLOR, val);
+ mTintedStatusbar.setSummary(mTintedStatusbar.getEntries()[index]);
+ if (mTintedStatusbarOption != null) {
+ mTintedStatusbarOption.setEnabled(val != 0);
+ }
+ mTintedStatusbarFilter.setEnabled(val != 0);
+ mTintedFullMode.setEnabled((val == 2) &&
+ ((getTintedStatusbarOption(resolver) == 0) ||
+ (getTintedStatusbarOption(resolver) == 2)));
+ mTintedStatusbarTransparency.setEnabled(val != 0);
+ if (mTintedNavbarTransparency != null) {
+ mTintedNavbarTransparency.setEnabled(val != 0);
+ }
+ } else if (preference == mTintedStatusbarOption) {
+ int val = Integer.parseInt((String) objValue);
+ int index = mTintedStatusbarOption.findIndexOfValue((String) objValue);
+ Settings.System.putInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_OPTION, val);
+ mTintedStatusbarOption.setSummary(mTintedStatusbarOption.getEntries()[index]);
+ mTintedFullMode.setEnabled((getTintedStatusbarColor(resolver) == 2) &&
+ ((val == 0) || (val == 2)));
+ } else if (preference == mTintedStatusbarTransparency) {
+ int val = ((Integer)objValue).intValue();
+ Settings.System.putInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_STATBAR_TRANSPARENT, val);
+ return true;
+ } else if (preference == mTintedNavbarTransparency) {
+ int val = ((Integer)objValue).intValue();
+ Settings.System.putInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_NAVBAR_TRANSPARENT, val);
+ return true;
} else if (preference == mQuickPulldown) {
int val = Integer.parseInt((String) objValue);
int index = mQuickPulldown.findIndexOfValue((String) objValue);
@@ -265,6 +354,18 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
return true;
}
+ private int getTintedStatusbarColor(ContentResolver resolver) {
+ int tintedStatusbar = Settings.System.getInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_COLOR, 0);
+ return tintedStatusbar;
+ }
+
+ private int getTintedStatusbarOption(ContentResolver resolver) {
+ int tintedStatusbarOption = Settings.System.getInt(resolver,
+ Settings.System.STATUS_BAR_TINTED_OPTION, 0);
+ return tintedStatusbarOption;
+ }
+
private void loadResources() {
Resources resources = getActivity().getResources();
MASK_UP = resources.getInteger(R.integer.maskUp);
diff --git a/src/org/omnirom/omnigears/interfacesettings/LockscreenSettings.java b/src/org/omnirom/omnigears/interfacesettings/LockscreenSettings.java
new file mode 100644
index 000000000..59b9b007a
--- /dev/null
+++ b/src/org/omnirom/omnigears/interfacesettings/LockscreenSettings.java
@@ -0,0 +1,190 @@
+/*
+ * Copyright (C) 2013 The OmniROM Project
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package org.omnirom.omnigears.interfacesettings;
+
+import android.app.ActivityManager;
+import android.app.ActivityManagerNative;
+import android.app.admin.DevicePolicyManager;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.pm.UserInfo;
+import android.hardware.Camera;
+import android.os.Bundle;
+import android.os.UserManager;
+import android.os.RemoteException;
+import android.preference.CheckBoxPreference;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.PreferenceScreen;
+import android.provider.Settings;
+import android.util.Log;
+
+import com.android.internal.widget.LockPatternUtils;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.omnirom.omnigears.chameleonos.SeekBarPreference;
+
+public class LockscreenSettings extends SettingsPreferenceFragment implements
+ Preference.OnPreferenceChangeListener {
+ private static final String TAG = "LockscreenSettings";
+
+ private LockPatternUtils mLockPatternUtils;
+ private DevicePolicyManager mDPM;
+
+ private static final String KEY_MAXIMIZE_WIDGETS = "maximize_widgets";
+ private static final String KEY_ENABLE_CAMERA = "enable_camera";
+ private static final String KEY_BATTERY_AROUND_LOCKSCREEN_RING = "battery_around_lockscreen_ring";
+ private static final String KEY_LOCKSCREEN_CUSTOM_WALLPAPER = "lockscreen_custom_wallpaper";
+ private static final String KEY_BLUR = "lockscreen_blur";
+ private static final String KEY_BLUR_RADIUS = "lockscreen_blur_radius";
+
+ private CheckBoxPreference mMaximizeWidgets;
+ private CheckBoxPreference mEnableCameraWidget;
+ private CheckBoxPreference mLockRingBattery;
+ private CheckBoxPreference mBlur;
+ private Preference mLockscreenWallpaper;
+ private SeekBarPreference mBlurRadius;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.lockscreen_settings);
+
+ ContentResolver resolver = getContentResolver();
+ PreferenceScreen root = getPreferenceScreen();
+ mLockPatternUtils = new LockPatternUtils(getActivity());
+ mDPM = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
+
+ if (!mLockPatternUtils.isLockScreenDisabled() && !mLockPatternUtils.isSecure()) {
+ addPreferencesFromResource(R.xml.og_security_settings_chooser);
+ }
+
+ // Add the additional Omni settings
+ mLockRingBattery = (CheckBoxPreference) root
+ .findPreference(KEY_BATTERY_AROUND_LOCKSCREEN_RING);
+ if (mLockRingBattery != null) {
+ mLockRingBattery.setChecked(Settings.System.getInt(getContentResolver(),
+ Settings.System.BATTERY_AROUND_LOCKSCREEN_RING, 0) == 1);
+ }
+
+ // Enable or disable keyguard widget checkbox based on DPM state
+ mMaximizeWidgets = (CheckBoxPreference) findPreference(KEY_MAXIMIZE_WIDGETS);
+ if (ActivityManager.isLowRamDeviceStatic() || mLockPatternUtils.isLockScreenDisabled()) {
+ // Widgets take a lot of RAM, so disable them on low-memory devices
+ root.removePreference(mMaximizeWidgets);
+ } else {
+ mMaximizeWidgets.setChecked(Settings.System.getInt(resolver,
+ Settings.System.LOCKSCREEN_MAXIMIZE_WIDGETS, 0) == 1);
+ }
+
+ // Enable or disable camera widget settings based on device
+ mEnableCameraWidget = (CheckBoxPreference) findPreference(KEY_ENABLE_CAMERA);
+ if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA) ||
+ Camera.getNumberOfCameras() == 0) {
+ root.removePreference(mEnableCameraWidget);
+ } else if (isCameraDisabledByDpm()) {
+ mEnableCameraWidget.setEnabled(false);
+ } else {
+ mEnableCameraWidget.setChecked(Settings.System.getInt(resolver,
+ Settings.System.LOCKSCREEN_ENABLE_CAMERA, 1) == 1);
+ }
+
+ int blur = Settings.System.getInt(resolver,
+ Settings.System.LOCKSCREEN_SEE_THROUGH, 0);
+
+ mLockscreenWallpaper = (Preference) findPreference(KEY_LOCKSCREEN_CUSTOM_WALLPAPER);
+ if (blur != 0) {
+ mLockscreenWallpaper.setEnabled(false);
+ mLockscreenWallpaper.setSummary(getResources().getString(R.string.lockscreen_wallpaper_disabled));
+ } else {
+ mLockscreenWallpaper.setEnabled(true);
+ }
+
+ // Lockscreen Blur
+
+ mBlur = (CheckBoxPreference) findPreference(KEY_BLUR);
+ mBlur.setChecked(blur == 1);
+ mBlur.setOnPreferenceChangeListener(this);
+
+ mBlurRadius = (SeekBarPreference) findPreference(KEY_BLUR_RADIUS);
+ mBlurRadius.setValue(Settings.System.getInt(resolver,
+ Settings.System.LOCKSCREEN_BLUR_RADIUS, 12));
+ mBlurRadius.setOnPreferenceChangeListener(this);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object objValue) {
+ ContentResolver resolver = getActivity().getContentResolver();
+ if (preference == mBlur) {
+ int blur = (Boolean) objValue ? 1 : 0;
+ Settings.System.putInt(resolver,
+ Settings.System.LOCKSCREEN_SEE_THROUGH, blur);
+ if (blur != 0) {
+ mLockscreenWallpaper.setEnabled(false);
+ mLockscreenWallpaper.setSummary(getResources().getString(R.string.lockscreen_wallpaper_disabled));
+ } else {
+ mLockscreenWallpaper.setEnabled(true);
+ mLockscreenWallpaper.setSummary("");
+ }
+ } else if (preference == mBlurRadius) {
+ Settings.System.putInt(resolver,
+ Settings.System.LOCKSCREEN_BLUR_RADIUS, (Integer) objValue);
+ }
+ return true;
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+ mLockPatternUtils = new LockPatternUtils(getActivity());
+ if (preference == mMaximizeWidgets) {
+ Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(),
+ Settings.System.LOCKSCREEN_MAXIMIZE_WIDGETS, mMaximizeWidgets.isChecked() ? 1 : 0);
+ } else if (preference == mLockRingBattery) {
+ Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(),
+ Settings.System.BATTERY_AROUND_LOCKSCREEN_RING, mLockRingBattery.isChecked() ? 1 : 0);
+ } else if (preference == mEnableCameraWidget) {
+ Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(),
+ Settings.System.LOCKSCREEN_ENABLE_CAMERA, mEnableCameraWidget.isChecked() ? 1 : 0);
+ }
+ // If we didn't handle it, let preferences handle it.
+ return super.onPreferenceTreeClick(preferenceScreen, preference);
+ }
+
+ private boolean isCameraDisabledByDpm() {
+ final DevicePolicyManager dpm =
+ (DevicePolicyManager) this.getSystemService(Context.DEVICE_POLICY_SERVICE);
+ if (dpm != null) {
+ try {
+ final int userId = ActivityManagerNative.getDefault().getCurrentUser().id;
+ final int disabledFlags = dpm.getKeyguardDisabledFeatures(null, userId);
+ final boolean disabledBecauseKeyguardSecure =
+ (disabledFlags & DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA) != 0;
+ return dpm.getCameraDisabled(null) || disabledBecauseKeyguardSecure;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Can't get userId", e);
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/org/omnirom/omnigears/interfacesettings/MoreInterfaceSettings.java b/src/org/omnirom/omnigears/interfacesettings/MoreInterfaceSettings.java
index 08e7e6911..68fdcad3d 100644
--- a/src/org/omnirom/omnigears/interfacesettings/MoreInterfaceSettings.java
+++ b/src/org/omnirom/omnigears/interfacesettings/MoreInterfaceSettings.java
@@ -34,6 +34,7 @@
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
+import android.preference.PreferenceCategory;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.util.Log;
@@ -49,6 +50,7 @@ public class MoreInterfaceSettings extends SettingsPreferenceFragment implements
"recents_memory_indicator_location";
private static final String RECENTS_USE_OMNISWITCH = "recents_use_omniswitch";
private static final String OMNISWITCH_START_SETTINGS = "omniswitch_start_settings";
+ private static final String CATEGORY_USE_OMNISWITCH = "category_omniswitch";
// Package name of the omnniswitch app
public static final String OMNISWITCH_PACKAGE_NAME = "org.omnirom.omniswitch";
@@ -63,6 +65,7 @@ public class MoreInterfaceSettings extends SettingsPreferenceFragment implements
private CheckBoxPreference mRecentsUseOmniSwitch;
private Preference mOmniSwitchSettings;
private boolean mOmniSwitchInitCalled;
+ private PreferenceCategory mOmniSwitchCategory;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -97,21 +100,23 @@ public void onCreate(Bundle savedInstanceState) {
}
mRecentsMemoryIndicatorPosition.setOnPreferenceChangeListener(this);
- mRecentsUseOmniSwitch = (CheckBoxPreference)
- prefSet.findPreference(RECENTS_USE_OMNISWITCH);
+ mOmniSwitchCategory = (PreferenceCategory) prefSet.findPreference(CATEGORY_USE_OMNISWITCH);
+ boolean omniSwitchAvailable = isOmniSwitchAvailable();
- try {
+ if (!omniSwitchAvailable){
+ Settings.System.putInt(resolver, Settings.System.RECENTS_USE_OMNISWITCH, 0);
+ prefSet.removePreference(mOmniSwitchCategory);
+ } else {
+ mRecentsUseOmniSwitch = (CheckBoxPreference)
+ prefSet.findPreference(RECENTS_USE_OMNISWITCH);
mRecentsUseOmniSwitch.setChecked(Settings.System.getInt(resolver,
- Settings.System.RECENTS_USE_OMNISWITCH) == 1);
- mOmniSwitchInitCalled = true;
- } catch(SettingNotFoundException e){
- // if the settings value is unset
- }
- mRecentsUseOmniSwitch.setOnPreferenceChangeListener(this);
+ Settings.System.RECENTS_USE_OMNISWITCH, 0) == 1);
+ mRecentsUseOmniSwitch.setOnPreferenceChangeListener(this);
- mOmniSwitchSettings = (Preference)
- prefSet.findPreference(OMNISWITCH_START_SETTINGS);
- mOmniSwitchSettings.setEnabled(mRecentsUseOmniSwitch.isChecked());
+ mOmniSwitchSettings = (Preference)
+ prefSet.findPreference(OMNISWITCH_START_SETTINGS);
+ mOmniSwitchSettings.setEnabled(mRecentsUseOmniSwitch.isChecked());
+ }
}
@Override
@@ -142,10 +147,6 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
resolver, Settings.System.RECENTS_MEMORY_INDICATOR_LOCATION, value);
} else if (preference == mRecentsUseOmniSwitch) {
boolean value = (Boolean) objValue;
- if (value && !isOmniSwitchInstalled()){
- openOmniSwitchNotInstalledWarning();
- return false;
- }
// if value has never been set before
if (value && !mOmniSwitchInitCalled){
@@ -155,10 +156,7 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
Settings.System.putInt(
resolver, Settings.System.RECENTS_USE_OMNISWITCH, value ? 1 : 0);
- mOmniSwitchSettings.setEnabled(value && isOmniSwitchInstalled());
- mOmniSwitchSettings.setSummary(isOmniSwitchInstalled() ?
- getResources().getString(R.string.omniswitch_start_settings_summary) :
- getResources().getString(R.string.omniswitch_not_installed_summary));
+ mOmniSwitchSettings.setEnabled(value);
} else {
return false;
}
@@ -166,16 +164,6 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
return true;
}
- private void openOmniSwitchNotInstalledWarning() {
- new AlertDialog.Builder(getActivity())
- .setTitle(getResources().getString(R.string.omniswitch_not_installed_title))
- .setMessage(getResources().getString(R.string.omniswitch_not_installed_message))
- .setNegativeButton(android.R.string.ok, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int whichButton) {
- }
- }).show();
- }
-
private void openOmniSwitchFirstTimeWarning() {
new AlertDialog.Builder(getActivity())
.setTitle(getResources().getString(R.string.omniswitch_first_time_title))
@@ -186,11 +174,13 @@ public void onClick(DialogInterface dialog, int whichButton) {
}).show();
}
- private boolean isOmniSwitchInstalled() {
+ private boolean isOmniSwitchAvailable() {
final PackageManager pm = getPackageManager();
try {
pm.getPackageInfo(OMNISWITCH_PACKAGE_NAME, PackageManager.GET_ACTIVITIES);
- return true;
+ int enabled = pm.getApplicationEnabledSetting(OMNISWITCH_PACKAGE_NAME);
+ return enabled != PackageManager.COMPONENT_ENABLED_STATE_DISABLED &&
+ enabled != PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER;
} catch (NameNotFoundException e) {
return false;
}
diff --git a/src/org/omnirom/omnigears/interfacesettings/NavBarDimen.java b/src/org/omnirom/omnigears/interfacesettings/NavBarDimen.java
new file mode 100644
index 000000000..be854d96c
--- /dev/null
+++ b/src/org/omnirom/omnigears/interfacesettings/NavBarDimen.java
@@ -0,0 +1,121 @@
+package org.omnirom.omnigears.interfacesettings;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.os.PowerManager;
+import android.preference.CheckBoxPreference;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.PreferenceCategory;
+import android.preference.PreferenceScreen;
+import android.provider.Settings;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import com.android.settings.Utils;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.R;
+
+public class NavBarDimen extends SettingsPreferenceFragment implements
+ OnPreferenceChangeListener {
+
+ private static final String TAG = "NavBarDimen";
+ private static final String PREF_NAVIGATION_BAR_HEIGHT = "navigation_bar_height";
+ private static final String PREF_NAVIGATION_BAR_HEIGHT_LANDSCAPE = "navigation_bar_height_landscape";
+ private static final String PREF_NAVIGATION_BAR_WIDTH = "navigation_bar_width";
+ private static final String KEY_DIMEN_OPTIONS = "navbar_dimen";
+
+ ListPreference mNavigationBarHeight;
+ ListPreference mNavigationBarHeightLandcape;
+ ListPreference mNavigationBarWidth;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Load the preferences from an XML resource
+ addPreferencesFromResource(R.xml.navbar_dimen_settings);
+
+ PreferenceScreen prefSet = getPreferenceScreen();
+
+ mNavigationBarHeight =
+ (ListPreference) findPreference(PREF_NAVIGATION_BAR_HEIGHT);
+ mNavigationBarHeight.setOnPreferenceChangeListener(this);
+
+ mNavigationBarHeightLandcape =
+ (ListPreference) findPreference(PREF_NAVIGATION_BAR_HEIGHT_LANDSCAPE);
+ mNavigationBarHeightLandcape.setOnPreferenceChangeListener(this);
+
+ mNavigationBarWidth =
+ (ListPreference) findPreference(PREF_NAVIGATION_BAR_WIDTH);
+
+ if (!Utils.isPhone(getActivity())) {
+ prefSet.removePreference(mNavigationBarWidth);
+ mNavigationBarWidth = null;
+ } else {
+ mNavigationBarWidth.setOnPreferenceChangeListener(this);
+ }
+
+ updateDimensionValues();
+ }
+
+ private void updateDimensionValues() {
+ int navigationBarHeight = Settings.System.getInt(getContentResolver(),
+ Settings.System.NAVIGATION_BAR_HEIGHT, -1);
+ if (navigationBarHeight == -1) {
+ navigationBarHeight = (int) (getResources().getDimension(
+ com.android.internal.R.dimen.navigation_bar_height)
+ / getResources().getDisplayMetrics().density);
+ }
+ mNavigationBarHeight.setValue(String.valueOf(navigationBarHeight));
+
+ int navigationBarHeightLandscape = Settings.System.getInt(getContentResolver(),
+ Settings.System.NAVIGATION_BAR_HEIGHT_LANDSCAPE, -1);
+ if (navigationBarHeightLandscape == -1) {
+ navigationBarHeightLandscape = (int) (getResources().getDimension(
+ com.android.internal.R.dimen.navigation_bar_height_landscape)
+ / getResources().getDisplayMetrics().density);
+ }
+ mNavigationBarHeightLandcape.setValue(String.valueOf(navigationBarHeightLandscape));
+
+ if (mNavigationBarWidth == null) {
+ return;
+ }
+ int navigationBarWidth = Settings.System.getInt(getContentResolver(),
+ Settings.System.NAVIGATION_BAR_WIDTH, -1);
+ if (navigationBarWidth == -1) {
+ navigationBarWidth = (int) (getResources().getDimension(
+ com.android.internal.R.dimen.navigation_bar_width)
+ / getResources().getDisplayMetrics().density);
+ }
+ mNavigationBarWidth.setValue(String.valueOf(navigationBarWidth));
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ if (preference == mNavigationBarWidth) {
+ String newVal = (String) newValue;
+ int dp = Integer.parseInt(newVal);
+ Settings.System.putInt(getContentResolver(), Settings.System.NAVIGATION_BAR_WIDTH, dp);
+ return true;
+ } else if (preference == mNavigationBarHeight) {
+ String newVal = (String) newValue;
+ int dp = Integer.parseInt(newVal);
+ Settings.System.putInt(getContentResolver(), Settings.System.NAVIGATION_BAR_HEIGHT, dp);
+ return true;
+ } else if (preference == mNavigationBarHeightLandcape) {
+ String newVal = (String) newValue;
+ int dp = Integer.parseInt(newVal);
+ Settings.System.putInt(getContentResolver(), Settings.System.NAVIGATION_BAR_HEIGHT_LANDSCAPE, dp);
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/src/org/omnirom/omnigears/interfacesettings/NotificationPanelSettings.java b/src/org/omnirom/omnigears/interfacesettings/NotificationPanelSettings.java
index 106d92bca..aaacc8c38 100644
--- a/src/org/omnirom/omnigears/interfacesettings/NotificationPanelSettings.java
+++ b/src/org/omnirom/omnigears/interfacesettings/NotificationPanelSettings.java
@@ -18,29 +18,39 @@
package org.omnirom.omnigears.interfacesettings;
-import com.android.settings.SettingsPreferenceFragment;
-import com.android.settings.R;
-
+import android.app.Activity;
import android.content.ContentResolver;
-import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
-import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
import android.util.Log;
+import com.android.settings.R;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.quicklaunch.BookmarkPicker;
+
+import java.net.URISyntaxException;
+
+import org.omnirom.omnigears.preference.AppSelectListPreference;
+
public class NotificationPanelSettings extends SettingsPreferenceFragment implements
Preference.OnPreferenceChangeListener {
private static final String TAG = "NotificationPanelSettings";
private static final String STATUS_BAR_CUSTOM_HEADER = "custom_status_bar_header";
private static final String QUICK_SWIPE = "quick_swipe";
+ private static final String CLOCK_SHORTCUT = "clock_shortcut";
+ private static final String CALENDAR_SHORTCUT = "calendar_shortcut";
private CheckBoxPreference mStatusBarCustomHeader;
private CheckBoxPreference mQuickSwipe;
+ private AppSelectListPreference mClockShortcut;
+ private AppSelectListPreference mCalendarShortcut;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -59,11 +69,14 @@ public void onCreate(Bundle savedInstanceState) {
mQuickSwipe.setChecked(Settings.System.getInt(resolver,
Settings.System.QUICK_SWIPE, 1) == 1);
mQuickSwipe.setOnPreferenceChangeListener(this);
- }
- @Override
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
- return true;
+ mClockShortcut = (AppSelectListPreference)prefSet.findPreference(CLOCK_SHORTCUT);
+ mClockShortcut.setOnPreferenceChangeListener(this);
+
+ mCalendarShortcut = (AppSelectListPreference)prefSet.findPreference(CALENDAR_SHORTCUT);
+ mCalendarShortcut.setOnPreferenceChangeListener(this);
+
+ updateClockCalendarSummary();
}
public boolean onPreferenceChange(Preference preference, Object objValue) {
@@ -76,9 +89,60 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
boolean value = (Boolean) objValue;
Settings.System.putInt(resolver,
Settings.System.QUICK_SWIPE, value ? 1 : 0);
+ } else if (preference == mClockShortcut) {
+ String value = (String) objValue;
+ // a value of null means to use the default
+ Settings.System.putString(resolver, Settings.System.CLOCK_SHORTCUT, value);
+ updateClockCalendarSummary();
+ } else if (preference == mCalendarShortcut) {
+ String value = (String) objValue;
+ // a value of null means to use the default
+ Settings.System.putString(resolver, Settings.System.CALENDAR_SHORTCUT, value);
+ updateClockCalendarSummary();
} else {
return false;
}
return true;
}
+
+ private void updateClockCalendarSummary() {
+ final PackageManager packageManager = getPackageManager();
+
+ mClockShortcut.setSummary(getResources().getString(R.string.default_shortcut));
+ mCalendarShortcut.setSummary(getResources().getString(R.string.default_shortcut));
+
+ String clockShortcutIntentUri = Settings.System.getString(getContentResolver(), Settings.System.CLOCK_SHORTCUT);
+ if (clockShortcutIntentUri != null) {
+ Intent clockShortcutIntent = null;
+ try {
+ clockShortcutIntent = Intent.parseUri(clockShortcutIntentUri, 0);
+ } catch (URISyntaxException e) {
+ clockShortcutIntent = null;
+ }
+
+ if(clockShortcutIntent != null) {
+ ResolveInfo info = packageManager.resolveActivity(clockShortcutIntent, 0);
+ if (info != null) {
+ mClockShortcut.setSummary(info.loadLabel(packageManager));
+ }
+ }
+ }
+
+ String calendarShortcutIntentUri = Settings.System.getString(getContentResolver(), Settings.System.CALENDAR_SHORTCUT);
+ if (calendarShortcutIntentUri != null) {
+ Intent calendarShortcutIntent = null;
+ try {
+ calendarShortcutIntent = Intent.parseUri(calendarShortcutIntentUri, 0);
+ } catch (URISyntaxException e) {
+ calendarShortcutIntent = null;
+ }
+
+ if(calendarShortcutIntent != null) {
+ ResolveInfo info = packageManager.resolveActivity(calendarShortcutIntent, 0);
+ if (info != null) {
+ mCalendarShortcut.setSummary(info.loadLabel(packageManager));
+ }
+ }
+ }
+ }
}
diff --git a/src/org/omnirom/omnigears/notificationlight/ApplicationLightPreference.java b/src/org/omnirom/omnigears/notificationlight/ApplicationLightPreference.java
index 2756be7cd..2341549b4 100644
--- a/src/org/omnirom/omnigears/notificationlight/ApplicationLightPreference.java
+++ b/src/org/omnirom/omnigears/notificationlight/ApplicationLightPreference.java
@@ -124,8 +124,8 @@ protected void onBindView(View view) {
}
private void updatePreferenceViews() {
- final int width = (int) mResources.getDimension(R.dimen.device_memory_usage_button_width);
- final int height = (int) mResources.getDimension(R.dimen.device_memory_usage_button_height);
+ final int width = (int) mResources.getDimension(R.dimen.color_preference_width);
+ final int height = (int) mResources.getDimension(R.dimen.color_preference_height_large);
if (mLightColorView != null) {
mLightColorView.setEnabled(true);
diff --git a/src/org/omnirom/omnigears/notificationlight/LightSettingsDialog.java b/src/org/omnirom/omnigears/notificationlight/LightSettingsDialog.java
index e58125b56..588c916ae 100644
--- a/src/org/omnirom/omnigears/notificationlight/LightSettingsDialog.java
+++ b/src/org/omnirom/omnigears/notificationlight/LightSettingsDialog.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Daniel Nilsson
- * Copyright (C) 2012 THe CyanogenMod Project
+ * Copyright (C) 2012 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.
diff --git a/src/org/omnirom/omnigears/notificationlight/NotificationLightSettings.java b/src/org/omnirom/omnigears/notificationlight/NotificationLightSettings.java
index 44031ba5b..c0c3285b2 100644
--- a/src/org/omnirom/omnigears/notificationlight/NotificationLightSettings.java
+++ b/src/org/omnirom/omnigears/notificationlight/NotificationLightSettings.java
@@ -104,6 +104,7 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
private PackageAdapter mPackageAdapter;
private String mPackageList;
private Map mPackages;
+ private boolean mNotificationPulseConfig = true;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -119,6 +120,7 @@ public void onCreate(Bundle savedInstanceState) {
com.android.internal.R.integer.config_defaultNotificationLedOff);
mNotificationPulseEnabled = resources.getBoolean(
com.android.internal.R.bool.config_intrusiveNotificationLed);
+ mNotificationPulseConfig = resources.getBoolean(R.bool.config_notificationLedConfig);
mEnabledPref = (SwitchPreference)
findPreference(Settings.System.NOTIFICATION_LIGHT_PULSE);
@@ -160,7 +162,15 @@ public void onCreate(Bundle savedInstanceState) {
mPackages = new HashMap();
- setHasOptionsMenu(true);
+ if (!mNotificationPulseConfig) {
+ removePreference("phone_list");
+ removePreference("applications_list");
+ PreferenceGroup generalGroup = (PreferenceGroup) findPreference("general_section");
+ generalGroup.removePreference(mDefaultPref);
+ removePreference(Settings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE);
+ } else {
+ setHasOptionsMenu(true);
+ }
}
@Override
@@ -205,9 +215,6 @@ private void refreshDefault() {
mVoicemailPref.setAllValues(vmailColor, vmailTimeOn, vmailTimeOff);
}
-
- mApplicationPrefList = (PreferenceGroup) findPreference("applications_list");
- mApplicationPrefList.setOrderingAsAdded(false);
}
private void refreshCustomApplicationPrefs() {
diff --git a/src/org/omnirom/omnigears/preference/AppSelectListPreference.java b/src/org/omnirom/omnigears/preference/AppSelectListPreference.java
new file mode 100644
index 000000000..dd8f26c8c
--- /dev/null
+++ b/src/org/omnirom/omnigears/preference/AppSelectListPreference.java
@@ -0,0 +1,302 @@
+/*
+ * Copyright (C) 2013 The ChameleonOS 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 org.omnirom.omnigears.preference;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ActivityInfo;
+import android.content.res.TypedArray;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.ComponentName;
+import android.os.Bundle;
+import android.preference.DialogPreference;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.CheckBox;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.graphics.drawable.Drawable;
+import com.android.settings.R;
+
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * A preference that lists installed applications, with icons, as a single select list.
+ * It will return the launch intent as string if an app is clicked
+ *
+ * if the positive button is pressed it will return positiveButtonValue or null
+ *
+ * a neutral button can be added optional by adding the neutralButtonText
+ * attribute. Pressing it will return neutralButtonValue or null
+ *
+ * e.g.
+ *
+ *
+ */
+public class AppSelectListPreference extends DialogPreference {
+ private final List mPackageInfoList = new ArrayList();
+ private AppListAdapter mAdapter;
+ private CharSequence mReturnValue;
+ private CharSequence mNeutralButtonText;
+ private CharSequence mNeutralButtonValue;
+ private CharSequence mPositiveButtonValue;
+ private AlertDialog.Builder mBuilder;
+ private boolean mNeutralButtonPressed;
+
+ private static final String SETTINGS = "http://schemas.android.com/apk/res/com.android.settings";
+
+ public AppSelectListPreference(Context context) {
+ this(context, null);
+ }
+
+ public AppSelectListPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ setValuesFromXml(attrs);
+
+ final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
+ mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
+ List installedAppsInfo = getContext().getPackageManager().queryIntentActivities(
+ mainIntent, 0);
+
+ for (ResolveInfo info : installedAppsInfo) {
+ MyApplicationInfo myInfo = new MyApplicationInfo();
+ myInfo.resolveInfo = info;
+ myInfo.label = getResolveInfoTitle(info);
+ mPackageInfoList.add(myInfo);
+ }
+ Collections.sort(mPackageInfoList, sDisplayNameComparator);
+ }
+
+ private void setValuesFromXml(AttributeSet attrs) {
+ final TypedArray typedArray = getContext().obtainStyledAttributes(
+ attrs, R.styleable.AppSelectListPreference);
+
+ mNeutralButtonText = getAttributeStringValue(attrs, SETTINGS, "neutralButtonText", null);
+ Integer id = typedArray.getResourceId(R.styleable.AppSelectListPreference_neutralButtonText, 0);
+ if (id > 0) {
+ mNeutralButtonText = getContext().getResources().getString(id);
+ }
+
+ mNeutralButtonValue = getAttributeStringValue(attrs, SETTINGS, "neutralButtonValue", null);
+ id = typedArray.getResourceId(R.styleable.AppSelectListPreference_neutralButtonValue, 0);
+ if (id > 0) {
+ mNeutralButtonValue = getContext().getResources().getString(id);
+ }
+
+ mPositiveButtonValue = getAttributeStringValue(attrs, SETTINGS, "positiveButtonValue", null);
+ id = typedArray.getResourceId(R.styleable.AppSelectListPreference_positiveButtonValue, 0);
+ if (id > 0) {
+ mPositiveButtonValue = getContext().getResources().getString(id);
+ }
+ typedArray.recycle();
+ }
+
+ private String getAttributeStringValue(AttributeSet attrs, String namespace, String name, String defaultValue) {
+ String value = attrs.getAttributeValue(namespace, name);
+ if(value == null) {
+ value = defaultValue;
+ }
+ return value;
+ }
+
+ @Override
+ protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
+ super.onPrepareDialogBuilder(builder);
+ mAdapter = new AppListAdapter(getContext());
+ builder.setAdapter(mAdapter, null);
+ }
+
+ private String getResolveInfoTitle(ResolveInfo info) {
+ CharSequence label = info.loadLabel(getContext().getPackageManager());
+ if (label == null) label = info.activityInfo.name;
+ return label != null ? label.toString() : null;
+ }
+
+ private Intent getIntentForResolveInfo(ResolveInfo info, String action) {
+ Intent intent = new Intent(action);
+ ActivityInfo ai = info.activityInfo;
+ intent.setClassName(ai.packageName, ai.name);
+ return intent;
+ }
+
+ @Override
+ protected void showDialog(Bundle state) {
+ super.showDialog(state);
+ final AlertDialog dialog = (AlertDialog) getDialog();
+ final ListView listView = dialog.getListView();
+ mReturnValue = mPositiveButtonValue;
+ listView.setItemsCanFocus(false);
+ listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+ listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ final AppViewHolder holder = (AppViewHolder) view.getTag();
+
+ MyApplicationInfo myInfo = mAdapter.getItem(position);
+ ResolveInfo info = myInfo.resolveInfo;
+ Intent intent = getIntentForResolveInfo(info, Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_LAUNCHER);
+
+ mReturnValue = intent.toUri(0).toString();
+ onClick(dialog, DialogInterface.BUTTON_POSITIVE);
+ dialog.dismiss();
+ }
+ });
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_NEUTRAL){
+ mReturnValue = mNeutralButtonValue;
+ mNeutralButtonPressed = true;
+ }
+ super.onClick(dialog, which);
+ }
+
+ @Override
+ protected void onDialogClosed(boolean positiveResult) {
+ super.onDialogClosed(positiveResult);
+
+ // can be null an intent or whatever set as mNeutralButtonValue
+ if (positiveResult || mNeutralButtonPressed) {
+ callChangeListener(mReturnValue);
+ }
+ }
+
+ class MyApplicationInfo {
+ ApplicationInfo info;
+ CharSequence label;
+ ResolveInfo resolveInfo;
+ }
+
+ public class AppListAdapter extends ArrayAdapter {
+ private final LayoutInflater mInflater;
+
+ public AppListAdapter(Context context) {
+ super(context, 0);
+ mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ addAll(mPackageInfoList);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ // A ViewHolder keeps references to children views to avoid unnecessary calls
+ // to findViewById() on each row.
+ AppViewHolder holder = AppViewHolder.createOrRecycle(mInflater, convertView);
+ convertView = holder.rootView;
+ MyApplicationInfo info = getItem(position);
+ holder.appName.setText(info.label);
+ Drawable icon = info.resolveInfo.loadIcon(getContext().getPackageManager());
+ if (icon != null) {
+ holder.appIcon.setImageDrawable(icon);
+ } else {
+ holder.appIcon.setImageDrawable(null);
+ }
+ return convertView;
+ }
+
+ @Override
+ public MyApplicationInfo getItem(int position) {
+ return mPackageInfoList.get(position);
+ }
+ }
+
+ public static class AppViewHolder {
+ public View rootView;
+ public TextView appName;
+ public ImageView appIcon;
+
+ public static AppViewHolder createOrRecycle(LayoutInflater inflater, View convertView) {
+ if (convertView == null) {
+ convertView = inflater.inflate(R.layout.app_item, null);
+
+ // Creates a ViewHolder and store references to the two children views
+ // we want to bind data to.
+ AppViewHolder holder = new AppViewHolder();
+ holder.rootView = convertView;
+ holder.appName = (TextView) convertView.findViewById(R.id.app_name);
+ holder.appIcon = (ImageView) convertView.findViewById(R.id.app_icon);
+ convertView.setTag(holder);
+ return holder;
+ } else {
+ // Get the ViewHolder back to get fast access to the TextView
+ // and the ImageView.
+ return (AppViewHolder)convertView.getTag();
+ }
+ }
+ }
+
+ private final static Comparator sDisplayNameComparator
+ = new Comparator() {
+
+ private final Collator collator = Collator.getInstance();
+
+ public final int compare(MyApplicationInfo a, MyApplicationInfo b) {
+ return collator.compare(a.label, b.label);
+ }
+ };
+
+ protected Dialog createDialog() {
+ super.createDialog();
+ Context context = getContext();
+
+ mBuilder = new AlertDialog.Builder(context)
+ .setTitle(getDialogTitle())
+ .setIcon(getDialogIcon())
+ .setPositiveButton(getPositiveButtonText(), this)
+ .setNegativeButton(getNegativeButtonText(), this);
+
+ if (mNeutralButtonText != null){
+ mBuilder.setNeutralButton(mNeutralButtonText, this);
+ }
+
+ View contentView = onCreateDialogView();
+ if (contentView != null) {
+ onBindDialogView(contentView);
+ mBuilder.setView(contentView);
+ } else {
+ mBuilder.setMessage(getDialogMessage());
+ }
+
+ onPrepareDialogBuilder(mBuilder);
+
+ return mBuilder.create();
+ }
+}
diff --git a/src/org/omnirom/omnigears/preference/ColorPickerPreference.java b/src/org/omnirom/omnigears/preference/ColorPickerPreference.java
new file mode 100644
index 000000000..5d7e23d3c
--- /dev/null
+++ b/src/org/omnirom/omnigears/preference/ColorPickerPreference.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2014 The OmniROM Project
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+package org.omnirom.omnigears.preference;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.res.Resources;
+import android.graphics.drawable.ShapeDrawable;
+import android.graphics.drawable.shapes.RectShape;
+import android.os.Bundle;
+import android.preference.DialogPreference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import org.omnirom.omnigears.ui.ColorPickerDialog;
+
+import com.android.settings.R;
+
+public class ColorPickerPreference extends DialogPreference {
+
+ private static String TAG = "ColorPickerPreference";
+ public static final int DEFAULT_COLOR = 0xFFFFFFFF; //White
+
+ private ImageView mLightColorView;
+ private Resources mResources;
+ private int mColorValue;
+
+ /**
+ * @param context
+ * @param attrs
+ */
+ public ColorPickerPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mColorValue = DEFAULT_COLOR;
+ init();
+ }
+
+ public ColorPickerPreference(Context context, int color) {
+ super(context, null);
+ mColorValue = color;
+ init();
+ }
+
+ private void init() {
+ setLayoutResource(R.layout.preference_color_picker);
+ mResources = getContext().getResources();
+ }
+
+ public void setColor(int color) {
+ mColorValue = color;
+ updatePreferenceViews();
+ }
+
+ public int getColor() {
+ return mColorValue;
+ }
+
+ @Override
+ protected void onBindView(View view) {
+ super.onBindView(view);
+
+ mLightColorView = (ImageView) view.findViewById(R.id.light_color);
+
+ updatePreferenceViews();
+ }
+
+ private void updatePreferenceViews() {
+ final int width = (int) mResources.getDimension(R.dimen.color_preference_width);
+ final int height = (int) mResources.getDimension(R.dimen.color_preference_height);
+
+ if (mLightColorView != null) {
+ mLightColorView.setEnabled(true);
+ mLightColorView.setImageDrawable(createRectShape(width, height, mColorValue));
+ }
+ }
+
+ @Override
+ protected void showDialog(Bundle state) {
+ super.showDialog(state);
+ }
+
+ @Override
+ protected Dialog createDialog() {
+ final ColorPickerDialog d = new ColorPickerDialog(getContext(), mColorValue);
+
+ d.setButton(AlertDialog.BUTTON_POSITIVE, mResources.getString(R.string.ok),
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ mColorValue = d.getColor();
+ updatePreferenceViews();
+ callChangeListener(new Integer(mColorValue));
+ }
+ });
+ d.setButton(AlertDialog.BUTTON_NEGATIVE, mResources.getString(R.string.cancel),
+ (DialogInterface.OnClickListener) null);
+
+ return d;
+ }
+
+ private static ShapeDrawable createRectShape(int width, int height, int color) {
+ ShapeDrawable shape = new ShapeDrawable(new RectShape());
+ shape.setIntrinsicHeight(height);
+ shape.setIntrinsicWidth(width);
+ shape.getPaint().setColor(color);
+ return shape;
+ }
+}
diff --git a/src/org/omnirom/omnigears/preference/NumberPickerPreference.java b/src/org/omnirom/omnigears/preference/NumberPickerPreference.java
new file mode 100644
index 000000000..5afa3b863
--- /dev/null
+++ b/src/org/omnirom/omnigears/preference/NumberPickerPreference.java
@@ -0,0 +1,117 @@
+/*
+ * Based on: http://www.lukehorvat.com/blog/android-numberpickerdialogpreference/
+ * Thanks to the original author!
+ */
+
+package org.omnirom.omnigears.preference;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.preference.DialogPreference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.NumberPicker;
+import android.widget.TextView;
+
+import com.android.settings.R;
+/**
+* A {@link DialogPreference} that provides a user with the means to select an integer from a {@link NumberPicker}, and persist it.
+*
+* @author lukehorvat
+*
+*/
+public class NumberPickerPreference extends DialogPreference
+{
+ private static final int DEFAULT_MIN_VALUE = 0;
+ private static final int DEFAULT_MAX_VALUE = 100;
+ private static final int DEFAULT_VALUE = 0;
+
+ private int mMinValue;
+ private int mMaxValue;
+ private int mValue;
+ private NumberPicker mNumberPicker;
+
+ public NumberPickerPreference(Context context) {
+ this(context, null);
+ }
+
+ public NumberPickerPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ setMinValue(DEFAULT_MIN_VALUE);
+ setMaxValue(DEFAULT_MAX_VALUE);
+
+ // set layout
+ setDialogLayoutResource(R.layout.preference_number_picker_dialog);
+ setPositiveButtonText(android.R.string.ok);
+ setNegativeButtonText(android.R.string.cancel);
+ setDialogIcon(null);
+ }
+
+ @Override
+ protected void onSetInitialValue(boolean restore, Object defaultValue) {
+ setValue(restore ? getPersistedInt(DEFAULT_VALUE) : (Integer) defaultValue);
+ }
+
+ @Override
+ protected Object onGetDefaultValue(TypedArray a, int index) {
+ return a.getInt(index, DEFAULT_VALUE);
+ }
+
+ @Override
+ protected void onBindDialogView(View view) {
+ super.onBindDialogView(view);
+
+ mNumberPicker = (NumberPicker) view.findViewById(R.id.number_picker);
+ mNumberPicker.setMinValue(mMinValue);
+ mNumberPicker.setMaxValue(mMaxValue);
+ mNumberPicker.setValue(mValue);
+ }
+
+ public int getMinValue() {
+ return mMinValue;
+ }
+
+ public void setMinValue(int minValue) {
+ mMinValue = minValue;
+ setValue(Math.max(mValue, mMinValue));
+ }
+
+ public int getMaxValue() {
+ return mMaxValue;
+ }
+
+ public void setMaxValue(int maxValue) {
+ mMaxValue = maxValue;
+ setValue(Math.min(mValue, mMaxValue));
+ }
+
+ public int getValue() {
+ return mValue;
+ }
+
+ public void setValue(int value) {
+ value = Math.max(Math.min(value, mMaxValue), mMinValue);
+
+ if (value != mValue) {
+ mValue = value;
+ persistInt(value);
+ notifyChanged();
+ }
+ }
+
+ @Override
+ protected void onDialogClosed(boolean positiveResult) {
+ super.onDialogClosed(positiveResult);
+
+ // when the user selects "OK", persist the new value
+ if (positiveResult) {
+ int numberPickerValue = mNumberPicker.getValue();
+ if (callChangeListener(numberPickerValue)) {
+ setValue(numberPickerValue);
+ }
+ }
+ }
+}
diff --git a/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java b/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java
index af73dd44b..1c3746eaf 100644
--- a/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java
+++ b/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java
@@ -45,6 +45,7 @@ public class StatusBarClockStyle extends SettingsPreferenceFragment
private static final String PREF_CLOCK_DATE_STYLE = "clock_date_style";
private static final String PREF_CLOCK_DATE_FORMAT = "clock_date_format";
private static final String STATUS_BAR_CLOCK = "status_bar_show_clock";
+ private static final String STATUS_BAR_FORCE_CLOCK_LOCKSCREEN = "status_bar_force_clock_lockscreen";
public static final int CLOCK_DATE_STYLE_LOWERCASE = 1;
public static final int CLOCK_DATE_STYLE_UPPERCASE = 2;
@@ -55,6 +56,7 @@ public class StatusBarClockStyle extends SettingsPreferenceFragment
private ListPreference mClockDateStyle;
private ListPreference mClockDateFormat;
private CheckBoxPreference mStatusBarClock;
+ private CheckBoxPreference mForceClockLockscreen;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -135,6 +137,11 @@ private PreferenceScreen createCustomView() {
mClockDateFormat.setEnabled(false);
}
+ mForceClockLockscreen = (CheckBoxPreference) findPreference(STATUS_BAR_FORCE_CLOCK_LOCKSCREEN);
+ mForceClockLockscreen.setChecked(Settings.System.getInt(getActivity().getContentResolver(),
+ Settings.System.STATUS_BAR_FORCE_CLOCK_LOCKSCREEN, 0) != 0);
+ mForceClockLockscreen.setOnPreferenceChangeListener(this);
+
return prefSet;
}
@@ -188,6 +195,10 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
mClockDateFormat.setSummary(mClockDateFormat.getEntries()[idx]);
}
return true;
+ } else if (preference == mForceClockLockscreen) {
+ Settings.System.putInt(getActivity().getContentResolver(),
+ Settings.System.STATUS_BAR_FORCE_CLOCK_LOCKSCREEN, (Boolean) newValue ? 1 : 0);
+ return true;
}
return false;
}
diff --git a/src/org/omnirom/omnigears/ui/AlphaPatternDrawable.java b/src/org/omnirom/omnigears/ui/AlphaPatternDrawable.java
index 110912ec6..dbe4b7733 100644
--- a/src/org/omnirom/omnigears/ui/AlphaPatternDrawable.java
+++ b/src/org/omnirom/omnigears/ui/AlphaPatternDrawable.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Daniel Nilsson
- * Copyright (C) 2012 THe CyanogenMod Project
+ * Copyright (C) 2012 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.
diff --git a/src/org/omnirom/omnigears/ui/ColorPanelView.java b/src/org/omnirom/omnigears/ui/ColorPanelView.java
index 45fc1093c..5941bf1b2 100644
--- a/src/org/omnirom/omnigears/ui/ColorPanelView.java
+++ b/src/org/omnirom/omnigears/ui/ColorPanelView.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Daniel Nilsson
- * Copyright (C) 2012 THe CyanogenMod Project
+ * Copyright (C) 2012 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.
diff --git a/src/org/omnirom/omnigears/ui/ColorPickerDialog.java b/src/org/omnirom/omnigears/ui/ColorPickerDialog.java
new file mode 100644
index 000000000..9c0a48bd6
--- /dev/null
+++ b/src/org/omnirom/omnigears/ui/ColorPickerDialog.java
@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2010 Daniel Nilsson
+ * Copyright (C) 2012 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 org.omnirom.omnigears.ui;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.graphics.Color;
+import android.graphics.PixelFormat;
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.text.InputFilter;
+import android.text.InputFilter.LengthFilter;
+import android.util.Pair;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnFocusChangeListener;
+import android.view.ViewGroup;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.Spinner;
+import android.widget.SpinnerAdapter;
+import android.widget.TextView;
+
+import com.android.settings.R;
+import org.omnirom.omnigears.ui.ColorPanelView;
+import org.omnirom.omnigears.ui.ColorPickerView;
+import org.omnirom.omnigears.ui.ColorPickerView.OnColorChangedListener;
+
+import java.util.ArrayList;
+import java.util.IllegalFormatException;
+import java.util.Locale;
+
+public class ColorPickerDialog extends AlertDialog implements
+ ColorPickerView.OnColorChangedListener, TextWatcher, OnFocusChangeListener {
+
+ private static final String TAG = "ColorPickerDialog";
+ private final static String STATE_KEY_COLOR = "ColorPickerDialog:color";
+
+ private ColorPickerView mColorPicker;
+
+ private EditText mHexColorInput;
+ private ColorPanelView mNewColor;
+ private LayoutInflater mInflater;
+ private boolean mMultiColor = true;
+ private LinearLayout mColorPanelView;
+
+ public ColorPickerDialog(Context context, int initialColor) {
+ super(context);
+
+ init(initialColor);
+ }
+
+ private void init(int color) {
+ // To fight color banding.
+ getWindow().setFormat(PixelFormat.RGBA_8888);
+ setUp(color);
+ }
+
+ /**
+ * This function sets up the dialog with the proper values. If the speedOff parameters
+ * has a -1 value disable both spinners
+ *
+ * @param color - the color to set
+ * @param speedOn - the flash time in ms
+ * @param speedOff - the flash length in ms
+ */
+ private void setUp(int color) {
+ mInflater = (LayoutInflater) getContext()
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ View layout = mInflater.inflate(R.layout.dialog_color_picker, null);
+
+ mColorPicker = (ColorPickerView) layout.findViewById(R.id.color_picker_view);
+ mHexColorInput = (EditText) layout.findViewById(R.id.hex_color_input);
+ mNewColor = (ColorPanelView) layout.findViewById(R.id.color_panel);
+ mColorPanelView = (LinearLayout) layout.findViewById(R.id.color_panel_view);
+
+ setAlphaSliderVisible(true);
+ mColorPicker.setOnColorChangedListener(this);
+ mColorPicker.setColor(color, true);
+
+ mHexColorInput.setOnFocusChangeListener(this);
+
+ setView(layout);
+ setTitle(R.string.color_picker_dialog_title);
+
+ mColorPicker.setVisibility(View.VISIBLE);
+ mColorPanelView.setVisibility(View.VISIBLE);
+ }
+
+ @Override
+ public Bundle onSaveInstanceState() {
+ Bundle state = super.onSaveInstanceState();
+ state.putInt(STATE_KEY_COLOR, getColor());
+ return state;
+ }
+
+ @Override
+ public void onRestoreInstanceState(Bundle state) {
+ super.onRestoreInstanceState(state);
+ mColorPicker.setColor(state.getInt(STATE_KEY_COLOR), true);
+ }
+
+ @Override
+ public void onColorChanged(int color) {
+ final boolean hasAlpha = mColorPicker.isAlphaSliderVisible();
+ final String format = hasAlpha ? "%08x" : "%06x";
+ final int mask = hasAlpha ? 0xFFFFFFFF : 0x00FFFFFF;
+
+ mNewColor.setColor(color);
+ mHexColorInput.setText(String.format(Locale.US, format, color & mask));
+ }
+
+ public void setAlphaSliderVisible(boolean visible) {
+ mHexColorInput.setFilters(new InputFilter[] { new InputFilter.LengthFilter(visible ? 8 : 6) } );
+ mColorPicker.setAlphaSliderVisible(visible);
+ }
+
+ public int getColor() {
+ return mColorPicker.getColor();
+ }
+
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ }
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ }
+
+ @Override
+ public void afterTextChanged(Editable s) {
+ String hexColor = mHexColorInput.getText().toString();
+ if (!hexColor.isEmpty()) {
+ try {
+ int color = Color.parseColor('#' + hexColor);
+ if (!mColorPicker.isAlphaSliderVisible()) {
+ color |= 0xFF000000; // set opaque
+ }
+ mColorPicker.setColor(color);
+ mNewColor.setColor(color);
+ } catch (IllegalArgumentException ex) {
+ // Number format is incorrect, ignore
+ }
+ }
+ }
+
+ @Override
+ public void onFocusChange(View v, boolean hasFocus) {
+ if (!hasFocus) {
+ mHexColorInput.removeTextChangedListener(this);
+ InputMethodManager inputMethodManager = (InputMethodManager) getContext()
+ .getSystemService(Activity.INPUT_METHOD_SERVICE);
+ inputMethodManager.hideSoftInputFromWindow(v.getWindowToken(), 0);
+ } else {
+ mHexColorInput.addTextChangedListener(this);
+ }
+ }
+}