Hide OTP Cards on Screen-Off for Device Credentials authentication

This commit is contained in:
Martin Betcher 2019-10-02 21:42:09 +02:00
parent 149e7f1a7d
commit d289bcbe06

View file

@ -329,12 +329,20 @@ public class MainActivity extends BaseActivity
// ensure the current filter string is applied after a resume
setFilterString(this.filterString);
}
if(settings.getAuthMethod() == AuthMethod.DEVICE)
findViewById(R.id.cardList).setVisibility(View.VISIBLE);
startUpdater();
}
@Override
public void onPause() {
if(settings.getAuthMethod() == AuthMethod.DEVICE)
runOnUiThread(new Runnable() {
@Override
public void run() {
findViewById(R.id.cardList).setVisibility(View.INVISIBLE);
}
});
super.onPause();
stopUpdater();
}