Switch the place where we check for timeout

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-08-07 12:41:12 +02:00
parent 63db659079
commit ef7cf64c02

View File

@ -64,11 +64,6 @@ public class BaseActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);
super.onCreate(savedInstanceState);
if (appPreferences.getIsScreenLocked()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
SecurityUtils.createKey(appPreferences.getScreenLockTimeout());
}
}
}
@Override
@ -79,6 +74,12 @@ public class BaseActivity extends AppCompatActivity {
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
}
if (appPreferences.getIsScreenLocked()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
SecurityUtils.createKey(appPreferences.getScreenLockTimeout());
}
}
}
public void showCertificateDialog(X509Certificate cert, MagicTrustManager magicTrustManager,