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

Commit f8dcf5ea authored by Mathew Inwood's avatar Mathew Inwood
Browse files

Make apex.updatable default to true.

Update tests accordingly and add a new test case for this.

Bug: 180375550
Test: Treehugger
Change-Id: I835e189f4dae1e4bc79dce7bc59b7b9c7bd19fd9
parent 3bed9603
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ type apexBundleProperties struct {
	// Whether this APEX is considered updatable or not. When set to true, this will enforce
	// Whether this APEX is considered updatable or not. When set to true, this will enforce
	// additional rules for making sure that the APEX is truly updatable. To be updatable,
	// additional rules for making sure that the APEX is truly updatable. To be updatable,
	// min_sdk_version should be set as well. This will also disable the size optimizations like
	// min_sdk_version should be set as well. This will also disable the size optimizations like
	// symlinking to the system libs. Default is false.
	// symlinking to the system libs. Default is true.
	Updatable *bool
	Updatable *bool


	// Whether this APEX is installable to one of the partitions like system, vendor, etc.
	// Whether this APEX is installable to one of the partitions like system, vendor, etc.
@@ -1232,7 +1232,7 @@ var _ android.ApexBundleDepsInfoIntf = (*apexBundle)(nil)


// Implements android.ApexBudleDepsInfoIntf
// Implements android.ApexBudleDepsInfoIntf
func (a *apexBundle) Updatable() bool {
func (a *apexBundle) Updatable() bool {
	return proptools.Bool(a.properties.Updatable)
	return proptools.BoolDefault(a.properties.Updatable, true)
}
}


// getCertString returns the name of the cert that should be used to sign this APEX. This is
// getCertString returns the name of the cert that should be used to sign this APEX. This is
+120 −0

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Original line Diff line number Diff line
@@ -48,6 +48,7 @@ func TestBootImages(t *testing.T) {
				"baz",
				"baz",
				"quuz",
				"quuz",
			],
			],
			updatable: false,
		}
		}


		apex_key {
		apex_key {
@@ -187,6 +188,7 @@ func TestBootImageInApex(t *testing.T) {
			boot_images: [
			boot_images: [
				"mybootimage",
				"mybootimage",
			],
			],
			updatable: false,
		}
		}


		apex_key {
		apex_key {
+2 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ func TestVndkApexForVndkLite(t *testing.T) {
		apex_vndk {
		apex_vndk {
			name: "com.android.vndk.current",
			name: "com.android.vndk.current",
			key: "com.android.vndk.current.key",
			key: "com.android.vndk.current.key",
			updatable: false,
		}
		}


		apex_key {
		apex_key {
@@ -69,6 +70,7 @@ func TestVndkApexUsesVendorVariant(t *testing.T) {
		apex_vndk {
		apex_vndk {
			name: "com.android.vndk.current",
			name: "com.android.vndk.current",
			key: "mykey",
			key: "mykey",
			updatable: false,
		}
		}
		apex_key {
		apex_key {
			name: "mykey",
			name: "mykey",
+3 −0
Original line number Original line Diff line number Diff line
@@ -251,6 +251,7 @@ func TestBasicSdkWithCc(t *testing.T) {
			uses_sdks: ["mysdk@1"],
			uses_sdks: ["mysdk@1"],
			key: "myapex.key",
			key: "myapex.key",
			certificate: ":myapex.cert",
			certificate: ":myapex.cert",
			updatable: false,
		}
		}


		apex {
		apex {
@@ -259,6 +260,7 @@ func TestBasicSdkWithCc(t *testing.T) {
			uses_sdks: ["mysdk@2"],
			uses_sdks: ["mysdk@2"],
			key: "myapex.key",
			key: "myapex.key",
			certificate: ":myapex.cert",
			certificate: ":myapex.cert",
			updatable: false,
		}
		}


		apex {
		apex {
@@ -266,6 +268,7 @@ func TestBasicSdkWithCc(t *testing.T) {
			native_shared_libs: ["sdkmember"],
			native_shared_libs: ["sdkmember"],
			key: "myapex.key",
			key: "myapex.key",
			certificate: ":myapex.cert",
			certificate: ":myapex.cert",
			updatable: false,
		}
		}
	`)
	`)


Loading