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

Commit 2122bbf1 authored by Felka Chang's avatar Felka Chang
Browse files

Add live annotation for Computer.getProcessesForUid

PackageManagerServiceTest#testComputerStructure verify both structure
of Computer and ComputerEngine.
* Computer.getProcessesForUid should have the live annotation.
* PackageManagerServiceTest#testComputerStructure should skip static
  lambda function. a.k.a ComputerEngine.sProviderInitOrderSorter

Fixes: 206896767

Test: TP="FrameworksServicesTests" ; atest \
    ${TP}:com.android.server.pm.PackageManagerServiceTest
Change-Id: Ic7002ce72b20d7929bd1e3e0bb9f29367d2aea8a
parent c3c442a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -612,6 +612,10 @@ public interface Computer {
    @Computer.LiveImplementation(override = LiveImplementation.MANDATORY)
    int getUidTargetSdkVersion(int uid);

    /**
     * @see PackageManagerInternal#getProcessesForUid(int)
     */
    @Computer.LiveImplementation(override = LiveImplementation.MANDATORY)
    @Nullable
    ArrayMap<String, ProcessInfo> getProcessesForUid(int uid);
    // End block
+5 −0
Original line number Diff line number Diff line
@@ -509,6 +509,11 @@ public class PackageManagerServiceTest {
        for (Method m : coreMethods) {
            if (m != null) {
                final String name = "ComputerEngine." + displayName(m);
                if (name.contains(".lambda$static")) {
                    // skip static lambda function
                    continue;
                }

                final int modifiers = m.getModifiers();
                if (isPrivate(modifiers)) {
                    // Okay