Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e06fa09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "ConfirmationPrompt: Use default values for UIOptions"

parents 15cc12cc 4ff09641
Loading
Loading
Loading
Loading
+10 −14
Original line number Diff line number Diff line
@@ -212,21 +212,17 @@ public class ConfirmationPrompt {

    private int getUiOptionsAsFlags() {
        int uiOptionsAsFlags = 0;
        try {
        ContentResolver contentResolver = mContext.getContentResolver();
        int inversionEnabled = Settings.Secure.getInt(contentResolver,
                    Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED);
                Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, 0);
        if (inversionEnabled == 1) {
            uiOptionsAsFlags |= UI_OPTION_ACCESSIBILITY_INVERTED_FLAG;
        }
        float fontScale = Settings.System.getFloat(contentResolver,
                    Settings.System.FONT_SCALE);
                Settings.System.FONT_SCALE, (float) 1.0);
        if (fontScale > 1.0) {
            uiOptionsAsFlags |= UI_OPTION_ACCESSIBILITY_MAGNIFIED_FLAG;
        }
        } catch (SettingNotFoundException e) {
            Log.w(TAG, "Unexpected SettingNotFoundException");
        }
        return uiOptionsAsFlags;
    }