summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/appwidget/OWNERS2
-rw-r--r--core/res/res/xml/sms_short_codes.xml24
-rw-r--r--core/tests/coretests/OWNERS1
-rw-r--r--omapi/aidl/vts/functional/AccessControlApp/Android.bp1
-rw-r--r--omapi/aidl/vts/functional/omapi/Android.bp1
-rw-r--r--services/tests/servicestests/src/com/android/server/security/advancedprotection/OWNERS1
-rwxr-xr-xtools/fonts/fontchain_linter.py162
7 files changed, 123 insertions, 69 deletions
diff --git a/core/java/android/appwidget/OWNERS b/core/java/android/appwidget/OWNERS
index 191083303769..0e85d5bd7a27 100644
--- a/core/java/android/appwidget/OWNERS
+++ b/core/java/android/appwidget/OWNERS
@@ -3,3 +3,5 @@ sihua@google.com
pinyaoting@google.com
suprabh@google.com
sunnygoyal@google.com
+zakcohen@google.com
+shamalip@google.com
diff --git a/core/res/res/xml/sms_short_codes.xml b/core/res/res/xml/sms_short_codes.xml
index 581dee571a69..bb5380e1312d 100644
--- a/core/res/res/xml/sms_short_codes.xml
+++ b/core/res/res/xml/sms_short_codes.xml
@@ -34,7 +34,7 @@
http://smscoin.net/software/engine/WordPress/Paid+SMS-registration/ -->
<!-- Arab Emirates -->
- <shortcode country="ae" pattern="\\d{1,5}" free="1017|1355|3214|6253" />
+ <shortcode country="ae" pattern="\\d{1,5}" free="1017|1355|3214|6253|6568" />
<!-- Albania: 5 digits, known short codes listed -->
<shortcode country="al" pattern="\\d{5}" premium="15191|55[56]00" />
@@ -70,7 +70,7 @@
<shortcode country="bh" pattern="\\d{1,5}" free="81181|85999" />
<!-- Brazil: 1-5 digits (standard system default, not country specific) -->
- <shortcode country="br" pattern="\\d{1,5}" free="6000[012]\\d|876|5500|9963|4141|8000|2652" />
+ <shortcode country="br" pattern="\\d{1,5}" free="6000[012]\\d|876|5500|9963|4141|8000|2652|26808" />
<!-- Botswana: 1-5 digits (standard system default, not country specific) -->
<shortcode country="bw" pattern="\\d{1,5}" free="16641" />
@@ -79,7 +79,7 @@
<shortcode country="by" pattern="\\d{4}" premium="3336|4161|444[4689]|501[34]|7781" />
<!-- Canada: 5-6 digits -->
- <shortcode country="ca" pattern="\\d{5,6}" premium="60999|88188|43030" standard="244444" free="455677" />
+ <shortcode country="ca" pattern="\\d{5,6}" premium="60999|88188|43030" standard="244444" free="455677|24470" />
<!-- Switzerland: 3-5 digits: http://www.swisscom.ch/fxres/kmu/thirdpartybusiness_code_of_conduct_en.pdf -->
<shortcode country="ch" pattern="[2-9]\\d{2,4}" premium="543|83111|30118" free="98765|30075|30047" />
@@ -123,8 +123,8 @@
http://www.tja.ee/public/documents/Elektrooniline_side/Oigusaktid/ENG/Estonian_Numbering_Plan_annex_06_09_2010.mht -->
<shortcode country="ee" pattern="1\\d{2,4}" premium="90\\d{5}|15330|1701[0-3]" free="116\\d{3}|95034" />
- <!-- Egypt: 4 digits, known codes listed -->
- <shortcode country="eg" pattern="\\d{4}" free="1499" />
+ <!-- Egypt: 4-5 digits, known codes listed -->
+ <shortcode country="eg" pattern="\\d{4,5}" free="1499|10020" />
<!-- Spain: 5-6 digits: 25xxx, 27xxx, 280xx, 35xxx, 37xxx, 795xxx, 797xxx, 995xxx, 997xxx, plus EU.
http://www.legallink.es/?q=en/content/which-current-regulatory-status-premium-rate-services-spain -->
@@ -147,7 +147,7 @@
<shortcode country="ge" pattern="\\d{1,5}" premium="801[234]|888[239]" free="95201|95202|95203" />
<!-- Ghana: 4 digits, known premium codes listed -->
- <shortcode country="gh" pattern="\\d{4}" free="5041|3777|2333" />
+ <shortcode country="gh" pattern="\\d{4}" free="5041|3777|2333|6061" />
<!-- Greece: 5 digits (54xxx, 19yxx, x=0-9, y=0-5): http://www.cmtelecom.com/premium-sms/greece -->
<shortcode country="gr" pattern="\\d{5}" premium="54\\d{3}|19[0-5]\\d{2}" free="116\\d{3}|12115" />
@@ -169,7 +169,7 @@
<shortcode country="in" pattern="\\d{1,5}" free="59336|53969" />
<!-- Indonesia: 1-5 digits (standard system default, not country specific) -->
- <shortcode country="id" pattern="\\d{1,5}" free="99477|6006|46645|363|93457|99265" />
+ <shortcode country="id" pattern="\\d{1,5}" free="99477|6006|46645|363|93457|99265|77413" />
<!-- Ireland: 5 digits, 5xxxx (50xxx=free, 5[12]xxx=standard), plus EU:
http://www.comreg.ie/_fileupload/publications/ComReg1117.pdf -->
@@ -226,13 +226,13 @@
<shortcode country="mn" pattern="\\d{1,6}" free="44444|45678|445566" />
<!-- Malawi: 1-5 digits (standard system default, not country specific) -->
- <shortcode country="mw" pattern="\\d{1,5}" free="4276" />
+ <shortcode country="mw" pattern="\\d{1,5}" free="4276|4305" />
<!-- Mozambique: 1-5 digits (standard system default, not country specific) -->
<shortcode country="mz" pattern="\\d{1,5}" free="1714" />
<!-- Mexico: 4-7 digits (not confirmed), known premium codes listed -->
- <shortcode country="mx" pattern="\\d{4,7}" premium="53035|7766" free="26259|46645|50025|50052|5050|76551|88778|9963|91101|45453|550346|3030303|81811" />
+ <shortcode country="mx" pattern="\\d{4,7}" premium="53035|7766" free="26259|46645|50025|50052|5050|76551|88778|9963|91101|45453|550346|3030303|81811|81818" />
<!-- Malaysia: 5 digits: http://www.skmm.gov.my/attachment/Consumer_Regulation/Mobile_Content_Services_FAQs.pdf -->
<shortcode country="my" pattern="\\d{5}" premium="32298|33776" free="22099|28288|66668|66966" />
@@ -324,7 +324,7 @@
<shortcode country="tj" pattern="\\d{4}" premium="11[3-7]1|4161|4333|444[689]" />
<!-- Tanzania: 1-5 digits (standard system default, not country specific) -->
- <shortcode country="tz" pattern="\\d{1,5}" free="15046|15234|15324" />
+ <shortcode country="tz" pattern="\\d{1,5}" free="15046|15234|15324|15610" />
<!-- Tunisia: 5 digits, known premium codes listed -->
<shortcode country="tn" pattern="\\d{5}" free="85799" />
@@ -336,11 +336,11 @@
<shortcode country="ua" pattern="\\d{4}" premium="444[3-9]|70[579]4|7540" />
<!-- Uganda(UG): 4 digits (standard system default, not country specific) -->
- <shortcode country="ug" pattern="\\d{4}" free="8000" />
+ <shortcode country="ug" pattern="\\d{4}" free="8000|8009" />
<!-- USA: 5-6 digits (premium codes from https://www.premiumsmsrefunds.com/ShortCodes.htm),
visual voicemail code for T-Mobile: 122 -->
- <shortcode country="us" pattern="\\d{5,6}" premium="20433|21(?:344|472)|22715|23(?:333|847)|24(?:15|28)0|25209|27(?:449|606|663)|28498|305(?:00|83)|32(?:340|941)|33(?:166|786|849)|34746|35(?:182|564)|37975|38(?:135|146|254)|41(?:366|463)|42335|43(?:355|500)|44(?:578|711|811)|45814|46(?:157|173|327)|46666|47553|48(?:221|277|669)|50(?:844|920)|51(?:062|368)|52944|54(?:723|892)|55928|56483|57370|59(?:182|187|252|342)|60339|61(?:266|982)|62478|64(?:219|898)|65(?:108|500)|69(?:208|388)|70877|71851|72(?:078|087|465)|73(?:288|588|882|909|997)|74(?:034|332|815)|76426|79213|81946|83177|84(?:103|685)|85797|86(?:234|236|666)|89616|90(?:715|842|938)|91(?:362|958)|94719|95297|96(?:040|666|835|969)|97(?:142|294|688)|99(?:689|796|807)" standard="44567|244444" free="122|87902|21696|24614|28003|30356|33669|40196|41064|41270|43753|44034|46645|52413|56139|57969|61785|66975|75136|76227|81398|83952|85140|86566|86799|95737|96684|99245|611611|96831" />
+ <shortcode country="us" pattern="\\d{5,6}" premium="20433|21(?:344|472)|22715|23(?:333|847)|24(?:15|28)0|25209|27(?:449|606|663)|28498|305(?:00|83)|32(?:340|941)|33(?:166|786|849)|34746|35(?:182|564)|37975|38(?:135|146|254)|41(?:366|463)|42335|43(?:355|500)|44(?:578|711|811)|45814|46(?:157|173|327)|46666|47553|48(?:221|277|669)|50(?:844|920)|51(?:062|368)|52944|54(?:723|892)|55928|56483|57370|59(?:182|187|252|342)|60339|61(?:266|982)|62478|64(?:219|898)|65(?:108|500)|69(?:208|388)|70877|71851|72(?:078|087|465)|73(?:288|588|882|909|997)|74(?:034|332|815)|76426|79213|81946|83177|84(?:103|685)|85797|86(?:234|236|666)|89616|90(?:715|842|938)|91(?:362|958)|94719|95297|96(?:040|666|835|969)|97(?:142|294|688)|99(?:689|796|807)" standard="44567|244444" free="122|87902|21696|24614|28003|30356|33669|40196|41064|41270|43753|44034|46645|52413|56139|57969|61785|66975|75136|76227|81398|83952|85140|86566|86799|95737|96684|99245|611611|96831|10907" />
<!--Uruguay : 1-6 digits (standard system default, not country specific) -->
<shortcode country="uy" pattern="\\d{1,6}" free="55002|191289" />
diff --git a/core/tests/coretests/OWNERS b/core/tests/coretests/OWNERS
index b669e3bc4f30..6d27f3156c93 100644
--- a/core/tests/coretests/OWNERS
+++ b/core/tests/coretests/OWNERS
@@ -4,3 +4,4 @@ per-file BinderTest.java = file:platform/frameworks/native:/libs/binder/OWNERS
per-file ParcelTest.java = file:platform/frameworks/native:/libs/binder/OWNERS
per-file SurfaceControlRegistryTests.java = file:/services/core/java/com/android/server/wm/OWNERS
per-file VintfObjectTest.java = file:platform/system/libvintf:/OWNERS
+per-file WallpaperDescriptionTest,WallpaperInstanceTest = file:/core/java/android/service/wallpaper/OWNERS
diff --git a/omapi/aidl/vts/functional/AccessControlApp/Android.bp b/omapi/aidl/vts/functional/AccessControlApp/Android.bp
index f03c3f6eb647..57d75f596485 100644
--- a/omapi/aidl/vts/functional/AccessControlApp/Android.bp
+++ b/omapi/aidl/vts/functional/AccessControlApp/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_nfc",
default_applicable_licenses: ["Android-Apache-2.0"],
}
diff --git a/omapi/aidl/vts/functional/omapi/Android.bp b/omapi/aidl/vts/functional/omapi/Android.bp
index c41479f9e9cf..8ee55ff56bb6 100644
--- a/omapi/aidl/vts/functional/omapi/Android.bp
+++ b/omapi/aidl/vts/functional/omapi/Android.bp
@@ -15,6 +15,7 @@
//
package {
+ default_team: "trendy_team_fwk_nfc",
default_applicable_licenses: ["Android-Apache-2.0"],
}
diff --git a/services/tests/servicestests/src/com/android/server/security/advancedprotection/OWNERS b/services/tests/servicestests/src/com/android/server/security/advancedprotection/OWNERS
new file mode 100644
index 000000000000..9bf5e58c01a9
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/security/advancedprotection/OWNERS
@@ -0,0 +1 @@
+file:platform/frameworks/base:main:/core/java/android/security/advancedprotection/OWNERS
diff --git a/tools/fonts/fontchain_linter.py b/tools/fonts/fontchain_linter.py
index 006a02908643..3bde92909cd5 100755
--- a/tools/fonts/fontchain_linter.py
+++ b/tools/fonts/fontchain_linter.py
@@ -10,6 +10,14 @@ from xml.etree import ElementTree
from fontTools import ttLib
+# TODO(nona): Remove hard coded font version and unicode versions.
+# Figure out a way of giving this information with command lines.
+EMOJI_FONT_TO_UNICODE_MAP = {
+ '2.034': 15.0,
+ '2.042': 15.1,
+ '2.047': 16.0,
+}
+
EMOJI_VS = 0xFE0F
LANG_TO_SCRIPT = {
@@ -217,9 +225,8 @@ def check_hyphens(hyphens_dir):
class FontRecord(object):
- def __init__(self, name, psName, scripts, variant, weight, style, fallback_for, font):
+ def __init__(self, name, scripts, variant, weight, style, fallback_for, font):
self.name = name
- self.psName = psName
self.scripts = scripts
self.variant = variant
self.weight = weight
@@ -282,13 +289,23 @@ def parse_fonts_xml(fonts_xml_path):
m = trim_re.match(font_file)
font_file = m.group(1)
- weight = int(child.get('weight'))
- assert weight % 100 == 0, (
- 'Font weight "%d" is not a multiple of 100.' % weight)
-
- style = child.get('style')
- assert style in {'normal', 'italic'}, (
- 'Unknown style "%s"' % style)
+ # In case of variable font and it supports `wght` axis, the weight attribute can be
+ # dropped which is automatically adjusted at runtime.
+ if 'weight' in child:
+ weight = int(child.get('weight'))
+ assert weight % 100 == 0, (
+ 'Font weight "%d" is not a multiple of 100.' % weight)
+ else:
+ weight = None
+
+ # In case of variable font and it supports `ital` or `slnt` axes, the style attribute
+ # can be dropped which is automatically adjusted at runtime.
+ if 'style' in child:
+ style = child.get('style')
+ assert style in {'normal', 'italic'}, (
+ 'Unknown style "%s"' % style)
+ else:
+ style = None
fallback_for = child.get('fallbackFor')
@@ -306,7 +323,6 @@ def parse_fonts_xml(fonts_xml_path):
record = FontRecord(
name,
- child.get('postScriptName'),
frozenset(scripts),
variant,
weight,
@@ -357,6 +373,11 @@ def is_regional_indicator(x):
# regional indicator A..Z
return 0x1F1E6 <= x <= 0x1F1FF
+def is_flag_sequence(seq):
+ if type(seq) == int:
+ return False
+ len(seq) == 2 and is_regional_indicator(seq[0]) and is_regional_indicator(seq[1])
+
def is_tag(x):
# tag block
return 0xE0000 <= x <= 0xE007F
@@ -391,17 +412,43 @@ def check_emoji_not_compat(all_emoji, equivalent_emoji):
if "meta" in ttf:
assert 'Emji' not in ttf["meta"].data, 'NotoColorEmoji MUST be a compat font'
+def is_flag_emoji(font):
+ return 0x1F1E6 in get_best_cmap(font)
+
+def emoji_font_version_to_unicode_version(font_version):
+ version_str = '%.3f' % font_version
+ assert version_str in EMOJI_FONT_TO_UNICODE_MAP, 'Unknown emoji font verion: %s' % version_str
+ return EMOJI_FONT_TO_UNICODE_MAP[version_str]
+
def check_emoji_font_coverage(emoji_fonts, all_emoji, equivalent_emoji):
coverages = []
+ emoji_font_version = 0
+ emoji_flag_font_version = 0
for emoji_font in emoji_fonts:
coverages.append(get_emoji_map(emoji_font))
+ # Find the largest version of the installed emoji font.
+ version = open_font(emoji_font)['head'].fontRevision
+ if is_flag_emoji(emoji_font):
+ emoji_flag_font_version = max(emoji_flag_font_version, version)
+ else:
+ emoji_font_version = max(emoji_font_version, version)
+
+ emoji_flag_unicode_version = emoji_font_version_to_unicode_version(emoji_flag_font_version)
+ emoji_unicode_version = emoji_font_version_to_unicode_version(emoji_font_version)
+
errors = []
for sequence in all_emoji:
if all([sequence not in coverage for coverage in coverages]):
- errors.append('%s is not supported in the emoji font.' % printable(sequence))
+ sequence_version = float(_age_by_chars[sequence])
+ if is_flag_sequence(sequence):
+ if sequence_version <= emoji_flag_unicode_version:
+ errors.append('%s is not supported in the emoji font.' % printable(sequence))
+ else:
+ if sequence_version <= emoji_unicode_version:
+ errors.append('%s is not supported in the emoji font.' % printable(sequence))
for coverage in coverages:
for sequence in coverage:
@@ -480,6 +527,19 @@ def check_emoji_defaults(default_emoji):
repr(missing_text_chars))
+def parse_unicode_seq(chars):
+ if ' ' in chars: # character sequence
+ sequence = [int(ch, 16) for ch in chars.split(' ')]
+ additions = [tuple(sequence)]
+ elif '..' in chars: # character range
+ char_start, char_end = chars.split('..')
+ char_start = int(char_start, 16)
+ char_end = int(char_end, 16)
+ additions = range(char_start, char_end+1)
+ else: # single character
+ additions = [int(chars, 16)]
+ return additions
+
# Setting reverse to true returns a dictionary that maps the values to sets of
# characters, useful for some binary properties. Otherwise, we get a
# dictionary that maps characters to the property values, assuming there's only
@@ -501,16 +561,8 @@ def parse_unicode_datafile(file_path, reverse=False):
chars = chars.strip()
prop = prop.strip()
- if ' ' in chars: # character sequence
- sequence = [int(ch, 16) for ch in chars.split(' ')]
- additions = [tuple(sequence)]
- elif '..' in chars: # character range
- char_start, char_end = chars.split('..')
- char_start = int(char_start, 16)
- char_end = int(char_end, 16)
- additions = range(char_start, char_end+1)
- else: # singe character
- additions = [int(chars, 16)]
+ additions = parse_unicode_seq(chars)
+
if reverse:
output_dict[prop].update(additions)
else:
@@ -519,6 +571,32 @@ def parse_unicode_datafile(file_path, reverse=False):
output_dict[addition] = prop
return output_dict
+def parse_sequence_age(file_path):
+ VERSION_RE = re.compile(r'E([\d\.]+)')
+ output_dict = {}
+ with open(file_path) as datafile:
+ for line in datafile:
+ comment = ''
+ if '#' in line:
+ hash_pos = line.index('#')
+ comment = line[hash_pos + 1:].strip()
+ line = line[:hash_pos]
+ line = line.strip()
+ if not line:
+ continue
+
+ chars = line[:line.index(';')].strip()
+
+ m = VERSION_RE.match(comment)
+ assert m, 'Version not found: unknown format: %s' % line
+ version = m.group(1)
+
+ additions = parse_unicode_seq(chars)
+
+ for addition in additions:
+ assert addition not in output_dict
+ output_dict[addition] = version
+ return output_dict
def parse_emoji_variants(file_path):
emoji_set = set()
@@ -543,7 +621,7 @@ def parse_emoji_variants(file_path):
def parse_ucd(ucd_path):
- global _emoji_properties, _chars_by_age
+ global _emoji_properties, _chars_by_age, _age_by_chars
global _text_variation_sequences, _emoji_variation_sequences
global _emoji_sequences, _emoji_zwj_sequences
_emoji_properties = parse_unicode_datafile(
@@ -555,6 +633,10 @@ def parse_ucd(ucd_path):
_chars_by_age = parse_unicode_datafile(
path.join(ucd_path, 'DerivedAge.txt'), reverse=True)
+ _age_by_chars = parse_unicode_datafile(
+ path.join(ucd_path, 'DerivedAge.txt'))
+ _age_by_chars.update(parse_sequence_age(
+ path.join(ucd_path, 'emoji-sequences.txt')))
sequences = parse_emoji_variants(
path.join(ucd_path, 'emoji-variation-sequences.txt'))
_text_variation_sequences, _emoji_variation_sequences = sequences
@@ -743,44 +825,12 @@ def check_cjk_punctuation():
break
assert_font_supports_none_of_chars(record.font, cjk_punctuation, name)
-def getPostScriptName(font):
- font_file, index = font
- font_path = path.join(_fonts_dir, font_file)
- if index is not None:
- # Use the first font file in the collection for resolving post script name.
- ttf = ttLib.TTFont(font_path, fontNumber=0)
- else:
- ttf = ttLib.TTFont(font_path)
-
- nameTable = ttf['name']
- for name in nameTable.names:
- if (name.nameID == 6 and name.platformID == 3 and name.platEncID == 1
- and name.langID == 0x0409):
- return str(name)
-
-def check_canonical_name():
- for record in _all_fonts:
- file_name, index = record.font
-
- psName = getPostScriptName(record.font)
- if record.psName:
- # If fonts element has postScriptName attribute, it should match with the PostScript
- # name in the name table.
- assert psName == record.psName, ('postScriptName attribute %s should match with %s' % (
- record.psName, psName))
- else:
- # If fonts element doesn't have postScriptName attribute, the file name should match
- # with the PostScript name in the name table.
- assert psName == file_name[:-4], ('file name %s should match with %s' % (
- file_name, psName))
-
-
def main():
global _fonts_dir
target_out = sys.argv[1]
_fonts_dir = path.join(target_out, 'fonts')
- fonts_xml_path = path.join(target_out, 'etc', 'fonts.xml')
+ fonts_xml_path = path.join(target_out, 'etc', 'font_fallback.xml')
parse_fonts_xml(fonts_xml_path)
@@ -793,8 +843,6 @@ def main():
check_cjk_punctuation()
- check_canonical_name()
-
check_emoji = sys.argv[2]
if check_emoji == 'true':
ucd_path = sys.argv[3]