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

Commit 2dbe160d authored by Yi Kong's avatar Yi Kong
Browse files

Do not enable AFDO if the option is off, even if there is a profile file

The behaviour is accidentally changed during the Bazel migration.

Test: m
Change-Id: I44158f2518776c68938ad2ddab01431005a333b0
parent f97a42e5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -131,6 +131,10 @@ func (c *Module) fdoProfileMutator(ctx android.BottomUpMutatorContext) {
		return
	}

	if !c.afdo.afdoEnabled() {
		return
	}

	ctx.VisitDirectDepsWithTag(FdoProfileTag, func(m android.Module) {
		if ctx.OtherModuleHasProvider(m, FdoProfileProvider) {
			info := ctx.OtherModuleProvider(m, FdoProfileProvider).(FdoProfileInfo)