fix(android): set pending intent flag to stop insta-crash
fix(android): add conditional check for minimum sdk version
fix(android): formatting
fix(android): formatting
fix(android): formatting
fix(android): formatting again
(cherry picked from commit ce7f648694
)
This commit is contained in:
parent
627ddd412e
commit
23c1eae8b6
|
@ -685,8 +685,14 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
|||
Intent notifierIntent = new Intent(activity, activity.getClass());
|
||||
notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(activity, 0,
|
||||
notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
PendingIntent pendingIntent;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
pendingIntent = PendingIntent.getActivity(activity, 0,
|
||||
notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
} else {
|
||||
pendingIntent = PendingIntent.getActivity(activity, 0,
|
||||
notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
int startResult;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue