Loading core/java/com/android/internal/app/IntentForwarderActivity.java +16 −9 Original line number Diff line number Diff line Loading @@ -79,6 +79,12 @@ public class IntentForwarderActivity extends Activity { private MetricsLogger mMetricsLogger; protected ExecutorService mExecutorService; @Override protected void onDestroy() { super.onDestroy(); mExecutorService.shutdown(); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading Loading @@ -121,16 +127,19 @@ public class IntentForwarderActivity extends Activity { final int callingUserId = getUserId(); final Intent newIntent = canForward(intentReceived, getUserId(), targetUserId, mInjector.getIPackageManager(), getContentResolver()); if (newIntent != null) { newIntent.prepareToLeaveUser(callingUserId); maybeShowDisclosureAsync(intentReceived, newIntent, targetUserId, userMessageId); CompletableFuture.runAsync(() -> startActivityAsCaller( newIntent, targetUserId), mExecutorService); } else { if (newIntent == null) { Slog.wtf(TAG, "the intent: " + intentReceived + " cannot be forwarded from user " + callingUserId + " to user " + targetUserId); } finish(); return; } newIntent.prepareToLeaveUser(callingUserId); maybeShowDisclosureAsync(intentReceived, newIntent, targetUserId, userMessageId); CompletableFuture.runAsync(() -> startActivityAsCaller(newIntent, targetUserId), mExecutorService) .thenAcceptAsync(result -> finish(), getApplicationContext().getMainExecutor()); } private void maybeShowDisclosureAsync( Loading Loading @@ -166,8 +175,6 @@ public class IntentForwarderActivity extends Activity { Slog.wtf(TAG, "Unable to launch as UID " + launchedFromUid + " package " + launchedFromPackage + ", while running in " + ActivityThread.currentProcessName(), e); } finally { mExecutorService.shutdown(); } } Loading core/res/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5099,7 +5099,7 @@ </activity> <activity android:name="com.android.internal.app.IntentForwarderActivity" android:finishOnCloseSystemDialogs="true" android:theme="@style/Theme.NoDisplay" android:theme="@style/Theme.Translucent.NoTitleBar" android:excludeFromRecents="true" android:label="@string/user_owner_label" android:exported="true" Loading Loading
core/java/com/android/internal/app/IntentForwarderActivity.java +16 −9 Original line number Diff line number Diff line Loading @@ -79,6 +79,12 @@ public class IntentForwarderActivity extends Activity { private MetricsLogger mMetricsLogger; protected ExecutorService mExecutorService; @Override protected void onDestroy() { super.onDestroy(); mExecutorService.shutdown(); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading Loading @@ -121,16 +127,19 @@ public class IntentForwarderActivity extends Activity { final int callingUserId = getUserId(); final Intent newIntent = canForward(intentReceived, getUserId(), targetUserId, mInjector.getIPackageManager(), getContentResolver()); if (newIntent != null) { newIntent.prepareToLeaveUser(callingUserId); maybeShowDisclosureAsync(intentReceived, newIntent, targetUserId, userMessageId); CompletableFuture.runAsync(() -> startActivityAsCaller( newIntent, targetUserId), mExecutorService); } else { if (newIntent == null) { Slog.wtf(TAG, "the intent: " + intentReceived + " cannot be forwarded from user " + callingUserId + " to user " + targetUserId); } finish(); return; } newIntent.prepareToLeaveUser(callingUserId); maybeShowDisclosureAsync(intentReceived, newIntent, targetUserId, userMessageId); CompletableFuture.runAsync(() -> startActivityAsCaller(newIntent, targetUserId), mExecutorService) .thenAcceptAsync(result -> finish(), getApplicationContext().getMainExecutor()); } private void maybeShowDisclosureAsync( Loading Loading @@ -166,8 +175,6 @@ public class IntentForwarderActivity extends Activity { Slog.wtf(TAG, "Unable to launch as UID " + launchedFromUid + " package " + launchedFromPackage + ", while running in " + ActivityThread.currentProcessName(), e); } finally { mExecutorService.shutdown(); } } Loading
core/res/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5099,7 +5099,7 @@ </activity> <activity android:name="com.android.internal.app.IntentForwarderActivity" android:finishOnCloseSystemDialogs="true" android:theme="@style/Theme.NoDisplay" android:theme="@style/Theme.Translucent.NoTitleBar" android:excludeFromRecents="true" android:label="@string/user_owner_label" android:exported="true" Loading