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

Commit 36b881ef authored by Jiakai Zhang's avatar Jiakai Zhang
Browse files

Add service registerer for "artd_pre_reboot" and "dexopt_chroot_setup".

Design doc: http://go/art-service-pre-reboot-dexopt

The service definition and SELinux policy changes will follow.

Bug: 323856574
Test: m update-api
Change-Id: I7cf1fda0bf361a26656b4a18c640a245b95ff5e7
parent 5bb6f919
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -376,7 +376,9 @@ package android.nfc {
package android.os {

  public class ArtModuleServiceManager {
    method @FlaggedApi("android.content.pm.use_art_service_v2") @NonNull public android.os.ArtModuleServiceManager.ServiceRegisterer getArtdPreRebootServiceRegisterer();
    method @NonNull public android.os.ArtModuleServiceManager.ServiceRegisterer getArtdServiceRegisterer();
    method @FlaggedApi("android.content.pm.use_art_service_v2") @NonNull public android.os.ArtModuleServiceManager.ServiceRegisterer getDexoptChrootSetupServiceRegisterer();
  }

  public static final class ArtModuleServiceManager.ServiceRegisterer {
+16 −0
Original line number Diff line number Diff line
@@ -15,9 +15,11 @@
 */
package android.os;

import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.pm.Flags;

/**
 * Provides a way to register and obtain the system service binder objects managed by the ART
@@ -60,4 +62,18 @@ public class ArtModuleServiceManager {
    public ServiceRegisterer getArtdServiceRegisterer() {
        return new ServiceRegisterer("artd");
    }

    /** Returns {@link ServiceRegisterer} for the "artd_pre_reboot" service. */
    @NonNull
    @FlaggedApi(Flags.FLAG_USE_ART_SERVICE_V2)
    public ServiceRegisterer getArtdPreRebootServiceRegisterer() {
        return new ServiceRegisterer("artd_pre_reboot");
    }

    /** Returns {@link ServiceRegisterer} for the "dexopt_chroot_setup" service. */
    @NonNull
    @FlaggedApi(Flags.FLAG_USE_ART_SERVICE_V2)
    public ServiceRegisterer getDexoptChrootSetupServiceRegisterer() {
        return new ServiceRegisterer("dexopt_chroot_setup");
    }
}