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

Commit 989825d3 authored by Harshit Mahajan's avatar Harshit Mahajan
Browse files

Separating framework platform crashrecovery jar

Creating new jar "framework-platformcrashrecovery".
This would separate all the apis to a different sdk library while still
being part of core platform.
This jar is behind release_crashrecovery_module flag which also controls enabling CrashRecovery module apex.
Based on the flag only one of platformcrashrecovery jar or CrashRecovery Apex will be used.

So essentially on device if release_crashrecovery_module flag is
1. true: CrashRecovery Apex is present, this jar is not used
2. false: CrashRecovery Apex is not used, this jar is present

Bug: 289203818
Test: Jar is present in Bootclasspath on device
Test: ExplcitHealthCheckService registered on device
Flag: build.release_crashrecovery_module
Change-Id: I4696e74a1ba236614398b48a6d7145777079286b
parent ce3c8280
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -144,9 +144,6 @@ filegroup {
        // For the generated R.java and Manifest.java
        ":framework-res{.aapt.srcjar}",

        // Java/AIDL sources to be moved out to CrashRecovery module
        ":framework-crashrecovery-sources",

        // etc.
        ":framework-javastream-protos",
        ":statslog-framework-java-gen", // FrameworkStatsLog.java
@@ -432,7 +429,12 @@ java_library {
    name: "framework-non-updatable-unbundled-impl-libs",
    static_libs: [
        "framework-location.impl",
    ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), {
        "true": [],
        default: [
            "framework-platformcrashrecovery.impl",
        ],
    }),
    sdk_version: "core_platform",
    installable: false,
}
@@ -565,7 +567,12 @@ java_library {
        "documents-ui-compat-config",
        "calendar-provider-compat-config",
        "contacts-provider-platform-compat-config",
    ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), {
        "true": [],
        default: [
            "framework-platformcrashrecovery-compat-config",
        ],
    }),
}

platform_compat_config {
+4 −1
Original line number Diff line number Diff line
@@ -101,7 +101,9 @@ combined_apis {
        "true": [
            "framework-crashrecovery",
        ],
        default: [],
        default: [
            "framework-platformcrashrecovery",
        ],
    }) + select(release_flag("RELEASE_RANGING_STACK"), {
        true: [
            "framework-ranging",
@@ -436,6 +438,7 @@ java_defaults {
    impl_library_visibility: ["//frameworks/base"],
    defaults_visibility: [
        "//frameworks/base/location",
        "//frameworks/base/packages/CrashRecovery/framework",
        "//frameworks/base/nfc",
    ],
    plugins: ["error_prone_android_framework"],
+2 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ const conscrypt = "conscrypt.module.public.api"
const i18n = "i18n.module.public.api"
const virtualization = "framework-virtualization"
const location = "framework-location"
const platformCrashrecovery = "framework-platformcrashrecovery"

var core_libraries_modules = []string{art, conscrypt, i18n}

@@ -39,7 +40,7 @@ var core_libraries_modules = []string{art, conscrypt, i18n}
// APIs.
// In addition, the modules in this list are allowed to contribute to test APIs
// stubs.
var non_updatable_modules = []string{virtualization, location}
var non_updatable_modules = []string{virtualization, location, platformCrashrecovery}

// The intention behind this soong plugin is to generate a number of "merged"
// API-related modules that would otherwise require a large amount of very
+3 −6
Original line number Diff line number Diff line
@@ -78,10 +78,7 @@ func gatherRequiredDepsForTest() string {
		"stub-annotations",
	}

	extraSdkLibraryModules := []string{
		"framework-virtualization",
		"framework-location",
	}
	extraSdkLibraryModules := non_updatable_modules

	extraSystemModules := []string{
		"core-public-stubs-system-modules",
@@ -184,10 +181,10 @@ func gatherRequiredDepsForTest() string {

func TestCombinedApisDefaults(t *testing.T) {

	testNonUpdatableModules := append(non_updatable_modules, "framework-foo", "framework-bar")
	result := android.GroupFixturePreparers(
		prepareForTestWithCombinedApis,
		java.FixtureWithLastReleaseApis(
			"framework-location", "framework-virtualization", "framework-foo", "framework-bar"),
		java.FixtureWithLastReleaseApis(testNonUpdatableModules...),
		android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
			variables.VendorVars = map[string]map[string]string{
				"boolean_var": {
+0 −25
Original line number Diff line number Diff line
@@ -14083,31 +14083,6 @@ package android.service.wallpapereffectsgeneration {
}
package android.service.watchdog {
  public abstract class ExplicitHealthCheckService extends android.app.Service {
    ctor public ExplicitHealthCheckService();
    method public final void notifyHealthCheckPassed(@NonNull String);
    method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent);
    method public abstract void onCancelHealthCheck(@NonNull String);
    method @NonNull public abstract java.util.List<java.lang.String> onGetRequestedPackages();
    method @NonNull public abstract java.util.List<android.service.watchdog.ExplicitHealthCheckService.PackageConfig> onGetSupportedPackages();
    method public abstract void onRequestHealthCheck(@NonNull String);
    field public static final String BIND_PERMISSION = "android.permission.BIND_EXPLICIT_HEALTH_CHECK_SERVICE";
    field public static final String SERVICE_INTERFACE = "android.service.watchdog.ExplicitHealthCheckService";
  }
  public static final class ExplicitHealthCheckService.PackageConfig implements android.os.Parcelable {
    ctor public ExplicitHealthCheckService.PackageConfig(@NonNull String, long);
    method public int describeContents();
    method public long getHealthCheckTimeoutMillis();
    method @NonNull public String getPackageName();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.service.watchdog.ExplicitHealthCheckService.PackageConfig> CREATOR;
  }
}
package android.service.wearable {
  @FlaggedApi("android.app.wearable.enable_data_request_observer_api") public interface WearableSensingDataRequester {
Loading