本文整理匯總了Java中mirror.android.app.ActivityThreadNMR1類的典型用法代碼示例。如果您正苦於以下問題:Java ActivityThreadNMR1類的具體用法?Java ActivityThreadNMR1怎麽用?Java ActivityThreadNMR1使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ActivityThreadNMR1類屬於mirror.android.app包,在下文中一共展示了ActivityThreadNMR1類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleNewIntent
import mirror.android.app.ActivityThreadNMR1; //導入依賴的package包/類
private void handleNewIntent(NewIntentData data) {
Intent intent;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
intent = ReferrerIntent.ctor.newInstance(data.intent, data.creator);
} else {
intent = data.intent;
}
if (ActivityThread.performNewIntents != null) {
ActivityThread.performNewIntents.call(
VirtualCore.mainThread(),
data.token,
Collections.singletonList(intent)
);
} else {
ActivityThreadNMR1.performNewIntents.call(
VirtualCore.mainThread(),
data.token,
Collections.singletonList(intent),
true);
}
}
示例2: handleNewIntent
import mirror.android.app.ActivityThreadNMR1; //導入依賴的package包/類
private void handleNewIntent(NewIntentData data) {
Intent intent;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
intent = ReferrerIntent.ctor.newInstance(data.intent, data.creator);
} else {
intent = data.intent;
}
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N) {
ActivityThread.performNewIntents.call(
VirtualCore.mainThread(),
data.token,
Collections.singletonList(intent)
);
} else {
ActivityThreadNMR1.performNewIntents.call(
VirtualCore.mainThread(),
data.token,
Collections.singletonList(intent),
true
);
}
}