MCPcopy Create free account
hub / github.com/M66B/FairEmail / onResume

Method onResume

app/src/main/java/eu/faircode/email/ActivityBase.java:507–528  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

505 }
506
507 @Override
508 protected void onResume() {
509 Log.d("Resume " + this.getClass().getName());
510 super.onResume();
511
512 visible = true;
513
514 if (!(this instanceof ActivityMain)) {
515 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
516 prefs.edit().putString("last_activity", this.getClass().getName()).apply();
517 }
518
519 boolean contacts = hasPermission(Manifest.permission.READ_CONTACTS);
520 if (this.contacts != contacts &&
521 !this.getClass().equals(ActivitySetup.class) &&
522 !this.getClass().equals(ActivityCompose.class)) {
523 Log.i("Contacts permission=" + contacts);
524 finish();
525 startActivity(getIntent());
526 } else
527 checkAuthentication(true);
528 }
529
530 @Override
531 protected void onPause() {

Callers

nothing calls this directly

Calls 10

dMethod · 0.95
hasPermissionMethod · 0.95
iMethod · 0.95
startActivityMethod · 0.95
checkAuthenticationMethod · 0.95
getNameMethod · 0.65
finishMethod · 0.65
applyMethod · 0.45
equalsMethod · 0.45
getIntentMethod · 0.45

Tested by

no test coverage detected