Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e0a751e authored by Andrii Kulian's avatar Andrii Kulian
Browse files

Provide calling package name when starting activities

ActivityTaskManager requires non-null calling package name to verify
if it matches the caller UID.

Bug: 137395936
Test: Build and flash
Change-Id: I1e937cb1d8181cc4a6b5af3933917a5a3aefd321
parent 2c019628
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -762,8 +762,8 @@ final class UiModeManagerService extends SystemService {
            if (Sandman.shouldStartDockApp(getContext(), homeIntent)) {
                try {
                    int result = ActivityTaskManager.getService().startActivityWithConfig(
                            null, null, homeIntent, null, null, null, 0, 0,
                            mConfiguration, null, UserHandle.USER_CURRENT);
                            null, getContext().getBasePackageName(), homeIntent, null, null, null,
                            0, 0, mConfiguration, null, UserHandle.USER_CURRENT);
                    if (ActivityManager.isStartResultSuccessful(result)) {
                        dockAppStarted = true;
                    } else if (result != ActivityManager.START_INTENT_NOT_RESOLVED) {
+2 −2
Original line number Diff line number Diff line
@@ -5263,7 +5263,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    final Intent dock = createHomeDockIntent();
                    if (dock != null) {
                        int result = ActivityTaskManager.getService()
                                .startActivityAsUser(null, null, dock,
                                .startActivityAsUser(null, mContext.getBasePackageName(), dock,
                                        dock.resolveTypeIfNeeded(mContext.getContentResolver()),
                                        null, null, 0,
                                        ActivityManager.START_FLAG_ONLY_IF_NEEDED,
@@ -5274,7 +5274,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    }
                }
                int result = ActivityTaskManager.getService()
                        .startActivityAsUser(null, null, mHomeIntent,
                        .startActivityAsUser(null, mContext.getBasePackageName(), mHomeIntent,
                                mHomeIntent.resolveTypeIfNeeded(mContext.getContentResolver()),
                                null, null, 0,
                                ActivityManager.START_FLAG_ONLY_IF_NEEDED,