mirror of https://github.com/M66B/FairEmail.git
Android 14: fixed PGP
This commit is contained in:
parent
21c71ffcc8
commit
d508aefbfc
|
@ -718,7 +718,8 @@ public class FragmentBase extends Fragment {
|
|||
startIntentSenderForResult(
|
||||
ex.getUserAction().getActionIntent().getIntentSender(),
|
||||
REQUEST_RECOVERABLE_PERMISSION,
|
||||
null, 0, 0, 0, null);
|
||||
null, 0, 0, 0,
|
||||
Helper.getBackgroundActivityOptions());
|
||||
} catch (IntentSender.SendIntentException ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import static android.view.inputmethod.EditorInfo.IME_FLAG_NO_FULLSCREEN;
|
|||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityOptions;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
|
@ -4098,9 +4099,9 @@ public class FragmentCompose extends FragmentBase {
|
|||
startIntentSenderForResult(
|
||||
pi.getIntentSender(),
|
||||
REQUEST_OPENPGP,
|
||||
null, 0, 0, 0, null);
|
||||
null, 0, 0, 0,
|
||||
Helper.getBackgroundActivityOptions());
|
||||
} catch (IntentSender.SendIntentException ex) {
|
||||
Log.e(ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -8885,7 +8885,8 @@ public class FragmentMessages extends FragmentBase
|
|||
startIntentSenderForResult(
|
||||
pi.getIntentSender(),
|
||||
REQUEST_OPENPGP,
|
||||
null, 0, 0, 0, null);
|
||||
null, 0, 0, 0,
|
||||
Helper.getBackgroundActivityOptions());
|
||||
} catch (IntentSender.SendIntentException ex) {
|
||||
// Likely cancelled
|
||||
Log.w(ex);
|
||||
|
|
|
@ -30,6 +30,7 @@ import android.animation.ObjectAnimator;
|
|||
import android.animation.ValueAnimator;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityOptions;
|
||||
import android.app.ApplicationExitInfo;
|
||||
import android.app.KeyguardManager;
|
||||
import android.app.NotificationManager;
|
||||
|
@ -1769,6 +1770,14 @@ public class Helper {
|
|||
}
|
||||
}
|
||||
|
||||
static Bundle getBackgroundActivityOptions() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||
return null;
|
||||
ActivityOptions options = ActivityOptions.makeBasic();
|
||||
options.setPendingIntentBackgroundActivityLaunchAllowed(true);
|
||||
return options.toBundle();
|
||||
}
|
||||
|
||||
// Graphics
|
||||
|
||||
static int dp2pixels(Context context, int dp) {
|
||||
|
|
Loading…
Reference in New Issue