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

Commit 042721c0 authored by Himanshu Dagar's avatar Himanshu Dagar Committed by Android (Google) Code Review
Browse files

Merge "Redirect ACTION_MEDIA_SCANNER_SCAN file to owner user."

parents 10818994 38190138
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -393,6 +393,7 @@ import com.android.server.graphics.fonts.FontManagerInternal;
import com.android.server.job.JobSchedulerInternal;
import com.android.server.os.NativeTombstoneManager;
import com.android.server.pm.Installer;
import com.android.server.pm.UserManagerInternal;
import com.android.server.pm.parsing.pkg.AndroidPackage;
import com.android.server.pm.permission.PermissionManagerServiceInternal;
import com.android.server.uri.GrantUri;
@@ -13312,6 +13313,14 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
            switch (action) {
                case Intent.ACTION_MEDIA_SCANNER_SCAN_FILE:
                    UserManagerInternal umInternal = LocalServices.getService(
                            UserManagerInternal.class);
                    UserInfo userInfo = umInternal.getUserInfo(userId);
                    if (userInfo != null && userInfo.isCloneProfile()) {
                        userId = umInternal.getProfileParentId(userId);
                    }
                    break;
                case Intent.ACTION_UID_REMOVED:
                case Intent.ACTION_PACKAGE_REMOVED:
                case Intent.ACTION_PACKAGE_CHANGED: