Merge "Improve titles"
diff --git a/res/layout/crypt_keeper_pattern_entry.xml b/res/layout/crypt_keeper_pattern_entry.xml
new file mode 100644
index 0000000..a59d36f
--- /dev/null
+++ b/res/layout/crypt_keeper_pattern_entry.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+>
+ <include layout="@layout/crypt_keeper_status" />
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginStart="8dip"
+ android:layout_marginEnd="8dip"
+ android:orientation="horizontal"
+ >
+ <include layout="@layout/crypt_keeper_pattern_field" />
+ </LinearLayout>
+
+ <!-- Emergency call button.
+ Text and icon are set by CryptKeeper.updateEmergencyCallButtonState() -->
+ <Button android:id="@+id/emergencyCallButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginTop="16dip"
+ style="@*android:style/Widget.Button.Transparent"
+ android:textSize="14sp"
+ android:drawablePadding="6dip"
+ />
+
+</LinearLayout>
diff --git a/res/layout/crypt_keeper_pattern_field.xml b/res/layout/crypt_keeper_pattern_field.xml
new file mode 100644
index 0000000..c4ec1f4
--- /dev/null
+++ b/res/layout/crypt_keeper_pattern_field.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Contents of the password entry field for CryptKeeper. Comes with an IME
+ switcher, if necessary. Assumed to be in a horizontal LinearLayout. -->
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+ <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <ImageView android:id="@+id/switch_ime_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_lockscreen_ime"
+ android:clickable="true"
+ android:contentDescription="@string/crypt_keeper_switch_input_method"
+ android:padding="8dip"
+ android:layout_gravity="center"
+ android:background="?android:attr/selectableItemBackground"
+ android:visibility="gone"
+ />
+</merge>
diff --git a/res/layout/crypt_keeper_pin_entry.xml b/res/layout/crypt_keeper_pin_entry.xml
new file mode 100644
index 0000000..dfc5fb5
--- /dev/null
+++ b/res/layout/crypt_keeper_pin_entry.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+>
+ <include layout="@layout/crypt_keeper_status" />
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginStart="8dip"
+ android:layout_marginEnd="8dip"
+ android:orientation="horizontal"
+ >
+ <include layout="@layout/crypt_keeper_pin_field" />
+ </LinearLayout>
+
+ <!-- Emergency call button.
+ Text and icon are set by CryptKeeper.updateEmergencyCallButtonState() -->
+ <Button android:id="@+id/emergencyCallButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginTop="16dip"
+ style="@*android:style/Widget.Button.Transparent"
+ android:textSize="14sp"
+ android:drawablePadding="6dip"
+ />
+
+</LinearLayout>
diff --git a/res/layout/crypt_keeper_pin_field.xml b/res/layout/crypt_keeper_pin_field.xml
new file mode 100644
index 0000000..270b26b
--- /dev/null
+++ b/res/layout/crypt_keeper_pin_field.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Contents of the password entry field for CryptKeeper. Comes with an IME
+ switcher, if necessary. Assumed to be in a horizontal LinearLayout. -->
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+ <EditText android:id="@+id/passwordEntry"
+ android:layout_height="wrap_content"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:singleLine="true"
+ android:inputType="numberPassword"
+ android:imeOptions="flagForceAscii|actionDone"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ />
+
+ <ImageView android:id="@+id/switch_ime_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_lockscreen_ime"
+ android:clickable="true"
+ android:contentDescription="@string/crypt_keeper_switch_input_method"
+ android:padding="8dip"
+ android:layout_gravity="center"
+ android:background="?android:attr/selectableItemBackground"
+ android:visibility="gone"
+ />
+</merge>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 26b89cb..47a4bb3 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -2041,8 +2041,8 @@
<string name="nfc_payment_learn_more" msgid="5583407773744324447">"Få flere oplysninger"</string>
<string name="nfc_payment_menu_item_add_service" msgid="2885947408068969081">"Find apps"</string>
<string name="nfc_payment_set_default_label" msgid="7315817259485674542">"Vil du angive dette som din præference?"</string>
- <string name="nfc_payment_set_default" msgid="8961120988148253016">"Vil du altid bruge <xliff:g id="APP">%1$s</xliff:g>, når du bruger Peg og betal?"</string>
- <string name="nfc_payment_set_default_instead_of" msgid="3803693771001226795">"Vil du altid bruge <xliff:g id="APP_0">%1$s</xliff:g> i stedet for <xliff:g id="APP_1">%2$s</xliff:g>, når du bruger Peg og betal?"</string>
+ <string name="nfc_payment_set_default" msgid="8961120988148253016">"Vil du altid bruge <xliff:g id="APP">%1$s</xliff:g>, når du bruger Tryk og betal?"</string>
+ <string name="nfc_payment_set_default_instead_of" msgid="3803693771001226795">"Vil du altid bruge <xliff:g id="APP_0">%1$s</xliff:g> i stedet for <xliff:g id="APP_1">%2$s</xliff:g>, når du bruger Tryk og betal?"</string>
<string name="restriction_settings_title" msgid="4233515503765879736">"Begrænsninger"</string>
<string name="restriction_menu_reset" msgid="2067644523489568173">"Fjern begrænsninger"</string>
<string name="restriction_menu_change_pin" msgid="740081584044302775">"Skift pinkode"</string>
diff --git a/res/values-hi/arrays.xml b/res/values-hi/arrays.xml
index fb0c86b..5ec6db2 100644
--- a/res/values-hi/arrays.xml
+++ b/res/values-hi/arrays.xml
@@ -434,7 +434,7 @@
<string-array name="show_non_rect_clip_entries">
<item msgid="993742912147090253">"बंद"</item>
<item msgid="675719912558941285">"गैर-आयताकार क्लिप क्षेत्र नीले रंग से बनाएं"</item>
- <item msgid="1064373276095698656">"परीक्षित आरेखण आदेशों को हरे रंग से हाइलाइट करें"</item>
+ <item msgid="1064373276095698656">"परीक्षित ड्रॉइंग आदेशों को हरे रंग से हाइलाइट करें"</item>
</string-array>
<string-array name="track_frame_time_entries">
<item msgid="2193584639058893150">"बंद"</item>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 7645c01..5a79730 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -1814,7 +1814,7 @@
<string name="wait_for_debugger" msgid="1202370874528893091">"डीबगर की प्रतीक्षा करें"</string>
<string name="wait_for_debugger_summary" msgid="1766918303462746804">"डीबग किया गया ऐप्स निष्पादन के पहले अनुलग्न करने हेतु डीबगर की प्रतीक्षा करता है"</string>
<string name="debug_input_category" msgid="1811069939601180246">"इनपुट"</string>
- <string name="debug_drawing_category" msgid="6755716469267367852">"आरेखण"</string>
+ <string name="debug_drawing_category" msgid="6755716469267367852">"ड्रॉइंग"</string>
<string name="debug_hw_drawing_category" msgid="6220174216912308658">"हार्डवेयर त्वरित रेंडरिंग"</string>
<string name="debug_monitoring_category" msgid="7640508148375798343">"निगरानी"</string>
<string name="strict_mode" msgid="1938795874357830695">"सख्त मोड सक्षम किया गया"</string>
@@ -1841,7 +1841,7 @@
<string name="show_cpu_usage" msgid="2389212910758076024">"CPU उपयोग दिखाएं"</string>
<string name="show_cpu_usage_summary" msgid="2113341923988958266">"स्क्रीन ओवरले वर्तमान CPU उपयोग को दिखा रहा है"</string>
<string name="force_hw_ui" msgid="6426383462520888732">"बलपूर्वक GPU रेंडर करें"</string>
- <string name="force_hw_ui_summary" msgid="5535991166074861515">"2d आरेखण के लिए GPU का बलपूर्वक उपयोग करें"</string>
+ <string name="force_hw_ui_summary" msgid="5535991166074861515">"2d ड्रॉइंग के लिए GPU का बलपूर्वक उपयोग करें"</string>
<string name="force_msaa" msgid="7920323238677284387">"4x MSAA को बाध्य करें"</string>
<string name="force_msaa_summary" msgid="9123553203895817537">"OpenGL ES 2.0 ऐप्स में 4x MSAA को सक्षम करें"</string>
<string name="show_non_rect_clip" msgid="505954950474595172">"गैर-आयताकार क्लिप परिचालनों को डीबग करें"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index feab5cb..113c91d 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -1689,7 +1689,7 @@
<string name="backup_data_title" msgid="1239105919852668016">"Hifadhi nakala ya data yangu"</string>
<string name="backup_data_summary" msgid="708773323451655666">"Hifadhi nakala ya data ya programu, manenosiri ya Wi-Fi, na mipangilio mingine kwenye seva za Google"</string>
<string name="backup_configure_account_title" msgid="3790872965773196615">"Akaunti mbadala"</string>
- <string name="backup_configure_account_default_summary" msgid="2436933224764745553">"Hakuna akaunti inayohifadhi kwa sasa data iliyochelezwa"</string>
+ <string name="backup_configure_account_default_summary" msgid="2436933224764745553">"Hakuna akaunti ambayo kwa sasa inahifadhi nakala rudufu za data"</string>
<string name="auto_restore_title" msgid="5397528966329126506">"Onyesha upya otomatiki"</string>
<string name="auto_restore_summary" msgid="4235615056371993807">"Wakati wa kusanidi upya programu, rejesha mipangilio na data ambazo zina nakala rudufu"</string>
<string name="local_backup_password_title" msgid="3860471654439418822">"Nenosiri la hifadhi rudufu ya eneo kazi"</string>
@@ -1762,7 +1762,7 @@
<string name="last_synced" msgid="4242919465367022234">"Ilisawazishwa mwisho <xliff:g id="LAST_SYNC_TIME">%1$s</xliff:g>"</string>
<string name="sync_in_progress" msgid="5151314196536070569">"Inasawazisha sasa..."</string>
<string name="settings_backup" msgid="2274732978260797031">"Mipangilio ya kuhifadhi nakala rudufu"</string>
- <string name="settings_backup_summary" msgid="7916877705938054035">"Cheleza mipangilio yangu"</string>
+ <string name="settings_backup_summary" msgid="7916877705938054035">"Hifadhi nakala za mipangilio yangu"</string>
<string name="sync_menu_sync_now" msgid="6154608350395805683">"Sawazisha sasa"</string>
<string name="sync_menu_sync_cancel" msgid="8292379009626966949">"Ghairi usawazishaji"</string>
<string name="sync_one_time_sync" msgid="6766593624598183090">"Gusa ili kusawazisha sasa<xliff:g id="LAST_SYNC_TIME">
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index b6bc7a1..0eec2b7 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -1424,8 +1424,8 @@
<string name="captioning_custom_options_title" msgid="5067500939930322405">"Özel seçenekler"</string>
<string name="captioning_background_color" msgid="9053011212948992570">"Arka plan rengi"</string>
<string name="captioning_background_opacity" msgid="6029993616419971202">"Arka plan şeffaflığı"</string>
- <string name="captioning_window_color" msgid="6902052743419717394">"Başlık penceresi rengi"</string>
- <string name="captioning_window_opacity" msgid="5041556024849862376">"Başlık penceresi opaklığı"</string>
+ <string name="captioning_window_color" msgid="6902052743419717394">"Altyazı penceresi rengi"</string>
+ <string name="captioning_window_opacity" msgid="5041556024849862376">"Altyazı penceresi opaklığı"</string>
<string name="captioning_foreground_color" msgid="85623486537640059">"Metin rengi"</string>
<string name="captioning_foreground_opacity" msgid="4370967856995419788">"Metin opaklığı"</string>
<string name="captioning_edge_color" msgid="3670094753735263238">"Kenar rengi"</string>
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java
index a92f514..9c9fab1 100644
--- a/src/com/android/settings/ChooseLockGeneric.java
+++ b/src/com/android/settings/ChooseLockGeneric.java
@@ -226,20 +226,7 @@
private int upgradeQuality(int quality, MutableBoolean allowBiometric) {
quality = upgradeQualityForDPM(quality);
quality = upgradeQualityForKeyStore(quality);
- int encryptionQuality = upgradeQualityForEncryption(quality);
- if (encryptionQuality > quality) {
- //The first case checks whether biometric is allowed, prior to the user making
- //their selection from the list
- if (allowBiometric != null) {
- allowBiometric.value = quality <=
- DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK;
- } else if (quality == DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK) {
- //When the user has selected biometric we shouldn't change that due to
- //encryption
- return quality;
- }
- }
- return encryptionQuality;
+ return quality;
}
private int upgradeQualityForDPM(int quality) {
@@ -251,27 +238,6 @@
return quality;
}
- /**
- * Mix in "encryption minimums" to any given quality value. This prevents users
- * from downgrading the pattern/pin/password to a level below the minimums.
- *
- * ASSUMPTION: Setting quality is sufficient (e.g. minimum lengths will be set
- * appropriately.)
- */
- private int upgradeQualityForEncryption(int quality) {
- // Don't upgrade quality for secondary users. Encryption requirements don't apply.
- if (!Process.myUserHandle().equals(UserHandle.OWNER)) return quality;
- int encryptionStatus = mDPM.getStorageEncryptionStatus();
- boolean encrypted = (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE)
- || (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATING);
- if (encrypted) {
- if (quality < CryptKeeperSettings.MIN_PASSWORD_QUALITY) {
- quality = CryptKeeperSettings.MIN_PASSWORD_QUALITY;
- }
- }
- return quality;
- }
-
private int upgradeQualityForKeyStore(int quality) {
if (!mKeyStore.isEmpty()) {
if (quality < CredentialStorage.MIN_PASSWORD_QUALITY) {
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java
index 23ec70e..d974d00 100644
--- a/src/com/android/settings/CryptKeeper.java
+++ b/src/com/android/settings/CryptKeeper.java
@@ -34,6 +34,7 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.storage.IMountService;
+import android.os.storage.StorageManager;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.Editable;
@@ -60,6 +61,9 @@
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
+import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.widget.LockPatternView;
+import com.android.internal.widget.LockPatternView.Cell;
import java.util.List;
@@ -113,6 +117,7 @@
private int mCooldown;
PowerManager.WakeLock mWakeLock;
private EditText mPasswordEntry;
+ private LockPatternView mLockPatternView;
/** Number of calls to {@link #notifyUser()} to ignore before notifying. */
private int mNotificationCountdown = 0;
@@ -175,7 +180,9 @@
final TextView status = (TextView) findViewById(R.id.status);
status.setText(R.string.try_again);
// Reenable the password entry
- mPasswordEntry.setEnabled(true);
+ if (mPasswordEntry != null) {
+ mPasswordEntry.setEnabled(true);
+ }
}
}
}
@@ -354,7 +361,21 @@
setContentView(R.layout.crypt_keeper_progress);
encryptionProgressInit();
} else if (mValidationComplete || isDebugView(FORCE_VIEW_PASSWORD)) {
- setContentView(R.layout.crypt_keeper_password_entry);
+ final IMountService service = getMountService();
+ int type = StorageManager.CRYPT_TYPE_PASSWORD;
+ try {
+ type = service.getPasswordType();
+ } catch (Exception e) {
+ Log.e(TAG, "Error while getting type - showing default dialog" + e);
+ }
+
+ if(type == StorageManager.CRYPT_TYPE_PIN) {
+ setContentView(R.layout.crypt_keeper_pin_entry);
+ } else if (type == StorageManager.CRYPT_TYPE_PATTERN) {
+ setContentView(R.layout.crypt_keeper_pattern_entry);
+ } else {
+ setContentView(R.layout.crypt_keeper_password_entry);
+ }
passwordEntryInit();
} else if (!mValidationRequested) {
// We're supposed to be encrypted, but no validation has been done.
@@ -503,14 +524,44 @@
}
}
- private void passwordEntryInit() {
+ protected LockPatternView.OnPatternListener mChooseNewLockPatternListener =
+ new LockPatternView.OnPatternListener() {
+
+ @Override
+ public void onPatternStart() {
+ }
+
+ @Override
+ public void onPatternCleared() {
+ }
+
+ @Override
+ public void onPatternDetected(List<LockPatternView.Cell> pattern) {
+ new DecryptTask().execute(LockPatternUtils.patternToString(pattern));
+ }
+
+ @Override
+ public void onPatternCellAdded(List<Cell> pattern) {
+ }
+ };
+
+ private void passwordEntryInit() {
+ // Password/pin case
mPasswordEntry = (EditText) findViewById(R.id.passwordEntry);
- mPasswordEntry.setOnEditorActionListener(this);
- mPasswordEntry.requestFocus();
- // Become quiet when the user interacts with the Edit text screen.
- mPasswordEntry.setOnKeyListener(this);
- mPasswordEntry.setOnTouchListener(this);
- mPasswordEntry.addTextChangedListener(this);
+ if (mPasswordEntry != null){
+ mPasswordEntry.setOnEditorActionListener(this);
+ mPasswordEntry.requestFocus();
+ // Become quiet when the user interacts with the Edit text screen.
+ mPasswordEntry.setOnKeyListener(this);
+ mPasswordEntry.setOnTouchListener(this);
+ mPasswordEntry.addTextChangedListener(this);
+ }
+
+ // Pattern case
+ mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);
+ if (mLockPatternView != null) {
+ mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);
+ }
// Disable the Emergency call button if the device has no voice telephone capability
final TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
diff --git a/src/com/android/settings/accessibility/EdgeTypePreference.java b/src/com/android/settings/accessibility/EdgeTypePreference.java
index ad71a76..3bff704 100644
--- a/src/com/android/settings/accessibility/EdgeTypePreference.java
+++ b/src/com/android/settings/accessibility/EdgeTypePreference.java
@@ -34,7 +34,7 @@
private static final int DEFAULT_FOREGROUND_COLOR = Color.WHITE;
private static final int DEFAULT_BACKGROUND_COLOR = Color.TRANSPARENT;
private static final int DEFAULT_EDGE_COLOR = Color.BLACK;
- private static final float DEFAULT_FONT_SIZE = 96f;
+ private static final float DEFAULT_FONT_SIZE = 32f;
public EdgeTypePreference(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -57,7 +57,9 @@
preview.setForegroundColor(DEFAULT_FOREGROUND_COLOR);
preview.setBackgroundColor(DEFAULT_BACKGROUND_COLOR);
- preview.setTextSize(DEFAULT_FONT_SIZE);
+
+ final float density = getContext().getResources().getDisplayMetrics().density;
+ preview.setTextSize(DEFAULT_FONT_SIZE * density);
final int value = getValueAt(index);
preview.setEdgeType(value);
diff --git a/src/com/android/settings/accessibility/PresetPreference.java b/src/com/android/settings/accessibility/PresetPreference.java
index 84aba6c..9f1aee3 100644
--- a/src/com/android/settings/accessibility/PresetPreference.java
+++ b/src/com/android/settings/accessibility/PresetPreference.java
@@ -27,7 +27,7 @@
import com.android.settings.R;
public class PresetPreference extends ListDialogPreference {
- private static final float DEFAULT_FONT_SIZE = 96f;
+ private static final float DEFAULT_FONT_SIZE = 32f;
private final CaptioningManager mCaptioningManager;
@@ -54,7 +54,8 @@
CaptionPropertiesFragment.applyCaptionProperties(
mCaptioningManager, previewText, value);
- previewText.setTextSize(DEFAULT_FONT_SIZE);
+ final float density = getContext().getResources().getDisplayMetrics().density;
+ previewText.setTextSize(DEFAULT_FONT_SIZE * density);
final CharSequence title = getTitleAt(index);
if (title != null) {
diff --git a/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java b/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
index 79dbbbd..f47fecc 100755
--- a/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
+++ b/src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
@@ -57,7 +57,7 @@
static final int DEFAULT_DISCOVERABLE_TIMEOUT = DISCOVERABLE_TIMEOUT_TWO_MINUTES;
- private final Context mContext;
+ private Context mContext;
private final Handler mUiHandler;
private final Preference mDiscoveryPreference;
// Preference for visibility time out. Not final as it needs to be set through setter.
@@ -91,9 +91,8 @@
}
};
- BluetoothDiscoverableEnabler(Context context, LocalBluetoothAdapter adapter,
+ BluetoothDiscoverableEnabler(LocalBluetoothAdapter adapter,
Preference discoveryPreference) {
- mContext = context;
mUiHandler = new Handler();
mLocalAdapter = adapter;
mDiscoveryPreference = discoveryPreference;
@@ -105,11 +104,15 @@
mVisibilityTimeoutPreference = visibilityPreference;
}
- public void resume() {
+ public void resume(Context context) {
if (mLocalAdapter == null) {
return;
}
+ if (mContext != context) {
+ mContext = context;
+ }
+
IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);
mContext.registerReceiver(mReceiver, filter);
mDiscoveryPreference.setOnPreferenceClickListener(this);
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 14c6054..68cf37a 100755
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -156,7 +156,7 @@
super.onResume();
if (mDiscoverableEnabler != null) {
- mDiscoverableEnabler.resume();
+ mDiscoverableEnabler.resume(getActivity());
}
getActivity().registerReceiver(mReceiver, mIntentFilter);
if (mLocalAdapter != null) {
@@ -262,9 +262,9 @@
if (!isRestrictedAndNotPinProtected()) {
if (mDiscoverableEnabler == null) {
- mDiscoverableEnabler = new BluetoothDiscoverableEnabler(getActivity(),
- mLocalAdapter, mMyDevicePreference);
- mDiscoverableEnabler.resume();
+ mDiscoverableEnabler = new BluetoothDiscoverableEnabler(mLocalAdapter,
+ mMyDevicePreference);
+ mDiscoverableEnabler.resume(getActivity());
LocalBluetoothManager.getInstance(getActivity()).setDiscoverableEnabler(
mDiscoverableEnabler);
}
diff --git a/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java b/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java
index 8d71007..ed27697 100644
--- a/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java
+++ b/src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java
@@ -82,7 +82,7 @@
super.onResume();
mManager.setForegroundActivity(getActivity());
mAdvertisingEnabler.resume();
- mDiscoverableEnabler.resume();
+ mDiscoverableEnabler.resume(getActivity());
}
@Override
diff --git a/src/com/android/settings/print/PrintServiceSettingsFragment.java b/src/com/android/settings/print/PrintServiceSettingsFragment.java
index 357183f..d5bfce2 100644
--- a/src/com/android/settings/print/PrintServiceSettingsFragment.java
+++ b/src/com/android/settings/print/PrintServiceSettingsFragment.java
@@ -328,14 +328,6 @@
final boolean enabled = arguments.getBoolean(PrintSettingsFragment.EXTRA_CHECKED);
mToggleSwitch.setCheckedInternal(enabled);
- // Title.
- SettingsActivity activity = (SettingsActivity) getActivity();
- if (!activity.onIsHidingHeaders()) {
- mOldActivityTitle = getActivity().getTitle();
- String title = arguments.getString(PrintSettingsFragment.EXTRA_TITLE);
- getActivity().getActionBar().setTitle(title);
- }
-
// Settings title and intent.
String settingsTitle = arguments.getString(PrintSettingsFragment.EXTRA_SETTINGS_TITLE);
String settingsComponentName = arguments.getString(