mirror of
https://github.com/etesync/android
synced 2025-04-05 09:15:45 +00:00
Account settings: restart loader after sync interval update
* debug info: add signature
This commit is contained in:
parent
4920bc0c81
commit
c83b28c3bb
@ -121,6 +121,7 @@ public class AccountSettingsActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
settings.setSyncInterval(ContactsContract.AUTHORITY, Long.parseLong((String)newValue));
|
||||
getLoaderManager().restartLoader(0, getArguments(), AccountSettingsFragment.this);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -141,6 +142,7 @@ public class AccountSettingsActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
settings.setSyncInterval(CalendarContract.AUTHORITY, Long.parseLong((String)newValue));
|
||||
getLoaderManager().restartLoader(0, getArguments(), AccountSettingsFragment.this);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -198,7 +200,6 @@ public class AccountSettingsActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onStartLoading() {
|
||||
forceLoad();
|
||||
|
||||
listenerHandle = ContentResolver.addStatusChangeListener(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS, this);
|
||||
}
|
||||
|
||||
@ -207,6 +208,11 @@ public class AccountSettingsActivity extends AppCompatActivity {
|
||||
ContentResolver.removeStatusChangeListener(listenerHandle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void abandon() {
|
||||
onStopLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountSettings loadInBackground() {
|
||||
AccountSettings settings;
|
||||
@ -220,6 +226,7 @@ public class AccountSettingsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(int which) {
|
||||
App.log.fine("Reloading account settings");
|
||||
forceLoad();
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
phase = extras.getString(KEY_PHASE, null);
|
||||
}
|
||||
|
||||
StringBuilder report = new StringBuilder();
|
||||
StringBuilder report = new StringBuilder("--- BEGIN DEBUG INFO ---\n");
|
||||
|
||||
// begin with most specific information
|
||||
|
||||
@ -209,7 +209,7 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
installedFrom = "APK (directly)";
|
||||
boolean workaroundInstalled = false;
|
||||
try {
|
||||
workaroundInstalled = pm.getPackageInfo("com.etesync.syncadapter.jbworkaround", 0) != null;
|
||||
workaroundInstalled = pm.getPackageInfo(BuildConfig.APPLICATION_ID + ".jbworkaround", 0) != null;
|
||||
} catch(PackageManager.NameNotFoundException ignored) {}
|
||||
report.append("\nSOFTWARE INFORMATION\n" +
|
||||
"EteSync version: ").append(BuildConfig.VERSION_NAME).append(" (").append(BuildConfig.VERSION_CODE).append(") ").append(new Date(BuildConfig.buildTime)).append("\n")
|
||||
@ -266,6 +266,7 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage
|
||||
App.log.log(Level.SEVERE, "Couldn't get system details", ex);
|
||||
}
|
||||
|
||||
report.append("--- END DEBUG INFO ---\n");
|
||||
return report.toString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user