|
|
@ -37,9 +37,14 @@ import androidx.lifecycle.LifecycleOwner;
|
|
|
|
import androidx.lifecycle.OnLifecycleEvent;
|
|
|
|
import androidx.lifecycle.OnLifecycleEvent;
|
|
|
|
import androidx.preference.PreferenceManager;
|
|
|
|
import androidx.preference.PreferenceManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.bugsnag.android.BreadcrumbType;
|
|
|
|
|
|
|
|
import com.bugsnag.android.Bugsnag;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
|
|
|
|
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
|
|
|
|
private boolean contacts;
|
|
|
|
private boolean contacts;
|
|
|
@ -80,6 +85,13 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|
|
|
super.onSaveInstanceState(outState);
|
|
|
|
super.onSaveInstanceState(outState);
|
|
|
|
int after = Helper.getSize(outState);
|
|
|
|
int after = Helper.getSize(outState);
|
|
|
|
Log.i("Saved instance " + this + " size=" + before + "/" + after);
|
|
|
|
Log.i("Saved instance " + this + " size=" + before + "/" + after);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, String> crumb = new HashMap<>();
|
|
|
|
|
|
|
|
crumb.put("name", this.getClass().getName());
|
|
|
|
|
|
|
|
crumb.put("before", Integer.toString(before));
|
|
|
|
|
|
|
|
crumb.put("after", Integer.toString(after));
|
|
|
|
|
|
|
|
Bugsnag.leaveBreadcrumb("onSaveInstanceState", BreadcrumbType.STATE, crumb);
|
|
|
|
|
|
|
|
|
|
|
|
for (String key : outState.keySet())
|
|
|
|
for (String key : outState.keySet())
|
|
|
|
Log.i("Saved " + this + " " + key + "=" + outState.get(key));
|
|
|
|
Log.i("Saved " + this + " " + key + "=" + outState.get(key));
|
|
|
|
}
|
|
|
|
}
|
|
|
|