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

Commit 3e378b22 authored by ctso's avatar ctso
Browse files

Merge branch 'eclair' of git://github.com/ctso/android_frameworks_base into eclair

parents c33877fd 73af73ba
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1418,6 +1418,10 @@ public final class Settings {
         */
         */
        public static final String CLEAR_BUTTON_LABEL_COLOR = "clearbutton_color";
        public static final String CLEAR_BUTTON_LABEL_COLOR = "clearbutton_color";
        
        
        public static final String NOTIF_ITEM_TITLE_COLOR = "notifications_title_color";
        public static final String NOTIF_ITEM_TEXT_COLOR = "notifications_text_color";
        public static final String NOTIF_ITEM_TIME_COLOR = "notifications_time_color";
        
        /**
        /**
         * Wysie_Soh
         * Wysie_Soh
         * Specifies notification item title color.
         * Specifies notification item title color.
+23 −3
Original line number Original line Diff line number Diff line
@@ -224,6 +224,10 @@ public class StatusBarService extends IStatusBar.Stub
    int mViewDelta;
    int mViewDelta;
    int[] mAbsPos = new int[2];
    int[] mAbsPos = new int[2];
    private int blackColor = 0xff000000;
    private int blackColor = 0xff000000;
    private int whiteColor = 0xffffffff;
    private int notificationTitleColor = blackColor;
    private int notificationTextColor = blackColor;
    private int notificationTimeColor = blackColor;
    
    
    // for disabling the status bar
    // for disabling the status bar
    ArrayList<DisableRecord> mDisableRecords = new ArrayList<DisableRecord>();
    ArrayList<DisableRecord> mDisableRecords = new ArrayList<DisableRecord>();
@@ -234,6 +238,9 @@ public class StatusBarService extends IStatusBar.Stub
     */
     */
    public StatusBarService(Context context) {
    public StatusBarService(Context context) {
        mContext = context;
        mContext = context;
        notificationTitleColor = Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIF_ITEM_TITLE_COLOR, blackColor);
        notificationTextColor = Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIF_ITEM_TEXT_COLOR, blackColor);
        notificationTimeColor = Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIF_ITEM_TIME_COLOR, blackColor);
        mDisplay = ((WindowManager)context.getSystemService(
        mDisplay = ((WindowManager)context.getSystemService(
                Context.WINDOW_SERVICE)).getDefaultDisplay();
                Context.WINDOW_SERVICE)).getDefaultDisplay();
        makeStatusBarView(context);
        makeStatusBarView(context);
@@ -856,6 +863,19 @@ public class StatusBarService extends IStatusBar.Stub
            Log.e(TAG, "couldn't inflate view for package " + n.pkg, exception);
            Log.e(TAG, "couldn't inflate view for package " + n.pkg, exception);
            return null;
            return null;
        }
        }
        
        //Try-catch cause it does not work with QuickSettings, possibly other apps too :( (Won't work thru XML as well)
        try {
            TextView tv1 = (TextView) child.findViewById(com.android.internal.R.id.title);
            TextView tv2 = (TextView) child.findViewById(com.android.internal.R.id.text);
            TextView tv3 = (TextView) child.findViewById(com.android.internal.R.id.time);
            tv1.setTextColor(notificationTitleColor);
            tv2.setTextColor(notificationTextColor);
            tv3.setTextColor(notificationTimeColor);
        }
        catch (Exception e) {
        }
        
        content.addView(child);
        content.addView(child);


        row.setDrawingCacheEnabled(true);
        row.setDrawingCacheEnabled(true);
@@ -1707,9 +1727,9 @@ public class StatusBarService extends IStatusBar.Stub
    
    
    private void updateColors() {
    private void updateColors() {
        mDateView.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.DATE_COLOR, blackColor));
        mDateView.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.DATE_COLOR, blackColor));
        mNoNotificationsTitle.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.NO_NOTIF_COLOR, blackColor));
        mNoNotificationsTitle.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.NO_NOTIF_COLOR, whiteColor));
        mLatestTitle.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.LATEST_NOTIF_COLOR, blackColor));
        mLatestTitle.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.LATEST_NOTIF_COLOR, whiteColor));
        mOngoingTitle.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.ONGOING_NOTIF_COLOR, blackColor));
        mOngoingTitle.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.ONGOING_NOTIF_COLOR, whiteColor));
        mSpnLabel.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.SPN_LABEL_COLOR, blackColor));
        mSpnLabel.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.SPN_LABEL_COLOR, blackColor));
        mPlmnLabel.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.PLMN_LABEL_COLOR, blackColor));
        mPlmnLabel.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.PLMN_LABEL_COLOR, blackColor));
        mClearButton.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.CLEAR_BUTTON_LABEL_COLOR, blackColor));
        mClearButton.setTextColor(Settings.System.getInt(mContext.getContentResolver(), Settings.System.CLEAR_BUTTON_LABEL_COLOR, blackColor));