Return false in DirectlyInAnyApex for host libraries.
Host doesn't have apexes. Bug: 122947954 Test: build dex2oat, check that libnativebridge is installed. Change-Id: I3548e3f155a200e56d71e88631b71511bad84161
This commit is contained in:
@@ -178,8 +178,16 @@ func DirectlyInApex(apexName string, moduleName string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type hostContext interface {
|
||||
Host() bool
|
||||
}
|
||||
|
||||
// Tests whether a module named moduleName is directly depended on by any APEX.
|
||||
func DirectlyInAnyApex(moduleName string) bool {
|
||||
func DirectlyInAnyApex(ctx hostContext, moduleName string) bool {
|
||||
if ctx.Host() {
|
||||
// Host has no APEX.
|
||||
return false
|
||||
}
|
||||
apexNamesMapMutex.Lock()
|
||||
defer apexNamesMapMutex.Unlock()
|
||||
if apexNames, ok := apexNamesMap()[moduleName]; ok {
|
||||
|
Reference in New Issue
Block a user