diff options
| author | 2021-07-15 10:15:26 +0000 | |
|---|---|---|
| committer | 2021-07-15 10:15:26 +0000 | |
| commit | 7beb0995467c07d096cbb03fe13b2a3996aadef5 (patch) | |
| tree | 018fcb66f9819fc54498ad3859f1b2474eca6c34 /java/java.go | |
| parent | 4e444dab84ec8d2ec242cab85e85bf5ae4dc656b (diff) | |
| parent | 497a09310b03ce1cde15895423dcc71e8b9de9ee (diff) | |
Merge "Drop `strings.HasPrefix` when guarding `strings.TrimPrefix`."
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/java/java.go b/java/java.go index d763a4b31..e74185ec5 100644 --- a/java/java.go +++ b/java/java.go @@ -21,7 +21,6 @@ package java import ( "fmt" "path/filepath" - "strings" "github.com/google/blueprint" "github.com/google/blueprint/proptools" @@ -1465,11 +1464,7 @@ func (j *Import) IDECustomizedModuleName() string { // TODO(b/113562217): Extract the base module name from the Import name, often the Import name // has a prefix "prebuilt_". Remove the prefix explicitly if needed until we find a better // solution to get the Import name. - name := j.Name() - if strings.HasPrefix(name, removedPrefix) { - name = strings.TrimPrefix(name, removedPrefix) - } - return name + return android.RemoveOptionalPrebuiltPrefix(j.Name()) } var _ android.PrebuiltInterface = (*Import)(nil) |