Skip to content

Commit da30bb6

Browse files
committed
Fixup derps
Signed-off-by: W4TCH0UT <[email protected]>
1 parent 5a6675e commit da30bb6

File tree

2 files changed

+4
-83
lines changed

2 files changed

+4
-83
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,13 +1141,6 @@ protected PhoneStatusBarView makeStatusBarView() {
11411141

11421142
mStatusBarWindowContent = (FrameLayout) View.inflate(context,
11431143
R.layout.super_status_bar, null);
1144-
if (isMSim()) {
1145-
mStatusBarWindowContent = (FrameLayout) View.inflate(context,
1146-
R.layout.msim_super_status_bar, null);
1147-
} else {
1148-
mStatusBarWindowContent = (FrameLayout) View.inflate(context,
1149-
R.layout.super_status_bar, null);
1150-
}
11511144

11521145
mStatusBarWindowContent.setOnTouchListener(new View.OnTouchListener() {
11531146
@Override

packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java

Lines changed: 4 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,8 @@ public class Clock implements DemoMode {
9696
private int mClockFontStyle = FONT_NORMAL;
9797
private boolean mDemoMode;
9898
private boolean mAttached;
99-
protected int mClockDateDisplay = CLOCK_DATE_DISPLAY_GONE;
100-
protected int mClockDateStyle = CLOCK_DATE_STYLE_REGULAR;
101-
protected int mClockStyle = STYLE_CLOCK_RIGHT;
102-
protected int mClockFontStyle = FONT_NORMAL;
103-
protected boolean mShowClock;
104-
private int mClockAndDateWidth;
10599
protected boolean mShowClockSeconds = false;
106100

107-
private int mAmPmStyle;
108-
109-
private SettingsObserver mSettingsObserver;
110-
private PhoneStatusBar mStatusBar;
111-
112101
class SettingsObserver extends UserContentObserver {
113102
SettingsObserver(Handler handler) {
114103
super(handler);
@@ -134,50 +123,13 @@ protected void observe() {
134123
resolver.registerContentObserver(Settings.System.getUriFor(
135124
Settings.System.STATUSBAR_CLOCK_FONT_STYLE), false, this, UserHandle.USER_ALL);
136125
resolver.registerContentObserver(Settings.System
137-
.getUriFor(Settings.System.STATUS_BAR_CLOCK),
138-
false, this, UserHandle.USER_ALL);
139-
resolver.registerContentObserver(Settings.System
140-
.getUriFor(Settings.System.STATUSBAR_CLOCK_AM_PM_STYLE),
141-
false, this, UserHandle.USER_ALL);
142-
resolver.registerContentObserver(Settings.System
143-
.getUriFor(Settings.System.STATUSBAR_CLOCK_STYLE), false,
144-
this, UserHandle.USER_ALL);
145-
resolver.registerContentObserver(Settings.System
146-
.getUriFor(Settings.System.STATUSBAR_CLOCK_COLOR), false,
147-
this, UserHandle.USER_ALL);
148-
resolver.registerContentObserver(Settings.System
149-
.getUriFor(Settings.System.STATUSBAR_CLOCK_DATE_DISPLAY), false,
150-
this, UserHandle.USER_ALL);
151-
resolver.registerContentObserver(Settings.System
152-
.getUriFor(Settings.System.STATUSBAR_CLOCK_DATE_STYLE), false,
153-
this, UserHandle.USER_ALL);
154-
resolver.registerContentObserver(Settings.System
155-
.getUriFor(Settings.System.STATUSBAR_CLOCK_DATE_FORMAT), false,
156-
this, UserHandle.USER_ALL);
157-
resolver.registerContentObserver(Settings.System
158-
.getUriFor(Settings.System.STATUSBAR_CLOCK_FONT_STYLE), false,
159-
mSettingsObserver);
160-
resolver.registerContentObserver(Settings.System
161-
.getUriFor(Settings.System.CLOCK_USE_SECOND), false,
162-
mSettingsObserver);
126+
.getUriFor(Settings.System.CLOCK_USE_SECOND), false, this, UserHandle.USER_ALL);
163127
updateSettings();
164128
}
165129

166130
@Override
167131
protected void unobserve() {
168132
super.unobserve();
169-
public void onChange(boolean selfChange) {
170-
updateSettings();
171-
}
172-
}
173-
174-
private final Handler handler = new Handler();
175-
TimerTask second;
176-
177-
public Clock(Context context) {
178-
this(context, null);
179-
}
180-
181133
mContext.getContentResolver().unregisterContentObserver(this);
182134
}
183135

@@ -187,6 +139,9 @@ public void update() {
187139
}
188140
}
189141

142+
private final Handler handler = new Handler();
143+
TimerTask second;
144+
190145
public Clock(Context context, TextView v) {
191146
mContext = context;
192147
mClockView = v;
@@ -301,11 +256,6 @@ private final CharSequence getSmallTime() {
301256
result = String.format("%s:%02d", temp, new GregorianCalendar().get(Calendar.SECOND));
302257
}
303258

304-
if (mClockDateDisplay != CLOCK_DATE_DISPLAY_GONE) {
305-
Date now = new Date();
306-
307-
String clockDateFormat = Settings.System.getString(getContext().getContentResolver(),
308-
Settings.System.STATUSBAR_CLOCK_DATE_FORMAT);
309259
if (clockDateFormat == null || clockDateFormat.isEmpty()) {
310260
// Set dateString to short uppercase Weekday (Default for AOKP) if empty
311261
dateString = DateFormat.format("EEE", now) + " ";
@@ -442,8 +392,6 @@ void updateSettings() {
442392
Settings.System.STATUS_BAR_DATE_STYLE, CLOCK_DATE_STYLE_REGULAR,
443393
UserHandle.USER_CURRENT));
444394
updateClock();
445-
mClockFontStyle = Settings.System.getInt(resolver,
446-
Settings.System.STATUSBAR_CLOCK_FONT_STYLE, FONT_NORMAL);
447395

448396
mShowClockSeconds = Settings.System.getIntForUser(resolver,
449397
Settings.System.CLOCK_USE_SECOND, 0,
@@ -466,26 +414,6 @@ public void run() {
466414
Timer timer = new Timer();
467415
timer.schedule(second, 0, 1001);
468416
}
469-
470-
if (mAttached) {
471-
setTextColor(clockColor);
472-
getFontStyle(mClockFontStyle);
473-
updateClockVisibility();
474-
updateClock();
475-
}
476-
477-
if (mStatusBar != null) {
478-
mStatusBar.setClockAndDateStatus(mClockAndDateWidth, mClockStyle, mShowClock);
479-
}
480-
481-
}
482-
483-
protected void updateClockVisibility() {
484-
if (mClockStyle == STYLE_CLOCK_RIGHT && mShowClock) {
485-
setVisibility(View.VISIBLE);
486-
} else {
487-
setVisibility(View.GONE);
488-
}
489417
}
490418

491419
public void getFontStyle(int font) {

0 commit comments

Comments
 (0)