Fix issue #4976176: Font size setting does not persist
Change-Id: Ie36c97680f43414b5cdc1615519527ba5e8fa902
This commit is contained in:
@@ -295,7 +295,7 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
|
|||||||
try {
|
try {
|
||||||
mCurConfig.fontScale = mToggleLargeTextCheckBox.isChecked()
|
mCurConfig.fontScale = mToggleLargeTextCheckBox.isChecked()
|
||||||
? LARGE_FONT_SCALE : 1;
|
? LARGE_FONT_SCALE : 1;
|
||||||
ActivityManagerNative.getDefault().updateConfiguration(mCurConfig);
|
ActivityManagerNative.getDefault().updatePersistentConfiguration(mCurConfig);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
}
|
}
|
||||||
} else if (POWER_BUTTON_ENDS_CALL_CHECKBOX.equals(key)) {
|
} else if (POWER_BUTTON_ENDS_CALL_CHECKBOX.equals(key)) {
|
||||||
|
@@ -105,7 +105,7 @@ public class Display extends Activity implements View.OnClickListener {
|
|||||||
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
try {
|
try {
|
||||||
ActivityManagerNative.getDefault().updateConfiguration(mCurConfig);
|
ActivityManagerNative.getDefault().updatePersistentConfiguration(mCurConfig);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
}
|
}
|
||||||
finish();
|
finish();
|
||||||
|
@@ -203,7 +203,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
|
|||||||
public void writeFontSizePreference(Object objValue) {
|
public void writeFontSizePreference(Object objValue) {
|
||||||
try {
|
try {
|
||||||
mCurConfig.fontScale = Float.parseFloat(objValue.toString());
|
mCurConfig.fontScale = Float.parseFloat(objValue.toString());
|
||||||
ActivityManagerNative.getDefault().updateConfiguration(mCurConfig);
|
ActivityManagerNative.getDefault().updatePersistentConfiguration(mCurConfig);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "Unable to save font size");
|
Log.w(TAG, "Unable to save font size");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user