Add support for privileged apps to androidmk

Fixes: 221894523
Test: Added unit tests
Test: Manual test
Change-Id: I2285e4e24d94d519ee68dde74edc2d4fb2120146
This commit is contained in:
Trevor Radcliffe
2022-02-28 20:38:35 +00:00
parent 2ace628b86
commit ecdb9f701a
4 changed files with 62 additions and 4 deletions

View File

@@ -24,14 +24,24 @@ import (
// A MakeString is a string that may contain variable substitutions in it.
// It can be considered as an alternating list of raw Strings and variable
// substitutions, where the first and last entries in the list must be raw
// Strings (possibly empty). A MakeString that starts with a variable
// will have an empty first raw string, and a MakeString that ends with a
// variable will have an empty last raw string. Two sequential Variables
// will have an empty raw string between them.
// Strings (possibly empty). The entirety of the text before the first variable,
// between two variables, and after the last variable will be considered a
// single String value. A MakeString that starts with a variable will have an
// empty first raw string, and a MakeString that ends with a variable will have
// an empty last raw string. Two sequential Variables will have an empty raw
// string between them.
//
// The MakeString is stored as two lists, a list of raw Strings and a list
// of Variables. The raw string list is always one longer than the variable
// list.
//
// For example, "$(FOO)/bar/baz" will be represented as the
// following lists:
//
// {
// Strings: ["", "/bar/baz"],
// Variables: ["FOO"]
// }
type MakeString struct {
StringPos Pos
Strings []string