Create non updatable system server stubs
Separate out stubs from non-updatable part of the system server. The ultimate goal is to create system server stubs by merging the non-updatable stubs and the per-module stubs, instead of generating them from the combined sources. Bug: 177640454 Test: m checkapi Change-Id: Iecb9d51472ae238bbeabe65e1cd782b7c8a4ce59
This commit is contained in:
@@ -6,7 +6,7 @@ filegroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
filegroup {
|
filegroup {
|
||||||
name: "services-all-sources",
|
name: "services-non-updatable-sources",
|
||||||
srcs: [
|
srcs: [
|
||||||
":services.core-sources",
|
":services.core-sources",
|
||||||
":services.core-sources-am-wm",
|
":services.core-sources-am-wm",
|
||||||
@@ -37,7 +37,15 @@ filegroup {
|
|||||||
":services.usb-sources",
|
":services.usb-sources",
|
||||||
":services.voiceinteraction-sources",
|
":services.voiceinteraction-sources",
|
||||||
":services.wifi-sources",
|
":services.wifi-sources",
|
||||||
":service-media-s-sources", // TODO (b/177640454)
|
],
|
||||||
|
visibility: ["//visibility:private"],
|
||||||
|
}
|
||||||
|
|
||||||
|
filegroup {
|
||||||
|
name: "services-all-sources",
|
||||||
|
srcs: [
|
||||||
|
":services-non-updatable-sources",
|
||||||
|
":service-media-s-sources",
|
||||||
":service-permission-sources",
|
":service-permission-sources",
|
||||||
":service-statsd-sources",
|
":service-statsd-sources",
|
||||||
],
|
],
|
||||||
@@ -123,9 +131,8 @@ filegroup {
|
|||||||
// API stub
|
// API stub
|
||||||
// =============================================================
|
// =============================================================
|
||||||
|
|
||||||
droidstubs {
|
stubs_defaults {
|
||||||
name: "services-stubs.sources",
|
name: "services-stubs-default",
|
||||||
srcs: [":services-all-sources"],
|
|
||||||
installable: false,
|
installable: false,
|
||||||
args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
|
args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
|
||||||
" --hide-annotation android.annotation.Hide" +
|
" --hide-annotation android.annotation.Hide" +
|
||||||
@@ -135,7 +142,13 @@ droidstubs {
|
|||||||
" --hide DeprecationMismatch" +
|
" --hide DeprecationMismatch" +
|
||||||
" --hide HiddenTypedefConstant",
|
" --hide HiddenTypedefConstant",
|
||||||
visibility: ["//visibility:private"],
|
visibility: ["//visibility:private"],
|
||||||
filter_packages: ["com.android."],
|
filter_packages: ["com.android."]
|
||||||
|
}
|
||||||
|
|
||||||
|
droidstubs {
|
||||||
|
name: "services-stubs.sources",
|
||||||
|
srcs: [":services-all-sources"],
|
||||||
|
defaults: ["services-stubs-default"],
|
||||||
check_api: {
|
check_api: {
|
||||||
current: {
|
current: {
|
||||||
api_file: "api/current.txt",
|
api_file: "api/current.txt",
|
||||||
@@ -181,3 +194,34 @@ java_library {
|
|||||||
dir: "apistubs/android/system-server",
|
dir: "apistubs/android/system-server",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
droidstubs {
|
||||||
|
name: "services-non-updatable-stubs.sources",
|
||||||
|
srcs: [":services-non-updatable-sources"],
|
||||||
|
defaults: ["services-stubs-default"],
|
||||||
|
check_api: {
|
||||||
|
current: {
|
||||||
|
api_file: "api/non-updatable-current.txt",
|
||||||
|
removed_api_file: "api/non-updatable-removed.txt",
|
||||||
|
},
|
||||||
|
api_lint: {
|
||||||
|
enabled: true,
|
||||||
|
new_since: ":android-non-updatable.api.system-server.latest",
|
||||||
|
baseline_file: "api/non-updatable-lint-baseline.txt",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dists: [
|
||||||
|
{
|
||||||
|
targets: ["sdk", "win_sdk"],
|
||||||
|
dir: "apistubs/android/system-server/api",
|
||||||
|
dest: "android-non-updatable.txt",
|
||||||
|
tag: ".api.txt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targets: ["sdk", "win_sdk"],
|
||||||
|
dir: "apistubs/android/system-server/api",
|
||||||
|
dest: "android-non-updatable-removed.txt",
|
||||||
|
tag: ".removed-api.txt",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
55
services/api/non-updatable-current.txt
Normal file
55
services/api/non-updatable-current.txt
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
// Signature format: 2.0
|
||||||
|
package com.android.server {
|
||||||
|
|
||||||
|
public final class LocalManagerRegistry {
|
||||||
|
method public static <T> void addManager(@NonNull Class<T>, @NonNull T);
|
||||||
|
method @Nullable public static <T> T getManager(@NonNull Class<T>);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class SystemService {
|
||||||
|
ctor public SystemService(@NonNull android.content.Context);
|
||||||
|
method @NonNull public final android.content.Context getContext();
|
||||||
|
method public boolean isUserSupported(@NonNull com.android.server.SystemService.TargetUser);
|
||||||
|
method public void onBootPhase(int);
|
||||||
|
method public abstract void onStart();
|
||||||
|
method public void onUserStarting(@NonNull com.android.server.SystemService.TargetUser);
|
||||||
|
method public void onUserStopped(@NonNull com.android.server.SystemService.TargetUser);
|
||||||
|
method public void onUserStopping(@NonNull com.android.server.SystemService.TargetUser);
|
||||||
|
method public void onUserSwitching(@Nullable com.android.server.SystemService.TargetUser, @NonNull com.android.server.SystemService.TargetUser);
|
||||||
|
method public void onUserUnlocked(@NonNull com.android.server.SystemService.TargetUser);
|
||||||
|
method public void onUserUnlocking(@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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
package com.android.server.role {
|
||||||
|
|
||||||
|
public interface RoleServicePlatformHelper {
|
||||||
|
method @NonNull public String computePackageStateHash(int);
|
||||||
|
method @NonNull public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getLegacyRoleState(int);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
package com.android.server.wifi {
|
||||||
|
|
||||||
|
public class SupplicantManager {
|
||||||
|
method public static void start();
|
||||||
|
method public static void stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
9
services/api/non-updatable-lint-baseline.txt
Normal file
9
services/api/non-updatable-lint-baseline.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// Baseline format: 1.0
|
||||||
|
NotCloseable: com.android.server.wifi.SupplicantManager:
|
||||||
|
Classes that release resources (stop()) should implement AutoClosable and CloseGuard: class com.android.server.wifi.SupplicantManager
|
||||||
|
|
||||||
|
|
||||||
|
ProtectedMember: com.android.server.SystemService#publishBinderService(String, android.os.IBinder):
|
||||||
|
Protected methods not allowed; must be public: method com.android.server.SystemService.publishBinderService(String,android.os.IBinder)}
|
||||||
|
ProtectedMember: com.android.server.SystemService#publishBinderService(String, android.os.IBinder, boolean):
|
||||||
|
Protected methods not allowed; must be public: method com.android.server.SystemService.publishBinderService(String,android.os.IBinder,boolean)}
|
||||||
1
services/api/non-updatable-removed.txt
Normal file
1
services/api/non-updatable-removed.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
// Signature format: 2.0
|
||||||
Reference in New Issue
Block a user