Colors.setupTheme(this, mThemeHue);
if (themeSetUp) {
- Logger.debug(TAG, "setupProfileColors(): theme already set up, recreating activity");
- this.recreate();
+ Logger.debug(TAG,
+ "setupProfileColors(): theme already set up, supposedly the activity will be " +
+ "recreated");
+// this.recreate();
+ return;
}
themeSetUp = true;
}
mProfile = profile;
+ storeProfilePref(profile);
int hue = profile.getTheme();
if (hue != mThemeHue) {
- storeProfilePref(profile);
+ Logger.debug(TAG,
+ String.format(Locale.US, "profile observer calling setupProfileColors(%d)",
+ hue));
setupProfileColors(hue);
}
});
if (profileId == -1)
mThemeHue = Colors.DEFAULT_HUE_DEG;
+ Logger.debug(TAG,
+ String.format(Locale.US, "initProfile() calling setupProfileColors(%d)", hue));
setupProfileColors(hue);
initProfile(profileId);
BaseDAO.runAsync(() -> initProfileSync(profileId));
}
private void initProfileSync(long profileId) {
+ Logger.debug(TAG, String.format(Locale.US, "Loading profile %d", profileId));
ProfileDAO dao = DB.get()
.getProfileDAO();
Profile profile = dao.getByIdSync(profileId);