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

Commit bf03b1b0 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Expose SystemService as @SystemApi for mainline modules

Test: build / treehugger (annotation change only)
Bug: 146145144
Change-Id: I41b4d56dce06034730e8b3e70c2ca3fab8cc3456
parent e709c6a4
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
// Signature format: 2.0
package com.android.server {

  public abstract class SystemService {
    ctor public SystemService(@NonNull android.content.Context);
    method @NonNull public final android.content.Context getContext();
    method public boolean isSupportedUser(@NonNull com.android.server.SystemService.TargetUser);
    method public void onBootPhase(int);
    method public void onCleanupUser(@NonNull com.android.server.SystemService.TargetUser);
    method public abstract void onStart();
    method public void onStartUser(@NonNull com.android.server.SystemService.TargetUser);
    method public void onStopUser(@NonNull com.android.server.SystemService.TargetUser);
    method public void onSwitchUser(@Nullable com.android.server.SystemService.TargetUser, @NonNull com.android.server.SystemService.TargetUser);
    method public void onUnlockUser(@NonNull com.android.server.SystemService.TargetUser);
    method protected final void publishBinderService(@NonNull String, @NonNull android.os.IBinder);
    method protected final void publishBinderService(@NonNull String, @NonNull android.os.IBinder, boolean);
    field public static final int PHASE_ACTIVITY_MANAGER_READY = 550; // 0x226
    field public static final int PHASE_BOOT_COMPLETED = 1000; // 0x3e8
    field public static final int PHASE_DEVICE_SPECIFIC_SERVICES_READY = 520; // 0x208
    field public static final int PHASE_LOCK_SETTINGS_READY = 480; // 0x1e0
    field public static final int PHASE_SYSTEM_SERVICES_READY = 500; // 0x1f4
    field public static final int PHASE_THIRD_PARTY_APPS_CAN_START = 600; // 0x258
    field public static final int PHASE_WAIT_FOR_DEFAULT_DISPLAY = 100; // 0x64
  }

  public static final class SystemService.TargetUser {
    method @NonNull public android.os.UserHandle getUserHandle();
  }

}
+5 −2
Original line number Diff line number Diff line
@@ -21,6 +21,9 @@ import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_DEFAULT;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.SystemApi.Client;
import android.annotation.SystemApi.Process;
import android.annotation.UserIdInt;
import android.app.ActivityThread;
import android.content.Context;
@@ -62,7 +65,7 @@ import java.util.List;
 *
 * {@hide}
 */
//@SystemApi(client = Client.MODULE_LIBRARIES, process = Process.SYSTEM_SERVER)
@SystemApi(client = Client.MODULE_LIBRARIES, process = Process.SYSTEM_SERVER)
public abstract class SystemService {

    /** @hide */
@@ -129,7 +132,7 @@ public abstract class SystemService {
     * Class representing user in question in the lifecycle callbacks.
     * @hide
     */
    //@SystemApi(client = Client.MODULE_LIBRARIES, process = Process.SYSTEM_SERVER)
    @SystemApi(client = Client.MODULE_LIBRARIES, process = Process.SYSTEM_SERVER)
    public static final class TargetUser {
        @NonNull
        private final UserInfo mUserInfo;