diff options
| author | LorDClockaN <davor@losinj.com> | 2015-02-21 17:43:38 +0100 |
|---|---|---|
| committer | LorDClockaN <davor@losinj.com> | 2015-02-21 17:43:38 +0100 |
| commit | 832602a4086e976d3b6e061726e7cb95ae9c5f7e (patch) | |
| tree | 58b92cb0d9e511ecdca175f042e187f0466c5d06 | |
| parent | cfbcdd5188f8c0a29baafc423d8895473b26e262 (diff) | |
| parent | ddad450b5338aa3f8ce888439c95d6bca41ca5e8 (diff) | |
Merge branch 'cm-12.0' of https://github.com/CyanogenMod/android_device_oppo_common.git into cmlp5.0
Conflicts:
configpanel/AndroidManifest.xml
configpanel/res/mipmap-xhdpi/ic_launcher_settings.png
configpanel/res/mipmap-xxhdpi/ic_launcher_settings.png
configpanel/res/mipmap-xxxhdpi/ic_launcher_settings.png
configpanel/src/com/cyanogenmod/settings/device/OclickService.java
Change-Id: Ic4be5619ada7e37ab1b79705ec3e58e8d811efa2
47 files changed, 504 insertions, 208 deletions
diff --git a/configpanel/AndroidManifest.xml b/configpanel/AndroidManifest.xml index a94ea72..352bd13 100644 --- a/configpanel/AndroidManifest.xml +++ b/configpanel/AndroidManifest.xml @@ -26,8 +26,7 @@ <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/> <uses-sdk - android:minSdkVersion="18" - android:targetSdkVersion="18" /> + android:minSdkVersion="21" /> <application android:icon="@mipmap/ic_launcher_settings" diff --git a/configpanel/res/values-af/strings.xml b/configpanel/res/values-af/strings.xml index 9af06ec..917a6a3 100644 --- a/configpanel/res/values-af/strings.xml +++ b/configpanel/res/values-af/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Gevorderde instellings</string> <string name="backpad_panel_title">O-Touch instellings</string> <string name="backpad_panel_summary">Konfigureer O-Touch</string> <string name="touchpad_enable_title">Aktiveer O-Touch</string> diff --git a/configpanel/res/values-es-rXA/strings.xml b/configpanel/res/values-ast-rES/strings.xml index 621f1d0..d314000 100644 --- a/configpanel/res/values-es-rXA/strings.xml +++ b/configpanel/res/values-ast-rES/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Axustes avanzaos</string> <string name="backpad_panel_title">Axustes O-Touch</string> <string name="backpad_panel_summary">Configurar O-Touch</string> <string name="touchpad_enable_title">Habilitar O-Touch</string> diff --git a/configpanel/res/values-az/strings.xml b/configpanel/res/values-az-rAZ/strings.xml index c857f09..c857f09 100644 --- a/configpanel/res/values-az/strings.xml +++ b/configpanel/res/values-az-rAZ/strings.xml diff --git a/configpanel/res/values-bn-rBD/strings.xml b/configpanel/res/values-bn-rBD/strings.xml new file mode 100644 index 0000000..b544f23 --- /dev/null +++ b/configpanel/res/values-bn-rBD/strings.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2013-2014 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="backpad_panel_title">ও-স্পর্শ রুপান্তর নির্ধারণ</string> + <string name="backpad_panel_summary">ও-স্পর্শ বিন্যাস করুন</string> + <string name="touchpad_enable_title">ও-স্পর্শ সক্রিয়</string> + <string name="touchpad_enable_summary">পেছনের স্পর্শ সংবেদনশীল দ্বারা ফোন সচল করুন</string> + <string name="touchpad_long_press_title">দীর্ঘ চাপ দ্বারা ক্যামেরা সচল করুন</string> + <string name="touchpad_long_press_summary">স্পর্শ সংবেদনশীল স্থ্যানে দীর্ঘ চাপ দ্বারা ক্যামেরা অ্যাপ্লিকেশন সচল করুন</string> + <string name="touchpad_double_tap_title">ছবি গ্রহণ করতে দুবার টোকা</string> + <string name="touchpad_double_tap_summary">ছবি তুলতে, ক্যামেরায় দুবার টোকা দেওয়া হবে</string> + <string name="screen_gestures_panel_title">ভঙ্গির সংক্ষিপ্ত পথ</string> + <string name="screen_gestures_panel_summary">পর্দার বন্ধ থাকার সময় ভঙ্গি ব্যবহার করুন</string> + <string name="touchscreen_double_tap_gesture_title">ডিভাইস জগ্রত করা</string> + <string name="touchscreen_double_tap_gesture_summary">দুবার টোকা দিয়ে ডিভাইস জাগ্রত করা</string> + <string name="touchscreen_camera_gesture_title">ক্যামেরা</string> + <string name="touchscreen_camera_gesture_summary">ক্যামেরা সক্রিয় করতে বৃত্ত আঁকুন</string> + <string name="touchscreen_music_gesture_title">সঙ্গীত</string> + <string name="touchscreen_flashlight_gesture_title">উজ্জ্যল বাতি</string> + <string name="touchscreen_flashlight_gesture_summary">উজ্জ্যল বাতি সক্রিয় করতে \'V\' অঙ্কন করুন</string> + <string name="touchscreen_music_gesture_summary">সঙ্গীত পরিচালনা করতে ভঙ্গী ব্যাবহার করুন \n + • দুই আঙ্গুল উল্লম্বভাবে চলা/স্থির \n + • পূর্ববর্তী সঙ্গীতের জন্যে বাম তীরচিহ্ন ভঙ্গি আঁকুন \n + • পরবর্তী সঙ্গীতের জন্যে ডান তীরচিহ্ন ভঙ্গি আঁকুন \n</string> + <string name="oclick_panel_title">ও-ক্লিক রুপান্তর নির্ধারণ</string> + <string name="oclick_panel_summary">ও-ক্লিক ডিভাইস বিন্যাস</string> + <string name="oclick_connect_string">সংযোগ</string> + <string name="oclick_disconnect_string">সংযোগ ছিন্ন</string> + <string name="oclick_dialog_connecting_message">যুগল করার প্রচেষ্টার</string> + <string name="oclick_take_snapshot_title">দূরবর্তী ক্যামেরার কপাট</string> + <string name="oclick_take_snapshot_summary">ছবি গ্রহণের জন্যে একবার টোকা দেওয়া</string> + <string name="oclick_find_my_phone_title">ফোন সনাক্তকরণ</string> + <string name="oclick_find_my_phone_summary">ফোন খুঁজে বের করতে দুবার টোকা দিন</string> + <string name="oclick_fence_title">সান্নিধ্য সতর্কতা</string> + <string name="oclick_fence_summary">সতর্কতা যখন ফোন নিকটবর্তী নয়</string> + <string name="oclick_disconnect_alert_title">সীমার বাইরে সতর্কতা</string> + <string name="oclick_disconnect_alert_summary">সতর্কতা যখন নাগালের বাইরে</string> + <string name="alert_category_title">সতর্কতা</string> + <string name="action_category_title">ক্রিয়াকলাপ</string> +</resources> diff --git a/configpanel/res/values-ca/strings.xml b/configpanel/res/values-ca/strings.xml index 35e3d0f..09bdef0 100644 --- a/configpanel/res/values-ca/strings.xml +++ b/configpanel/res/values-ca/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Configuració avançada</string> <string name="backpad_panel_title">Configuració O-Touch</string> <string name="backpad_panel_summary">Configura O-Touch</string> <string name="touchpad_enable_title">Activa O-Touch</string> diff --git a/configpanel/res/values-cs/strings.xml b/configpanel/res/values-cs/strings.xml index 75671d4..25780c8 100644 --- a/configpanel/res/values-cs/strings.xml +++ b/configpanel/res/values-cs/strings.xml @@ -16,27 +16,28 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Pokročilé nastavení</string> <string name="backpad_panel_title">Nastavení O-Touch</string> <string name="backpad_panel_summary">Nastavení O-Touch</string> <string name="touchpad_enable_title">Povolit O-Touch</string> <string name="touchpad_enable_summary">Použít zadní touchpad k ovládání telefonu</string> - <string name="touchpad_long_press_title">Dlouhý dotyk spustí fotoaparát</string> - <string name="touchpad_long_press_summary">Dlouhý dotyk na touchpadu provede spuštění aplikace fotoaparátu</string> - <string name="touchpad_double_tap_title">Dvojitý dotyk pořídí fotografii</string> + <string name="touchpad_long_press_title">Spustit fotoaparát dlouhým dotykem</string> + <string name="touchpad_long_press_summary">Dlouhým dotykem na touchpad spustíte aplikaci fotoaparátu</string> + <string name="touchpad_double_tap_title">Dvojdotyk k vyfocení</string> <string name="touchpad_double_tap_summary">Pokud je aktivní fotoaparát, dvojitým dotykem pořídíte forografii</string> <string name="screen_gestures_panel_title">Rychlá gesta</string> <string name="screen_gestures_panel_summary">Povolit gesta při vypnuté obrazovce</string> <string name="touchscreen_double_tap_gesture_title">Probudit zařízení</string> - <string name="touchscreen_double_tap_gesture_summary">Dvojitý dotyk probudí zařízení</string> + <string name="touchscreen_double_tap_gesture_summary">Dvojdotyk probudí zařízení</string> <string name="touchscreen_camera_gesture_title">Fotoaparát</string> - <string name="touchscreen_camera_gesture_summary">Načrtnutím kruhu bude spuštěn fotoaparát</string> + <string name="touchscreen_camera_gesture_summary">Namalováním kruhu spustíte fotoaparát</string> <string name="touchscreen_music_gesture_title">Hudba</string> <string name="touchscreen_flashlight_gesture_title">Svítilna</string> - <string name="touchscreen_flashlight_gesture_summary">Načrtnutím písmene \'V\' dojde k přepnutí stavu svítilny</string> - <string name="touchscreen_music_gesture_summary">Použít gesta k ovládání přehrávání hudby\n - \u2022 Dvěma prsty svisle - přehrávat/pozastavit\n - \u2022 Načrtnutím šipky vlevo - předchozí stopa\n - \u2022 Načrtnutím šipky vpravo - následující stopa</string> + <string name="touchscreen_flashlight_gesture_summary">Namalováním \'V\' přepnete stav svítilny</string> + <string name="touchscreen_music_gesture_summary">Použijte gesta k ovládání přehrávání hudby\n + \u2022 Dvěma prsty svisle - přehrát/pozastavit\n + \u2022 Nakreslením šipky vlevo - předchozí stopa\n + \u2022 Nakreslením šipky vpravo - následující stopa</string> <string name="oclick_panel_title">Nastavení O-Click</string> <string name="oclick_panel_summary">Nastavení zařízení O-Click</string> <string name="oclick_connect_string">Připojit</string> @@ -48,7 +49,7 @@ <string name="oclick_find_my_phone_summary">Dvojitým dotykem zjistíte polohu telefonu</string> <string name="oclick_fence_title">Upozornění při vzdálení</string> <string name="oclick_fence_summary">Upozornit, pokud není telefon v blízkosti</string> - <string name="oclick_disconnect_alert_title">Upozornění, pokud mimo dosah</string> + <string name="oclick_disconnect_alert_title">Upozornění při vzdálení</string> <string name="oclick_disconnect_alert_summary">Upozornit, pokud je telefon mimo dosah</string> <string name="alert_category_title">Upozornění</string> <string name="action_category_title">Akce</string> diff --git a/configpanel/res/values-de/strings.xml b/configpanel/res/values-de/strings.xml index 175713b..1c7d675 100644 --- a/configpanel/res/values-de/strings.xml +++ b/configpanel/res/values-de/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Erweiterte Einstellungen</string> <string name="backpad_panel_title">O-Touch-Einstellungen</string> <string name="backpad_panel_summary">O-Touch konfigurieren</string> <string name="touchpad_enable_title">O-Touch aktivieren</string> diff --git a/configpanel/res/values-el/strings.xml b/configpanel/res/values-el/strings.xml index 7e6de6f..3b7bc0a 100644 --- a/configpanel/res/values-el/strings.xml +++ b/configpanel/res/values-el/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Προηγμένες ρυθμίσεις</string> <string name="backpad_panel_title">Ρυθμίσεις O-Touch</string> <string name="backpad_panel_summary">Ρύθμιση O-Touch</string> <string name="touchpad_enable_title">Ενεργοποίηση O-Touch</string> diff --git a/configpanel/res/values-es/strings.xml b/configpanel/res/values-es/strings.xml index d774207..5335312 100644 --- a/configpanel/res/values-es/strings.xml +++ b/configpanel/res/values-es/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Ajustes avanzados</string> <string name="backpad_panel_title">Ajustes O-Touch</string> <string name="backpad_panel_summary">Configurar O-Touch</string> <string name="touchpad_enable_title">Habilitar O-Touch</string> diff --git a/configpanel/res/values-et/strings.xml b/configpanel/res/values-et-rEE/strings.xml index 9997d67..d1cdce3 100644 --- a/configpanel/res/values-et/strings.xml +++ b/configpanel/res/values-et-rEE/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Täpsemad seaded</string> <string name="backpad_panel_title">O-Touch seaded</string> <string name="backpad_panel_summary">Seadista O-Touch\'i</string> <string name="touchpad_enable_title">Luba O-Touch</string> diff --git a/configpanel/res/values-eu/strings.xml b/configpanel/res/values-eu-rES/strings.xml index b930c64..b930c64 100644 --- a/configpanel/res/values-eu/strings.xml +++ b/configpanel/res/values-eu-rES/strings.xml diff --git a/configpanel/res/values-fi/strings.xml b/configpanel/res/values-fi/strings.xml index 5d57eda..5041d5e 100644 --- a/configpanel/res/values-fi/strings.xml +++ b/configpanel/res/values-fi/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Lisäasetukset</string> <string name="backpad_panel_title">O-Touch-asetukset</string> <string name="backpad_panel_summary">Konfiguroi O-Touch</string> <string name="touchpad_enable_title">Ota O-Touch käyttöön</string> diff --git a/configpanel/res/values-fr/strings.xml b/configpanel/res/values-fr/strings.xml index ad9fdc6..fbade95 100644 --- a/configpanel/res/values-fr/strings.xml +++ b/configpanel/res/values-fr/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Paramètres avancés</string> <string name="backpad_panel_title">Paramètres O-Touch</string> <string name="backpad_panel_summary">Configuration O-Touch</string> <string name="touchpad_enable_title">Activer O-Touch</string> diff --git a/configpanel/res/values-gl/strings.xml b/configpanel/res/values-gl-rES/strings.xml index 7fddf49..7fddf49 100644 --- a/configpanel/res/values-gl/strings.xml +++ b/configpanel/res/values-gl-rES/strings.xml diff --git a/configpanel/res/values-hu/strings.xml b/configpanel/res/values-hu/strings.xml index 80b5d68..2b4fdf8 100644 --- a/configpanel/res/values-hu/strings.xml +++ b/configpanel/res/values-hu/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Speciális beállítások</string> <string name="backpad_panel_title">O-Touch beállítások</string> <string name="backpad_panel_summary">O-Touch konfigurálása</string> <string name="touchpad_enable_title">O-Touch engedélyezése</string> diff --git a/configpanel/res/values-in/strings.xml b/configpanel/res/values-in/strings.xml index 40a7b9c..2e9f442 100644 --- a/configpanel/res/values-in/strings.xml +++ b/configpanel/res/values-in/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Pengaturan lanjut</string> <string name="backpad_panel_title">Pengaturan O-Touch</string> <string name="backpad_panel_summary">Konfigurasi O-Touch</string> <string name="touchpad_enable_title">Aktifkan O-Touch</string> diff --git a/configpanel/res/values-it/strings.xml b/configpanel/res/values-it/strings.xml index 75bffbe..3d5b74e 100644 --- a/configpanel/res/values-it/strings.xml +++ b/configpanel/res/values-it/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Impostazioni avanzate</string> <string name="backpad_panel_title">Impostazioni O-Touch</string> <string name="backpad_panel_summary">Configura O-Touch</string> <string name="touchpad_enable_title">Attiva O-Touch</string> diff --git a/configpanel/res/values-iw/strings.xml b/configpanel/res/values-iw/strings.xml index ad2d5ea..2f6709b 100644 --- a/configpanel/res/values-iw/strings.xml +++ b/configpanel/res/values-iw/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">הגדרות מתקדמות</string> <string name="backpad_panel_title">הגדרות O-Touch</string> <string name="backpad_panel_summary">הגדר O-Touch</string> <string name="touchpad_enable_title">אפשר O-Touch</string> diff --git a/configpanel/res/values-ja/strings.xml b/configpanel/res/values-ja/strings.xml index dd45c38..0ea8fcb 100644 --- a/configpanel/res/values-ja/strings.xml +++ b/configpanel/res/values-ja/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">詳細設定</string> <string name="backpad_panel_title">O-Touchの設定</string> <string name="backpad_panel_summary">O-Touchを設定する</string> <string name="touchpad_enable_title">O-Touchを有効化</string> diff --git a/configpanel/res/values-ko/strings.xml b/configpanel/res/values-ko/strings.xml index f9125e4..047ea16 100644 --- a/configpanel/res/values-ko/strings.xml +++ b/configpanel/res/values-ko/strings.xml @@ -16,40 +16,41 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">고급 설정</string> <string name="backpad_panel_title">O-Touch 설정</string> <string name="backpad_panel_summary">O-Touch 구성</string> - <string name="touchpad_enable_title">O-Touch 활성화</string> + <string name="touchpad_enable_title">O-Touch 사용</string> <string name="touchpad_enable_summary">뒷면 터치패드로 휴대전화 탐색</string> <string name="touchpad_long_press_title">길게 눌러 카메라 실행</string> - <string name="touchpad_long_press_summary">터치패드를 길게 눌러 카메라 어플리케이션 실행</string> - <string name="touchpad_double_tap_title">두 번 탭하여 사진 캡쳐</string> - <string name="touchpad_double_tap_summary">카메라에서 두 번 탭하여 사진 촬영</string> + <string name="touchpad_long_press_summary">터치패드를 길게 눌러 카메라 어플리케이션을 실행합니다</string> + <string name="touchpad_double_tap_title">두 번 탭하여 사진 촬영</string> + <string name="touchpad_double_tap_summary">카메라 앱에서 두 번 탭하여 사진을 촬영합니다</string> <string name="screen_gestures_panel_title">바로가기 제스쳐</string> - <string name="screen_gestures_panel_summary">화면 꺼져 있는 동안 제스처 사용</string> + <string name="screen_gestures_panel_summary">화면이 꺼져 있는 동안 제스쳐 사용</string> <string name="touchscreen_double_tap_gesture_title">장치 깨우기</string> - <string name="touchscreen_double_tap_gesture_summary">두 번 탭하여 장치 깨우기</string> + <string name="touchscreen_double_tap_gesture_summary">두 번 탭하여 장치를 깨웁니다</string> <string name="touchscreen_camera_gesture_title">카메라</string> - <string name="touchscreen_camera_gesture_summary">원을 그려 카메라 활성화</string> + <string name="touchscreen_camera_gesture_summary">원을 그려 카메라 열기</string> <string name="touchscreen_music_gesture_title">음악</string> <string name="touchscreen_flashlight_gesture_title">플래시라이트</string> <string name="touchscreen_flashlight_gesture_summary">\'V\'를 그려 플래시라이트 토글</string> - <string name="touchscreen_music_gesture_summary">제스처로 음악 플레이어를 조작합니다 \n + <string name="touchscreen_music_gesture_summary">제스쳐를 사용하여 음악을 제어합니다 \n • 두 손가락을 세로로 움직여 재생/일시정지\n - • 왼쪽 화살표를 그려 이전 트랙으로\n + • 왼쪽 회살표를 그려 이전 트랙으로\n • 오른쪽 화살표를 그려 다음 트랙으로</string> <string name="oclick_panel_title">O-Click 설정</string> <string name="oclick_panel_summary">O-Click 장치 구성</string> <string name="oclick_connect_string">연결</string> <string name="oclick_disconnect_string">연결 해제</string> - <string name="oclick_dialog_connecting_message">페어링 시도 중</string> + <string name="oclick_dialog_connecting_message">연결 시도 중</string> <string name="oclick_take_snapshot_title">원격 카메라 셔터</string> - <string name="oclick_take_snapshot_summary">한 번 클릭으로 사진 촬영</string> + <string name="oclick_take_snapshot_summary">한 번 클릭해서 사진 촬영</string> <string name="oclick_find_my_phone_title">휴대전화 찾기</string> - <string name="oclick_find_my_phone_summary">두 번 클릭으로 폰 찾기</string> + <string name="oclick_find_my_phone_summary">두 번 클릭으로 휴대전화 찾기</string> <string name="oclick_fence_title">분실 경고</string> - <string name="oclick_fence_summary">폰에서 멀어지면 알림</string> - <string name="oclick_disconnect_alert_title">범위 이탈 알림</string> + <string name="oclick_fence_summary">휴대전화에서 멀어지면 알림</string> + <string name="oclick_disconnect_alert_title">범위 이탈 경고</string> <string name="oclick_disconnect_alert_summary">범위를 벗어났을 때 알림</string> - <string name="alert_category_title">알림</string> + <string name="alert_category_title">경고</string> <string name="action_category_title">동작</string> </resources> diff --git a/configpanel/res/values-lb/strings.xml b/configpanel/res/values-lb/strings.xml index 685bb7d..ab46a90 100644 --- a/configpanel/res/values-lb/strings.xml +++ b/configpanel/res/values-lb/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Erweidert Astellungen</string> <string name="backpad_panel_title">O-Touch-Astellungen</string> <string name="backpad_panel_summary">O-Touch astellen</string> <string name="touchpad_enable_title">O-Touch aktivéieren</string> diff --git a/configpanel/res/values-lt/strings.xml b/configpanel/res/values-lt/strings.xml index 0e27bf1..8240fc2 100644 --- a/configpanel/res/values-lt/strings.xml +++ b/configpanel/res/values-lt/strings.xml @@ -16,33 +16,34 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Išplėstiniai nustatymai</string> <string name="backpad_panel_title">„O-Touch“ nustatymai</string> <string name="backpad_panel_summary">Konfigūruoti „O-Touch“</string> <string name="touchpad_enable_title">Įjungti „O-Touch“</string> <string name="touchpad_enable_summary">Galinis jutiklinis pultas naršyti telefonui</string> - <string name="touchpad_long_press_title">Ilgas paspaudimas įjungti fotoaparatui</string> - <string name="touchpad_long_press_summary">Ilgas jutiklinio pulto paspaudimas įjungs fotoaparatą</string> - <string name="touchpad_double_tap_title">Paliesti du kartus norint užfiksuoti</string> - <string name="touchpad_double_tap_summary">Naudojantis fotoaparatu paliesti du kartus norint užfiksuoti vaizdą</string> + <string name="touchpad_long_press_title">Ilgas paspaudimas paleisti fotoaparatui</string> + <string name="touchpad_long_press_summary">Ilgas jutiklinio pulto paspaudimas paleis fotoaparato programą</string> + <string name="touchpad_double_tap_title">Dukart bakstelėti, kad užfiksuoti</string> + <string name="touchpad_double_tap_summary">Naudojantis fotoaparatu dukart bakstelėkite, kad užfiksuotumėte vaizdą</string> <string name="screen_gestures_panel_title">Gestų nuorodos</string> <string name="screen_gestures_panel_summary">Naudoti gestus kai ekranas yra išjugtas</string> - <string name="touchscreen_double_tap_gesture_title">Pažadinti prietaisą</string> - <string name="touchscreen_double_tap_gesture_summary">Paspauskite du kartus, norėdami pažadinti prietaisą</string> + <string name="touchscreen_double_tap_gesture_title">Pažadinti įrenginį</string> + <string name="touchscreen_double_tap_gesture_summary">Dukart bakstelėkite, kad pažadintumėte įrenginį</string> <string name="touchscreen_camera_gesture_title">Fotoaparatas</string> - <string name="touchscreen_camera_gesture_summary">Nupieškite apskritimą norėdami įjungti fotoaparatą</string> + <string name="touchscreen_camera_gesture_summary">Nupieškite apskritimą, kad įjungtumėte fotoaparatą</string> <string name="touchscreen_music_gesture_title">Muzika</string> <string name="touchscreen_flashlight_gesture_title">Žibintuvėlis</string> - <string name="touchscreen_flashlight_gesture_summary">Nupieškite \"V\" norėdami įjungti žibintuvėlį</string> - <string name="touchscreen_music_gesture_summary">Naudoti gestus norint kontroliuoti muzikos grojimą \n • Du pirštus vertikaliai - paleisti / sustabdyti\n • Nupiešti rodyklę kairėn - ankstesnis kūrinys\n • Nupiešti rodyklę dešinėn - kitas kūrinys</string> + <string name="touchscreen_flashlight_gesture_summary">Nupieškite \"V\", kad įjungtumėte žibintuvėlį</string> + <string name="touchscreen_music_gesture_summary">Naudokite gestus, kad kontroliuotumėte muzikos grojimą \n • Du pirštus vertikaliai - paleisti / sustabdyti\n • Nupiešti rodyklę kairėn - ankstesnis kūrinys\n • Nupiešti rodyklę dešinėn - kitas kūrinys</string> <string name="oclick_panel_title">„O-Click“ nustatymai</string> - <string name="oclick_panel_summary">Konfigūruoti „O-Click“ prietaisą</string> + <string name="oclick_panel_summary">Konfigūruoti „O-Click“ įrenginį</string> <string name="oclick_connect_string">Prisijungti</string> <string name="oclick_disconnect_string">Atsijungti</string> <string name="oclick_dialog_connecting_message">Bandoma suporuoti</string> <string name="oclick_take_snapshot_title">Nuotolinis fotoaparato fotografavimas</string> <string name="oclick_take_snapshot_summary">Fotografuoti vienu mygtuko paspaudimu</string> <string name="oclick_find_my_phone_title">Telefono ieškiklis</string> - <string name="oclick_find_my_phone_summary">Dukart spustelėti norint rasti telefoną</string> + <string name="oclick_find_my_phone_summary">Dukart bakstelėti, kad rasti telefoną</string> <string name="oclick_fence_title">Artumo perspėjimas</string> <string name="oclick_fence_summary">Įspėti kai ne šalia telefono</string> <string name="oclick_disconnect_alert_title">Nepasiekiamumo perspėjimas</string> diff --git a/configpanel/res/values-nb/strings.xml b/configpanel/res/values-nb/strings.xml index 52afa36..1ecc4cb 100644 --- a/configpanel/res/values-nb/strings.xml +++ b/configpanel/res/values-nb/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Avanserte innstillinger</string> <string name="backpad_panel_title">O-Touch innstillinger</string> <string name="backpad_panel_summary">Konfigurer O-Touch</string> <string name="touchpad_enable_title">Aktiver O-Touch</string> diff --git a/configpanel/res/values-nl/strings.xml b/configpanel/res/values-nl/strings.xml index a6c89cd..5cd938a 100644 --- a/configpanel/res/values-nl/strings.xml +++ b/configpanel/res/values-nl/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Geavanceerde instellingen</string> <string name="backpad_panel_title">Instellingen O-Touch</string> <string name="backpad_panel_summary">O-Touch instellen</string> <string name="touchpad_enable_title">O-Touch inschakelen</string> diff --git a/configpanel/res/values-pl/strings.xml b/configpanel/res/values-pl/strings.xml index 9ff0b87..ef201d7 100644 --- a/configpanel/res/values-pl/strings.xml +++ b/configpanel/res/values-pl/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Ustawienia zaawansowane</string> <string name="backpad_panel_title">Ustawienia O-Touch</string> <string name="backpad_panel_summary">Konfiguracja O-Touch</string> <string name="touchpad_enable_title">Włącz O-Touch</string> diff --git a/configpanel/res/values-pt-rBR/strings.xml b/configpanel/res/values-pt-rBR/strings.xml index 363fe1f..927a1f7 100644 --- a/configpanel/res/values-pt-rBR/strings.xml +++ b/configpanel/res/values-pt-rBR/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Configurações avançadas</string> <string name="backpad_panel_title">Configurações O-Touch</string> <string name="backpad_panel_summary">Configurar O-Touch</string> <string name="touchpad_enable_title">Ativar O-Touch</string> diff --git a/configpanel/res/values-pt-rPT/strings.xml b/configpanel/res/values-pt-rPT/strings.xml index ebcf7ee..fefc8d2 100644 --- a/configpanel/res/values-pt-rPT/strings.xml +++ b/configpanel/res/values-pt-rPT/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Definições avançadas</string> <string name="backpad_panel_title">Definições O-Touch</string> <string name="backpad_panel_summary">Configurar O-Touch</string> <string name="touchpad_enable_title">Ativar O-Touch</string> diff --git a/configpanel/res/values-ro/strings.xml b/configpanel/res/values-ro/strings.xml index a36128b..9e3323f 100644 --- a/configpanel/res/values-ro/strings.xml +++ b/configpanel/res/values-ro/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Setări avansate</string> <string name="backpad_panel_title">Setări O-Touch</string> <string name="backpad_panel_summary">Configurează O-Touch</string> <string name="touchpad_enable_title">Activează O-Touch</string> @@ -45,7 +46,7 @@ <string name="oclick_take_snapshot_title">Declanșator cameră la distanță</string> <string name="oclick_take_snapshot_summary">Un singur click pentru a fotografia</string> <string name="oclick_find_my_phone_title">Localizare telefon</string> - <string name="oclick_find_my_phone_summary">Click dublu pentru a localiza telefonul</string> + <string name="oclick_find_my_phone_summary">Apăsare dublă pentru a localiza telefonul</string> <string name="oclick_fence_title">Alertă proximitate</string> <string name="oclick_fence_summary">Alertă când telefonul nu este aproape</string> <string name="oclick_disconnect_alert_title">Alertă în afara razei</string> diff --git a/configpanel/res/values-ru/strings.xml b/configpanel/res/values-ru/strings.xml index 1b65ee9..54acfaa 100644 --- a/configpanel/res/values-ru/strings.xml +++ b/configpanel/res/values-ru/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Дополнительные настройки</string> <string name="backpad_panel_title">Настройки O-Touch</string> <string name="backpad_panel_summary">Изменение параметров O-Touch</string> <string name="touchpad_enable_title">Включить O-Touch</string> diff --git a/configpanel/res/values-si/strings.xml b/configpanel/res/values-si-rLK/strings.xml index 9b7e861..df8e059 100644 --- a/configpanel/res/values-si/strings.xml +++ b/configpanel/res/values-si-rLK/strings.xml @@ -39,7 +39,7 @@ • මීළඟ ඛණ්ඩය සඳහා දකුණු ඊතලයක් අඳින්න</string> <string name="oclick_panel_title">O-ක්ලික් සැකසීම්</string> <string name="oclick_panel_summary">O-ක්ලික් උපාංගය වින්යාසනය</string> - <string name="oclick_connect_string">සම්බන්ධ කරන්න</string> + <string name="oclick_connect_string">සබඳින්න</string> <string name="oclick_disconnect_string">විසන්ධි කරන්න</string> <string name="oclick_dialog_connecting_message">යුගලනයට උත්සාහ කරමින්</string> <string name="oclick_take_snapshot_title">දුරස්ථ කැමරා ශටරය</string> diff --git a/configpanel/res/values-sk/strings.xml b/configpanel/res/values-sk/strings.xml index c65e33d..2a83775 100644 --- a/configpanel/res/values-sk/strings.xml +++ b/configpanel/res/values-sk/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Rozšírené nastavenia</string> <string name="backpad_panel_title">Nastavenia O-Touch</string> <string name="backpad_panel_summary">Nastaviť O-Touch</string> <string name="touchpad_enable_title">Povoliť O-Touch</string> diff --git a/configpanel/res/values-sr/strings.xml b/configpanel/res/values-sr/strings.xml index 57196ba..187008b 100644 --- a/configpanel/res/values-sr/strings.xml +++ b/configpanel/res/values-sr/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Напредна подешавања</string> <string name="backpad_panel_title">О-Додирна подешавања</string> <string name="backpad_panel_summary">Конфигуриши О-Додир</string> <string name="touchpad_enable_title">Омогући О-Додир</string> diff --git a/configpanel/res/values-ta-rIN/strings.xml b/configpanel/res/values-ta-rIN/strings.xml new file mode 100644 index 0000000..e4d7ec8 --- /dev/null +++ b/configpanel/res/values-ta-rIN/strings.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2013-2014 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="backpad_panel_title">O-தொடுதிரை அமைவுகள்</string> +</resources> diff --git a/configpanel/res/values-tr/strings.xml b/configpanel/res/values-tr/strings.xml index eff6275..210252a 100644 --- a/configpanel/res/values-tr/strings.xml +++ b/configpanel/res/values-tr/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">Gelişmiş ayarlar</string> <string name="backpad_panel_title">O-Touch ayarları</string> <string name="backpad_panel_summary">O-Touch\'ı ayarla</string> <string name="touchpad_enable_title">O-Touch\'ı etkinleştir</string> diff --git a/configpanel/res/values-zh-rCN/strings.xml b/configpanel/res/values-zh-rCN/strings.xml index 24bc521..f96db00 100644 --- a/configpanel/res/values-zh-rCN/strings.xml +++ b/configpanel/res/values-zh-rCN/strings.xml @@ -16,6 +16,7 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">高级设置</string> <string name="backpad_panel_title">O-Touch 设置</string> <string name="backpad_panel_summary">配置 O-Touch</string> <string name="touchpad_enable_title">启用 O-Touch</string> diff --git a/configpanel/res/values-zh-rTW/strings.xml b/configpanel/res/values-zh-rTW/strings.xml index 4269781..be63e56 100644 --- a/configpanel/res/values-zh-rTW/strings.xml +++ b/configpanel/res/values-zh-rTW/strings.xml @@ -16,23 +16,24 @@ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="app_name">進階設定</string> <string name="backpad_panel_title">O-Touch 設定</string> <string name="backpad_panel_summary">配置 O-Touch</string> <string name="touchpad_enable_title">啟用 O-Touch</string> <string name="touchpad_enable_summary">後觸控板操縱手機</string> <string name="touchpad_long_press_title">長按即可啟動相機</string> <string name="touchpad_long_press_summary">長按觸控板將啟動相機</string> - <string name="touchpad_double_tap_title">輕按兩下即可拍攝</string> - <string name="touchpad_double_tap_summary">在相機時,輕按兩下即可拍照</string> + <string name="touchpad_double_tap_title">輕觸兩下即可拍攝</string> + <string name="touchpad_double_tap_summary">使用相機時,輕觸兩下即可拍攝</string> <string name="screen_gestures_panel_title">手勢捷徑</string> - <string name="screen_gestures_panel_summary">在螢幕關閉時使用手勢</string> + <string name="screen_gestures_panel_summary">螢幕關閉時使用手勢</string> <string name="touchscreen_double_tap_gesture_title">喚醒裝置</string> - <string name="touchscreen_double_tap_gesture_summary">輕按兩下即可喚醒裝置</string> + <string name="touchscreen_double_tap_gesture_summary">輕觸兩下即可喚醒裝置</string> <string name="touchscreen_camera_gesture_title">相機</string> <string name="touchscreen_camera_gesture_summary">畫一個圈即可啟動相機</string> <string name="touchscreen_music_gesture_title">音樂</string> <string name="touchscreen_flashlight_gesture_title">手電筒</string> - <string name="touchscreen_flashlight_gesture_summary">畫一個「V」即可切換手電筒開關</string> + <string name="touchscreen_flashlight_gesture_summary">畫一個「V」即可開關手電筒</string> <string name="touchscreen_music_gesture_summary">使用手勢控制音樂播放\n • 兩隻手指垂直滑動即可播放/暫停\n • 畫左箭頭上一首\n @@ -43,13 +44,13 @@ <string name="oclick_disconnect_string">中斷連線</string> <string name="oclick_dialog_connecting_message">嘗試配對</string> <string name="oclick_take_snapshot_title">遙控相機快門</string> - <string name="oclick_take_snapshot_summary">按一下即可拍照</string> + <string name="oclick_take_snapshot_summary">輕觸一下即可拍攝</string> <string name="oclick_find_my_phone_title">手機定位器</string> - <string name="oclick_find_my_phone_summary">按兩下即可尋找手機</string> + <string name="oclick_find_my_phone_summary">輕觸兩下即可尋找手機</string> <string name="oclick_fence_title">接近警報</string> - <string name="oclick_fence_summary">當不在手機附近時發出警報</string> + <string name="oclick_fence_summary">不在手機附近時發出警報</string> <string name="oclick_disconnect_alert_title">超出範圍警報</string> - <string name="oclick_disconnect_alert_summary">當手機在範圍之外時發出警報</string> + <string name="oclick_disconnect_alert_summary">手機不在範圍時發出警報</string> <string name="alert_category_title">警報</string> <string name="action_category_title">動作</string> </resources> diff --git a/configpanel/res/values/colors.xml b/configpanel/res/values/colors.xml new file mode 100644 index 0000000..c1f38af --- /dev/null +++ b/configpanel/res/values/colors.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <!-- Palette colors referenced by top-level themes. --> + <color name="theme_primary">#ff263238</color> + <color name="theme_primary_dark">#ff21272b</color> + <color name="theme_accent">#ff009688</color> +</resources> diff --git a/configpanel/res/values/dimens.xml b/configpanel/res/values/dimens.xml new file mode 100644 index 0000000..133701d --- /dev/null +++ b/configpanel/res/values/dimens.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <!-- ActionBar contentInsetStart --> + <dimen name="actionbar_subsettings_contentInsetStart">72dp</dimen> +</resources> diff --git a/configpanel/res/values/strings.xml b/configpanel/res/values/strings.xml index 02b3d38..a374107 100644 --- a/configpanel/res/values/strings.xml +++ b/configpanel/res/values/strings.xml @@ -64,4 +64,8 @@ <string name="alert_category_title">Alerts</string> <string name="action_category_title">Actions</string> + + <!-- O-Click notification --> + <string name="oclick_locator_notification_title">O-Click phone locator</string> + <string name="oclick_locator_notification_text">Locator alert is playing. Tap to dismiss</string> </resources> diff --git a/configpanel/res/values/styles.xml b/configpanel/res/values/styles.xml index f354891..b013f16 100644 --- a/configpanel/res/values/styles.xml +++ b/configpanel/res/values/styles.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2014 The CyanogenMod Project + Copyright (C) 2014-2015 The CyanogenMod Project Licensed under the Apache License, Version 2.0 (the "License" you may not use this file except in compliance with the License. @@ -15,7 +15,15 @@ limitations under the License. --> <resources> - <style name="Theme.Main" parent="@android:style/Theme.Holo"> - <item name="android:actionBarStyle">@android:style/Widget.Holo.ActionBar.Solid</item> + <style name="Theme.Main" parent="@android:style/Theme.Material.Light.DarkActionBar"> + <item name="android:colorPrimary">@color/theme_primary</item> + <item name="android:colorPrimaryDark">@color/theme_primary_dark</item> + <item name="android:colorAccent">@color/theme_accent</item> + <!-- Redefine the ActionBar style for contentInsetStart --> + <item name="android:actionBarStyle">@style/Theme.ActionBar.SubSettings</item> + </style> + + <style name="Theme.ActionBar.SubSettings" parent="@android:style/Widget.Material.Light.ActionBar.Solid"> + <item name="android:contentInsetStart">@dimen/actionbar_subsettings_contentInsetStart</item> </style> </resources> diff --git a/configpanel/src/com/cyanogenmod/settings/device/BluetoothInputSettings.java b/configpanel/src/com/cyanogenmod/settings/device/BluetoothInputSettings.java index 9b566b4..7a83d02 100644 --- a/configpanel/src/com/cyanogenmod/settings/device/BluetoothInputSettings.java +++ b/configpanel/src/com/cyanogenmod/settings/device/BluetoothInputSettings.java @@ -41,6 +41,8 @@ import android.preference.PreferenceScreen; import android.view.MenuItem; import android.widget.Toast; +import com.android.internal.util.cm.ScreenType; + import com.cyanogenmod.settings.device.utils.Constants; @SuppressWarnings("deprecation") @@ -52,16 +54,14 @@ public class BluetoothInputSettings extends PreferenceActivity private static final int BLUETOOTH_REQUEST_CODE = 1; private static final int BLUETOOTH_PICKER_CODE = 2; - private static final String sOclickActionsCategory = "oclick_action_category"; - private static final String sOclickAlertCategory = "oclick_alert_category"; - private static final String sOclickConnectPreference = "oclick_connect"; + private static final String CATEGORY_ACTIONS = "oclick_action_category"; + private static final String CATEGORY_ALERT = "oclick_alert_category"; private ProgressDialog mProgressDialog; - EventReceiver mReceiver; - boolean mConnected; - Ringtone mRingtone; + private boolean mConnected; + private Handler mHandler = new Handler(); - class EventReceiver extends BroadcastReceiver { + private BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { int commandKey = intent.getIntExtra(COMMAND_KEY, -1); @@ -78,13 +78,13 @@ public class BluetoothInputSettings extends PreferenceActivity break; } } - } + }; - void setConnectedState(boolean enable) { + private void setConnectedState(boolean enable) { mConnected = enable; - findPreference(sOclickActionsCategory).setEnabled(enable); - findPreference(sOclickAlertCategory).setEnabled(enable); - findPreference(sOclickConnectPreference).setTitle(enable ? + findPreference(CATEGORY_ACTIONS).setEnabled(enable); + findPreference(CATEGORY_ALERT).setEnabled(enable); + findPreference(Constants.OCLICK_CONNECT_KEY).setTitle(enable ? R.string.oclick_disconnect_string : R.string.oclick_connect_string); } @@ -92,8 +92,7 @@ public class BluetoothInputSettings extends PreferenceActivity public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.oclick_panel); - mReceiver = new EventReceiver(); - setConnectedState(OclickService.isConnectedToOclick); + setConnectedState(OclickService.sOclickConnected); getActionBar().setDisplayHomeAsUpEnabled(true); } @@ -112,7 +111,7 @@ public class BluetoothInputSettings extends PreferenceActivity BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter(); - return (bluetoothAdapter != null && bluetoothAdapter.isEnabled()); + return bluetoothAdapter != null && bluetoothAdapter.isEnabled(); } private void startBluetootDevicePicker() { @@ -151,14 +150,14 @@ public class BluetoothInputSettings extends PreferenceActivity @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if ((requestCode == BLUETOOTH_REQUEST_CODE) && (resultCode == Activity.RESULT_OK)) { + if (requestCode == BLUETOOTH_REQUEST_CODE && resultCode == Activity.RESULT_OK) { // Start bluetooth device picker startBluetootDevicePicker(); } else if (requestCode == BLUETOOTH_PICKER_CODE && isBluetoothOn()) { String dialogTitle = this.getString(R.string.oclick_dialog_title); String dialogMessage = this.getString(R.string.oclick_dialog_connecting_message); mProgressDialog = ProgressDialog.show(this, dialogTitle, dialogMessage, true); - new Handler().postDelayed(new Runnable() { + mHandler.postDelayed(new Runnable() { @Override public void run() { if (mProgressDialog != null) { @@ -175,6 +174,11 @@ public class BluetoothInputSettings extends PreferenceActivity IntentFilter filter = new IntentFilter(); filter.addAction(PROCESS_COMMAND_ACTION); registerReceiver(mReceiver, filter); + + // If running on a phone, remove padding around the listview + if (!ScreenType.isTablet(this)) { + getListView().setPadding(0, 0, 0, 0); + } } @Override diff --git a/configpanel/src/com/cyanogenmod/settings/device/BluetoothReceiver.java b/configpanel/src/com/cyanogenmod/settings/device/BluetoothReceiver.java index e50adef..2cb6027 100644 --- a/configpanel/src/com/cyanogenmod/settings/device/BluetoothReceiver.java +++ b/configpanel/src/com/cyanogenmod/settings/device/BluetoothReceiver.java @@ -37,7 +37,7 @@ public class BluetoothReceiver extends BroadcastReceiver { return; } String deviceName = device.getName().toLowerCase(); - if (deviceName.contains("oppo b") || deviceName.equals("o-click")) { + if (deviceName.contains("oppo b") || deviceName.startsWith("o-click")) { Intent i = new Intent(context, OclickService.class); i.putExtra(BluetoothDevice.EXTRA_DEVICE, device); context.startService(i); diff --git a/configpanel/src/com/cyanogenmod/settings/device/GesturePadSettings.java b/configpanel/src/com/cyanogenmod/settings/device/GesturePadSettings.java index 5376750..1e96f9a 100644 --- a/configpanel/src/com/cyanogenmod/settings/device/GesturePadSettings.java +++ b/configpanel/src/com/cyanogenmod/settings/device/GesturePadSettings.java @@ -16,6 +16,8 @@ package com.cyanogenmod.settings.device; +import com.android.internal.util.cm.ScreenType; + import com.cyanogenmod.settings.device.utils.Constants; import com.cyanogenmod.settings.device.utils.NodePreferenceActivity; @@ -39,6 +41,16 @@ public class GesturePadSettings extends NodePreferenceActivity { } @Override + protected void onResume() { + super.onResume(); + + // If running on a phone, remove padding around the listview + if (!ScreenType.isTablet(this)) { + getListView().setPadding(0, 0, 0, 0); + } + } + + @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (preference.getKey().equals(Constants.TOUCHPAD_DOUBLETAP_KEY)) { IBinder b = ServiceManager.getService("gesture"); diff --git a/configpanel/src/com/cyanogenmod/settings/device/OclickService.java b/configpanel/src/com/cyanogenmod/settings/device/OclickService.java index dbad6d3..5ff8b60 100644 --- a/configpanel/src/com/cyanogenmod/settings/device/OclickService.java +++ b/configpanel/src/com/cyanogenmod/settings/device/OclickService.java @@ -16,8 +16,6 @@ package com.cyanogenmod.settings.device; -import java.util.UUID; - import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; @@ -32,7 +30,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; -import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.hardware.input.InputManager; import android.media.AudioManager; import android.media.Ringtone; @@ -48,7 +45,10 @@ import android.view.KeyEvent; import com.cyanogenmod.settings.device.utils.Constants; -public class OclickService extends Service implements OnSharedPreferenceChangeListener { +import java.util.UUID; + +public class OclickService extends Service implements + SharedPreferences.OnSharedPreferenceChangeListener { private static final String TAG = OclickService.class.getSimpleName(); private static final UUID sTriggerServiceUUID = @@ -58,6 +58,11 @@ public class OclickService extends Service implements OnSharedPreferenceChangeLi private static final UUID sTriggerCharacteristicUUIDv2 = UUID.fromString("f000ffe1-0451-4000-b000-000000000000"); + private static final UUID sOclick2ServiceUUID = + UUID.fromString("00002200-0000-1000-8000-00805f9b34fb"); + private static final UUID sOclick2KeyCharacteristicUUID = + UUID.fromString("00002201-0000-1000-8000-00805f9b34fb"); + private static final UUID sImmediateAlertServiceUUID = UUID.fromString("00001802-0000-1000-8000-00805f9b34fb"); //0-2 private static final UUID sImmediateAlertCharacteristicUUID = @@ -70,38 +75,104 @@ public class OclickService extends Service implements OnSharedPreferenceChangeLi public static final String CANCEL_ALERT_PHONE = "cancel_alert_phone"; + private static final class Oclick2Constants { + private static final int MSG_CLASS_CALL = 1; + private static final int MSG_CLASS_MESSAGE = 2; + private static final int MSG_CLASS_LED = 3; + private static final int MSG_CLASS_KEY = 5; + private static final int MSG_CLASS_CONNECTION = 7; + private static final int MSG_CLASS_LINKLOSE = 8; + private static final int MSG_CLASS_RSSI = 11; + + /* payload: count (16 bit integer) */ + private static final int MSG_TYPE_CALL_SET_INCOMING = 1; + private static final int MSG_TYPE_CALL_SET_MISSED = 2; + private static final int MSG_TYPE_CALL_SET_READ = 3; + + /* payload: count (16 bit integer) */ + private static final int MSG_TYPE_MESSAGE_UNREAD = 1; + private static final int MSG_TYPE_MESSAGE_READ = 2; + + /* payload: color bitmask (1 byte, white = 1, red = 2, green = 4, blue = 8) */ + private static final int MSG_TYPE_LED_ON = 1; + private static final int MSG_TYPE_LED_FLASH = 2; + private static final int MSG_TYPE_LED_OFF = 3; + + /* payload: + * CONNECTION_INTERVAL_MIN (16 bit integer), + * CONNECTION_INTERVAL_MAX (16 bit integer), + * CONNECTION_LATENCY (16 bit integer), + * SUPERVISION_TIMEOUT (16 bit integer) + */ + private static final int MSG_TYPE_CONNECTION_GET_PARAMS = 1; + private static final int MSG_TYPE_CONNECTION_SET_PARAMS = 2; + + /* payload: level (1 byte, off = 0, on = 1) */ + private static final int MSG_TYPE_LINKLOSE_GET_LEVEL = 1; + private static final int MSG_TYPE_LINKLOSE_SET_LEVEL = 2; + + private static final int MSG_TYPE_RSSI_READ_RATE_GET = 1; + private static final int MSG_TYPE_RSSI_READ_RATE_SET = 2; + private static final int MSG_TYPE_RSSI_GET = 3; + + private static final int KEYCODE_MIDDLE = 0x10; + private static final int KEYCODE_UP = 0x20; + private static final int KEYCODE_RIGHT = 0x30; + private static final int KEYCODE_DOWN = 0x40; + private static final int KEYCODE_LEFT = 0x50; + private static final int KEYCODE_MASK = 0xf0; + + private static final int KEYTYPE_LONG_RELEASE = 0; + private static final int KEYTYPE_SHORT = 1; + private static final int KEYTYPE_DOUBLE = 2; + private static final int KEYTYPE_LONG_PRESS = 3; + private static final int KEYTYPE_MASK = 0xf; + } + + public static boolean sOclickConnected = false; + private BluetoothGatt mBluetoothGatt; - private Handler mHandler; - boolean mAlerting; - private Handler mRssiPoll = new Handler(); + private Handler mHandler = new Handler(); + private boolean mAlerting; private BluetoothDevice mOClickDevice; private AudioManager mAudioManager; + private boolean mTapPending = false; + private Ringtone mRingtone; - public static boolean isConnectedToOclick = false; - - @Override - public IBinder onBind(Intent intent) { - return null; - } + private Runnable mSingleTapRunnable = new Runnable() { + @Override + public void run() { + injectKey(KeyEvent.KEYCODE_CAMERA); + mTapPending = false; + } + }; + private Runnable mRssiPollRunnable = new Runnable() { + @Override + public void run() { + mBluetoothGatt.readRemoteRssi(); + mHandler.postDelayed(this, 2000); + } + }; - private void sendCommand(int command) { - Log.d(TAG, "sendCommand : " + command); - Intent i = new Intent(BluetoothInputSettings.PROCESS_COMMAND_ACTION); - i.putExtra(BluetoothInputSettings.COMMAND_KEY, command); - sendBroadcast(i); - } + private BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + if (intent.getAction().equals(CANCEL_ALERT_PHONE)) { + stopPhoneLocator(); + } + } + }; private BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { - @Override public void onConnectionStateChange(BluetoothGatt gatt, int status, final int newState) { Log.d(TAG, "onConnectionStateChange " + status + " " + newState); if (newState == BluetoothGatt.STATE_CONNECTED) { mBluetoothGatt = gatt; - isConnectedToOclick = true; + sOclickConnected = true; gatt.discoverServices(); } else if (newState == BluetoothGatt.STATE_DISCONNECTED) { - isConnectedToOclick = false; + sOclickConnected = false; stopSelf(); } sendCommand(newState); @@ -111,26 +182,49 @@ public class OclickService extends Service implements OnSharedPreferenceChangeLi public void onServicesDiscovered(final BluetoothGatt gatt, int status) { Log.d(TAG, "onServicesDiscovered " + status); - // Register trigger notification (Used for camera/alarm) - BluetoothGattService service = gatt.getService(sTriggerServiceUUID); - BluetoothGattCharacteristic trigger = - service.getCharacteristic(sTriggerCharacteristicUUIDv1); - - if (trigger == null) { - trigger = service.getCharacteristic(sTriggerCharacteristicUUIDv2); + BluetoothGattService serviceV2 = gatt.getService(sOclick2ServiceUUID); + BluetoothGattCharacteristic keyCharacteristic = null; + if (serviceV2 != null) { + keyCharacteristic = serviceV2.getCharacteristic(sOclick2KeyCharacteristicUUID); } - gatt.setCharacteristicNotification(trigger, true); - toggleRssiListener(); - - boolean alert = Constants.isPreferenceEnabled(getBaseContext(), - Constants.OCLICK_DISCONNECT_ALERT_KEY, true); - service = mBluetoothGatt.getService(sLinkLossServiceUUID); - trigger = service.getCharacteristic(sLinkLossCharacteristicUUID); - byte[] value = new byte[1]; - value[0] = (byte) (alert ? 2 : 0); - trigger.setValue(value); - mBluetoothGatt.writeCharacteristic(trigger); + if (keyCharacteristic != null) { + // O-Click 2.0 mode + gatt.setCharacteristicNotification(keyCharacteristic, true); + + // update connection parameters - TODO: use constants + byte[] params = new byte[] { + Oclick2Constants.MSG_CLASS_CONNECTION, + Oclick2Constants.MSG_TYPE_CONNECTION_SET_PARAMS, + /* CONNECTION_INTERVAL_MIN = 200 */ (byte) 0xc8, 0, + /* CONNECTION_INTERVAL_MAX = 400 */ (byte) 0x90, 1, + /* CONNECTION_LATENCY = 1 */ 1, 0, + /* SUPERVISION_TIMEOUT = 1000 */ (byte) 0xe8, 3 + }; + keyCharacteristic.setValue(params); + mBluetoothGatt.writeCharacteristic(keyCharacteristic); + } else { + // Register trigger notification (Used for camera/alarm) + BluetoothGattService service = gatt.getService(sTriggerServiceUUID); + BluetoothGattCharacteristic trigger = + service.getCharacteristic(sTriggerCharacteristicUUIDv1); + + if (trigger == null) { + trigger = service.getCharacteristic(sTriggerCharacteristicUUIDv2); + } + gatt.setCharacteristicNotification(trigger, true); + + toggleRssiListener(); + + boolean alert = Constants.isPreferenceEnabled(OclickService.this, + Constants.OCLICK_DISCONNECT_ALERT_KEY, true); + service = mBluetoothGatt.getService(sLinkLossServiceUUID); + trigger = service.getCharacteristic(sLinkLossCharacteristicUUID); + byte[] value = new byte[1]; + value[0] = (byte) (alert ? 2 : 0); + trigger.setValue(value); + mBluetoothGatt.writeCharacteristic(trigger); + } } @Override @@ -159,45 +253,41 @@ public class OclickService extends Service implements OnSharedPreferenceChangeLi BluetoothGattCharacteristic characteristic) { Log.d(TAG, "Characteristic changed " + characteristic.getUuid()); - if (mTapPending) { - NotificationManager notificationManager = - (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - - if (mRingtone.isPlaying()) { - Log.d(TAG, "Stopping ring alarm"); - mRingtone.stop(); - notificationManager.cancel(0); + if (characteristic.getUuid().equals(sOclick2KeyCharacteristicUUID)) { + byte[] value = characteristic.getValue(); + if (value.length == 3 && value[0] == Oclick2Constants.MSG_CLASS_KEY) { + int key = value[2] & Oclick2Constants.KEYCODE_MASK; + int action = value[2] & Oclick2Constants.KEYTYPE_MASK; + if (key == Oclick2Constants.KEYCODE_MIDDLE) { + if (action == Oclick2Constants.KEYTYPE_DOUBLE) { + if (mRingtone.isPlaying()) { + stopPhoneLocator(); + } else { + startPhoneLocator(); + } + } else if (action == Oclick2Constants.KEYTYPE_SHORT) { + injectKey(KeyEvent.KEYCODE_CAMERA); + } + } + } + } else { + if (mTapPending) { + if (mRingtone.isPlaying()) { + stopPhoneLocator(); + return; + } + + mHandler.removeCallbacks(mSingleTapRunnable); + mTapPending = false; + startPhoneLocator(); return; } - - Log.d(TAG, "Executing ring alarm"); - - mAudioManager.setStreamVolume(AudioManager.STREAM_ALARM, - mAudioManager.getStreamMaxVolume(AudioManager.STREAM_ALARM), 0); - mRingtone.play(); - mHandler.removeCallbacks(mSingleTapRunnable); - - Notification.Builder builder = new Notification.Builder(OclickService.this); - builder.setSmallIcon(R.drawable.locator_icon); - builder.setContentTitle("O-Click phone locator"); - builder.setContentText("Locator alert is playing. Tap to dismiss"); - builder.setAutoCancel(true); - builder.setOngoing(true); - - PendingIntent resultPendingIntent = PendingIntent.getBroadcast( - getBaseContext(), 0, new Intent(CANCEL_ALERT_PHONE), 0); - builder.setContentIntent(resultPendingIntent); - notificationManager.notify(0, builder.build()); - - mTapPending = false; - return; + Log.d(TAG, "Setting single tap runnable"); + mTapPending = true; + mHandler.postDelayed(mSingleTapRunnable, 1500); } - Log.d(TAG, "Setting single tap runnable"); - mTapPending = true; - mHandler.postDelayed(mSingleTapRunnable, 1500); } - @Override public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) { Log.d(TAG, "Rssi value : " + rssi); @@ -216,76 +306,47 @@ public class OclickService extends Service implements OnSharedPreferenceChangeLi mBluetoothGatt.writeCharacteristic(charS); } } - - }; - - boolean mTapPending = false; - - private Runnable mSingleTapRunnable = new Runnable() { - @Override - public void run() { - long now = SystemClock.uptimeMillis(); - InputManager im = InputManager.getInstance(); - im.injectInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, - KeyEvent.KEYCODE_CAMERA, 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, - InputDevice.SOURCE_KEYBOARD), InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); - im.injectInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP,KeyEvent.KEYCODE_CAMERA, - 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD), - InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); - mTapPending = false; - - } }; - private Ringtone mRingtone; - private void toggleRssiListener() { - boolean fence = Constants.isPreferenceEnabled( - getBaseContext(), Constants.OCLICK_FENCE_KEY, true); - mRssiPoll.removeCallbacksAndMessages(null); - if (fence) { - Log.d(TAG, "Enabling rssi listener"); - mRssiPoll.postDelayed(new Runnable() { - @Override - public void run() { - mBluetoothGatt.readRemoteRssi(); - mRssiPoll.postDelayed(this, 2000); - } - }, 100); - } + @Override + public IBinder onBind(Intent intent) { + return null; } @Override public void onCreate() { mHandler = new Handler(); - PreferenceManager.getDefaultSharedPreferences(this) - .registerOnSharedPreferenceChangeListener(this); + + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + prefs.registerOnSharedPreferenceChangeListener(this); + IntentFilter filter = new IntentFilter(); filter.addAction(CANCEL_ALERT_PHONE); registerReceiver(mReceiver, filter); + RingtoneManager ringtoneManager = new RingtoneManager(this); ringtoneManager.setType(RingtoneManager.TYPE_ALARM); int length = ringtoneManager.getCursor().getCount(); for (int i = 0; i < length; i++) { mRingtone = ringtoneManager.getRingtone(i); - if (mRingtone != null && mRingtone.getTitle(this) - .toLowerCase().contains("barium")) { + if (mRingtone != null && mRingtone.getTitle(this).toLowerCase().contains("barium")) { break; } } - mAudioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); + mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); } - AlarmCancel mReceiver = new AlarmCancel(); - class AlarmCancel extends BroadcastReceiver { - @Override - public void onReceive(Context context, Intent intent) { - if (intent.getAction().equals(CANCEL_ALERT_PHONE)) { - if (mRingtone.isPlaying()) { - mRingtone.stop(); - } - } - } - }; + @Override + public void onDestroy() { + Log.d(TAG, "Service being killed"); + mHandler.removeCallbacksAndMessages(null); + mBluetoothGatt.disconnect(); + mBluetoothGatt.close(); + + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); + prefs.unregisterOnSharedPreferenceChangeListener(this); + unregisterReceiver(mReceiver); + } @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, @@ -293,8 +354,8 @@ public class OclickService extends Service implements OnSharedPreferenceChangeLi if (key.equals(Constants.OCLICK_FENCE_KEY)) { toggleRssiListener(); } else if (key.equals(Constants.OCLICK_DISCONNECT_ALERT_KEY)) { - boolean alert = Constants.isPreferenceEnabled( - getBaseContext(), Constants.OCLICK_DISCONNECT_ALERT_KEY, true); + boolean alert = Constants.isPreferenceEnabled(this, + Constants.OCLICK_DISCONNECT_ALERT_KEY, true); BluetoothGattService service = mBluetoothGatt.getService(sLinkLossServiceUUID); BluetoothGattCharacteristic trigger = @@ -315,19 +376,68 @@ public class OclickService extends Service implements OnSharedPreferenceChangeLi Log.e(TAG, "No bluetooth device provided"); stopSelf(); } - mOClickDevice.connectGatt(getBaseContext(), false, mGattCallback); + mOClickDevice.connectGatt(this, false, mGattCallback); } return Service.START_REDELIVER_INTENT; } - @Override - public void onDestroy() { - Log.d(TAG, "Service being killed"); - mRssiPoll.removeCallbacksAndMessages(null); - mBluetoothGatt.disconnect(); - mBluetoothGatt.close(); - PreferenceManager.getDefaultSharedPreferences(this) - .unregisterOnSharedPreferenceChangeListener(this); - unregisterReceiver(mReceiver); + private void startPhoneLocator() { + Log.d(TAG, "Executing ring alarm"); + + // FIXME: this needs to be reverted + mAudioManager.setStreamVolume(AudioManager.STREAM_ALARM, + mAudioManager.getStreamMaxVolume(AudioManager.STREAM_ALARM), 0); + mRingtone.play(); + + Notification.Builder builder = new Notification.Builder(this); + builder.setSmallIcon(R.drawable.locator_icon); + builder.setContentTitle(getString(R.string.oclick_locator_notification_title)); + builder.setContentText(getString(R.string.oclick_locator_notification_text)); + builder.setAutoCancel(true); + builder.setOngoing(true); + + PendingIntent resultPendingIntent = PendingIntent.getBroadcast(this, + 0, new Intent(CANCEL_ALERT_PHONE), 0); + builder.setContentIntent(resultPendingIntent); + + NotificationManager notificationManager = + (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + notificationManager.notify(0, builder.build()); + } + + private void stopPhoneLocator() { + NotificationManager notificationManager = + (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + + Log.d(TAG, "Stopping ring alarm"); + mRingtone.stop(); + notificationManager.cancel(0); + } + + private void injectKey(int keyCode) { + long now = SystemClock.uptimeMillis(); + InputManager im = InputManager.getInstance(); + im.injectInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, + 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD), + InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + im.injectInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, + 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD), + InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + } + + private void toggleRssiListener() { + boolean fence = Constants.isPreferenceEnabled(this, Constants.OCLICK_FENCE_KEY, true); + mHandler.removeCallbacks(mRssiPollRunnable); + if (fence) { + Log.d(TAG, "Enabling rssi listener"); + mHandler.postDelayed(mRssiPollRunnable, 100); + } + } + + private void sendCommand(int command) { + Log.d(TAG, "sendCommand : " + command); + Intent i = new Intent(BluetoothInputSettings.PROCESS_COMMAND_ACTION); + i.putExtra(BluetoothInputSettings.COMMAND_KEY, command); + sendBroadcast(i); } } diff --git a/configpanel/src/com/cyanogenmod/settings/device/Startup.java b/configpanel/src/com/cyanogenmod/settings/device/Startup.java index 6e26473..ec0a8d4 100644 --- a/configpanel/src/com/cyanogenmod/settings/device/Startup.java +++ b/configpanel/src/com/cyanogenmod/settings/device/Startup.java @@ -75,7 +75,7 @@ public class Startup extends BroadcastReceiver { } // Disable O-Click settings if needed - if (!"OPPO".equals(Build.BRAND)) { + if (!Build.MODEL.equals("N1") && !Build.MODEL.equals("N3")) { disableComponent(context, BluetoothInputSettings.class.getName()); disableComponent(context, OclickService.class.getName()); disableComponent(context, BluetoothReceiver.class.getName()); diff --git a/configpanel/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java b/configpanel/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java index 502b11a..33d964f 100644 --- a/configpanel/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java +++ b/configpanel/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java @@ -16,6 +16,8 @@ package com.cyanogenmod.settings.device; +import com.android.internal.util.cm.ScreenType; + import com.cyanogenmod.settings.device.utils.NodePreferenceActivity; import android.os.Bundle; @@ -28,4 +30,14 @@ public class TouchscreenGestureSettings extends NodePreferenceActivity { addPreferencesFromResource(R.xml.touchscreen_panel); } + @Override + protected void onResume() { + super.onResume(); + + // If running on a phone, remove padding around the listview + if (!ScreenType.isTablet(this)) { + getListView().setPadding(0, 0, 0, 0); + } + } + } |
