Work on settings startup speed

- Cut down on amount stored in conditions xml
 - Remove extra work from dashboard startup
 - Move summary to min priority

Change-Id: I51ca3828e4446632d6faa60dcfbab3446d19d335
Fixes: 28134360
This commit is contained in:
Jason Monk
2016-04-12 11:35:02 -04:00
parent f8b2180b96
commit 5673ced93c
5 changed files with 58 additions and 31 deletions

View File

@@ -35,7 +35,8 @@ public abstract class Condition {
private boolean mIsActive;
private long mLastStateChange;
public Condition(ConditionManager manager) {
// All conditions must live in this package.
Condition(ConditionManager manager) {
mManager = manager;
}
@@ -45,10 +46,15 @@ public abstract class Condition {
mLastStateChange = bundle.getLong(KEY_LAST_STATE);
}
void saveState(PersistableBundle bundle) {
bundle.putBoolean(KEY_SILENCE, mIsSilenced);
bundle.putBoolean(KEY_ACTIVE, mIsActive);
bundle.putLong(KEY_LAST_STATE, mLastStateChange);
boolean saveState(PersistableBundle bundle) {
if (mIsSilenced) {
bundle.putBoolean(KEY_SILENCE, mIsSilenced);
}
if (mIsActive) {
bundle.putBoolean(KEY_ACTIVE, mIsActive);
bundle.putLong(KEY_LAST_STATE, mLastStateChange);
}
return mIsSilenced || mIsActive;
}
protected void notifyChanged() {