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

Commit d0129ce5 authored by Qasid Ahmad Sadiq's avatar Qasid Ahmad Sadiq
Browse files

Use current user isntead of system user if no --user parameter is passed

This is relevant when running cts tests in instant mode.
Certain tests were failing in non-system users in instant mode, which is particularlly consquential to auto.
THis fix will be cherry-picked back to their repo
Test: CTSAccessibility*, in both instant/non-instant, and with both system and secondary users.
Bug:146218533

Change-Id: I89937bd552d372adc5d96c51b24d1a2bb4a034e3
parent 645fdff0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.accessibility;

import android.annotation.NonNull;
import android.app.ActivityManager;
import android.os.ShellCommand;
import android.os.UserHandle;

@@ -83,7 +84,7 @@ final class AccessibilityShellCommand extends ShellCommand {
                return null;
            }
        }
        return UserHandle.USER_SYSTEM;
        return ActivityManager.getCurrentUser();
    }

    @Override