1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-04 06:20:26 +00:00

Workaround Android Q bug

This commit is contained in:
M66B 2020-06-13 21:29:39 +02:00
parent 865562ffd9
commit f2fdeacc07

View file

@ -531,6 +531,16 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
return false;
}
@Override
public boolean shouldUpRecreateTask(Intent targetIntent) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q + 1) {
ComponentName cn = targetIntent.getComponent();
if (cn != null && BuildConfig.APPLICATION_ID.equals(cn.getPackageName()))
return false;
}
return super.shouldUpRecreateTask(targetIntent);
}
public interface IKeyPressedListener {
boolean onKeyPressed(KeyEvent event);