Skip to content

Commit

Permalink
CHANGELOG: Fix Seconds for Statusbar Clock on latest OOS updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DHD2280 committed Jun 18, 2024
1 parent b8ab5ec commit 9707637
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import static de.robv.android.xposed.XposedHelpers.findClass;
import static de.robv.android.xposed.XposedHelpers.getBooleanField;
import static de.robv.android.xposed.XposedHelpers.getObjectField;
import static de.robv.android.xposed.XposedHelpers.setBooleanField;
import static de.robv.android.xposed.XposedHelpers.setObjectField;
import static it.dhd.oxygencustomizer.utils.Constants.Packages.SYSTEM_UI;
import static it.dhd.oxygencustomizer.xposed.XPrefs.Xprefs;
Expand Down Expand Up @@ -473,7 +474,13 @@ private void updateClock() {
try {
mClockView.post(() -> { //the builtin update method doesn't care about the format. Just the text sadly
callMethod(getObjectField(mClockView, "mCalendar"), "setTimeInMillis", System.currentTimeMillis());

if (mShowSeconds) {
try {
setBooleanField(mClockView, "mShowSeconds", true);
callMethod(mClockView, "updateShowSeconds");
} catch (Throwable ignored) {
}
}
callMethod(mClockView, "updateClock");
});
}
Expand Down

0 comments on commit 9707637

Please sign in to comment.