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

Commit 4742dba6 authored by Wysie's avatar Wysie
Browse files

Fixed some code for the hidden SPN/PLMN, as well as added code to allow...

Fixed some code for the hidden SPN/PLMN, as well as added code to allow notification count colour to be changeable.
parent 0a211127
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1393,6 +1393,13 @@ public final class Settings {
         */
        public static final String CLOCK_COLOR = "clock_color";
        
        /**
         * Wysie_Soh
         * Specifies notification count color
         * @hide
         */
        public static final String NOTIF_COUNT_COLOR = "notif_count_color";
        
        /**
         * Wysie_Soh
         * Specifies the date color
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ class StatusBarIcon {
    private TextView mNumberView;
    private int clockColor = 0xff000000;
    private int batteryPercentColor = 0xffffffff;
    private int notifCountColor = 0xffffffff;
    private Context mContext;

    public StatusBarIcon(Context context, IconData data, ViewGroup parent) {
@@ -88,6 +89,9 @@ class StatusBarIcon {
                mNumberView = nv;
                if (data.number > 0) {
                    nv.setText("" + data.number);
                    notifCountColor = Settings.System.getInt(mContext.getContentResolver(),
                                        Settings.System.NOTIF_COUNT_COLOR, notifCountColor);
                    nv.setTextColor(notifCountColor);                    
                    nv.setVisibility(View.VISIBLE);
                } else {
                    nv.setVisibility(View.GONE);
+2 −2
Original line number Diff line number Diff line
@@ -1790,8 +1790,8 @@ public class StatusBarService extends IStatusBar.Stub

    void updateNetworkName(boolean showSpn, String spn, boolean showPlmn, String plmn) {
// Double carrier
        mShowPlmnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_PLMN_SB, 0) == 1);
        mShowSpnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_SPN_SB, 0) == 1);
        mShowPlmnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_PLMN_SB, 1) == 1);
        mShowSpnSb = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SHOW_SPN_SB, 1) == 1);
        if (false) {
            Log.d(TAG, "updateNetworkName showSpn=" + showSpn + " spn=" + spn
                    + " ShowPlmn=" + showPlmn + " plmn=" + plmn);