Skip to content

Commit 644d3fd

Browse files
committed
Android 10: fix handleNewIntent
Signed-off-by: tiann <[email protected]>
1 parent eb15d18 commit 644d3fd

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

VirtualApp/lib/src/main/java/com/lody/virtual/client/VClientImpl.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,15 @@ private void handleNewIntent(NewIntentData data) {
196196
Collections.singletonList(intent)
197197
);
198198
} else {
199-
ActivityThreadNMR1.performNewIntents.call(
200-
VirtualCore.mainThread(),
201-
data.token,
202-
Collections.singletonList(intent),
203-
true);
199+
if (BuildCompat.isQ()) {
200+
ActivityThread.handleNewIntent.call(VirtualCore.mainThread(), data.token, Collections.singletonList(intent));
201+
} else {
202+
ActivityThreadNMR1.performNewIntents.call(
203+
VirtualCore.mainThread(),
204+
data.token,
205+
Collections.singletonList(intent),
206+
true);
207+
}
204208
}
205209
}
206210

VirtualApp/lib/src/main/java/mirror/android/app/ActivityThread.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class ActivityThread {
4444
public static RefObject<Map> mProviderMap;
4545
@MethodParams({IBinder.class, List.class})
4646
public static RefMethod<Void> performNewIntents;
47+
public static RefMethod<Void> handleNewIntent;
4748
public static RefStaticObject<IInterface> sPackageManager;
4849
@MethodParams({IBinder.class, String.class, int.class, int.class, Intent.class})
4950
public static RefMethod<Void> sendActivityResult;

0 commit comments

Comments
 (0)