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

Commit d39e76b3 authored by Pedlar's avatar Pedlar
Browse files

Disable signal strength icon if dBm is enabled.

Added for Scepterr.
parent e85da235
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@
    <string name="title_show_dbm">Show dBm</string>
    <string name="summary_on_show_dbm">Signal strength in dBm displayed in the status bar</string>
    <string name="summary_off_show_dbm">Signal strength in dBm displayed in the status bar</string>
    <string name="title_hide_signal_dbm">Hide signal strength</string>
    <string name="summary_on_hide_signal_dbm">Signal strength icon is disabled only dBm will show</string>
    <string name="summary_off_hide_signal_dbm">Signal strength icon is enabled</string>
    <string name="title_dbm_color">dBm color</string>

    <!-- Date and Provider -->
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@
         android:key="show_status_dbm"
         android:title="@string/title_show_dbm"
         android:disableDependentsState="false" />
      <CheckBoxPreference
         android:key="hide_signal_dbm"
         android:title="@string/title_hide_signal_dbm"
         android:dependency="show_status_dbm" />
      <Preference android:key="dbm_color"
         android:title="@string/title_dbm_color"
         android:defaultValue="-16777216"
+13 −0
Original line number Diff line number Diff line
@@ -30,6 +30,9 @@ public class StatusBarActivity extends PreferenceActivity {
    /* Display dBm Signal */
    private static final String UI_SHOW_STATUS_DBM = "show_status_dbm";
    private CheckBoxPreference mShowDbmPref;
    /* Hide Signal Strength */
    private static final String UI_HIDE_SIGNAL = "hide_signal_dbm";
    private CheckBoxPreference mHideSignalPref;
    /* dBm Font Color */
    private static final String UI_DBM_COLOR = "dbm_color";
    private Preference mDbmColorPref;
@@ -62,6 +65,11 @@ public class StatusBarActivity extends PreferenceActivity {
        mShowDbmPref = (CheckBoxPreference) prefSet.findPreference(UI_SHOW_STATUS_DBM);
        mShowDbmPref.setChecked(Settings.System.getInt(getContentResolver(),
                Settings.System.SHOW_STATUS_DBM, 0) != 0);
        /* Hide signal */
        mHideSignalPref = (CheckBoxPreference) prefSet.findPreference(UI_HIDE_SIGNAL);
        mHideSignalPref.setChecked(Settings.System.getInt(getContentResolver(),
                Settings.System.SHOW_STATUS_HIDE_SIGNAL, 0) != 0);

        /* dBm Signal Color */
        mDbmColorPref = prefSet.findPreference(UI_DBM_COLOR);
    }
@@ -100,6 +108,11 @@ public class StatusBarActivity extends PreferenceActivity {
            Settings.System.putInt(getContentResolver(),
                    Settings.System.SHOW_STATUS_DBM, value ? 1 : 0);
        }
        else if (preference == mHideSignalPref) {
            value = mHideSignalPref.isChecked();
            Settings.System.putInt(getContentResolver(),
                    Settings.System.SHOW_STATUS_HIDE_SIGNAL, value ? 1 : 0);
        }
        /* dBm Signal Font Color */
        else if (preference == mDbmColorPref) {
            showColorPicker(mDbmColorHandler);