Skip to content

Commit c596b71

Browse files
committed
Merge tag 'android-4.3_r2.1' into cm-10.2
Android 4.3 release 2.1
2 parents bf5d975 + 77aadd2 commit c596b71

File tree

317 files changed

+1002
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+1002
-170
lines changed

README.android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
URL: http://code.google.com/p/libphonenumber/
2-
Version: 4.9 (r473)
2+
Version: 5.3 (r552)
33
License: Apache 2
44
Description: Google Phone Number Library.
55
Local Modification:

java/release_notes.txt

Lines changed: 132 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,113 @@
1+
Jan 08, 2013: libphonenumber-5.3
2+
* Code changes:
3+
- Handling UAN numbers in Argentina better when dialling them locally from a
4+
mobile
5+
* Metadata changes:
6+
- Updated metadata for region code(s):
7+
BE, BW, CL, CN, CO, EH, KW, MA, ML, NG, PL, SY, ZA, ZM
8+
- New geocoding data for country calling code(s): 32 (en, fr, nl)
9+
- Updated geocoding data for country calling code(s): 27 (en), 86 (en, zh)
10+
11+
Dec 06, 2012: libphonenumber-5.2.2
12+
* Metadata changes:
13+
- New metadata for region code(s): EH
14+
- Updated metadata for region code(s): BR, CL, CR, IN, MA, PG, PK, RO
15+
- New geocoding data for country calling code(s): 241 (en)
16+
17+
Nov 26, 2012: libphonenumber-5.2.1
18+
* Metadata changes:
19+
- Updated metadata for region code(s):
20+
AE, AW, BF, CN, DE, JO, KE, KH, LT, MM, MU, NG, RW, SR, TR, VU
21+
- New geocoding data for country calling code(s): 359 (bg, en)
22+
23+
Oct 10, 2012: libphonenumber-5.2
24+
* Code changes:
25+
- Adds isNumberGeographical() method.
26+
- Adds getRegionCodesForCountryCode() method.
27+
- Fixing issue with getSupportedGlobalNetworkCallingCodes()
28+
[http://code.google.com/p/libphonenumber/issues/detail?id=202]
29+
- Ensures that returned collections are unmodifiable where necessary
30+
[there is a very slight risk that this may break existing users who were relying on being able
31+
to modify these collections, but doing so would be breaking lots of other assumptions that this
32+
library makes - if you need to modify any affected collections you must copy them first]
33+
* Metadata changes:
34+
- Updated metadata for region code(s): DE, GR, HR, OM, SB, ZA
35+
- Removed metadata for region code: AN (Netherlands Antilles)
36+
- Updated geocoding data for country calling code(s): 30 (el, en)
37+
38+
Sep 27, 2012: libphonenumber-5.1.4
39+
* Metadata changes:
40+
- Updated metadata for region code(s): AU, EC, KH, LB, TN, US
41+
42+
Sep 17, 2012: libphonenumber-5.1.3
43+
* Metadata changes:
44+
- Updated metadata for region code(s): EG, LA, LB, LI, PY
45+
- Updated metadata for non-geographical calling codes: 800, 808, 888, 979
46+
- Updated geocoding data for country calling code(s): 98 (en), 1 (en)
47+
48+
Sep 11, 2010: libphonenumber-5.1.2
49+
* Bug fix:
50+
- Fixing regression in AsYouTypeFormatter where it no longer worked for numbers entered in national
51+
format for countries with no national prefix, e.g. Spain.
52+
53+
Sep 5, 2010: libphonenumber-5.1.1
54+
* Code changes:
55+
- Added better logging/exception handling for catching cases where metadata is invalid/missing.
56+
57+
Sep 3, 2012: libphonenumber-5.1
58+
* Code changes:
59+
- Inserting a space after the national prefix in the AsYouTypeFormatter when formatting numbers in
60+
national format, if the formatting rules for that country dictate that a space is appropriate.
61+
- Format emergency numbers and short-codes as a block in the AsYouTypeFormatter.
62+
* Metadata changes:
63+
- Updated metadata for region code(s): BF, BG, DZ, GA, IT, JP, KW, PF
64+
65+
Aug 20, 2012: libphonenumber-5.0.3
66+
* Metadata changes:
67+
- New alternate formatting data for country calling code(s): 43
68+
- Updated metadata for region code(s): AT, BF, JO, NG, RU, SL
69+
- New geocoding data for country calling code(s): 62 (en, id), 98 (fa)
70+
71+
Aug 07, 2012: libphonenumber-5.0.2
72+
* Metadata changes:
73+
- Updated metadata for region code(s):
74+
BF, CN, DJ, IL, JO, KH, KZ, MA, MT, MV, MY, NC, NG, SD, SK, SN, TL, UZ
75+
- New geocoding data for country calling code(s): 7 (ru), 98 (en)
76+
- Updated geocoding data for country calling code(s): 7 (en)
77+
78+
July 26th, 2012: libphonenumber-5.0.1
79+
* Metadata changes
80+
- CL, DE ,IN, KR, US
81+
- New geocoding data for country calling codes 40, 57, 66, 82, 91.
82+
- Fixed comments for 353 (IE).
83+
84+
July 12th, 2012: libphonenumber-5.0
85+
* Code changes:
86+
- Support for alternate formats when finding phone numbers.
87+
- Allowing two-digit numbers to be parsed if they are entered in national-format with no
88+
punctuation
89+
* Metadata changes
90+
- IL, GA
91+
* Other
92+
- Reflowed this file to 100 char width to make it unambiguous as to what the standard should be.
93+
94+
July 6th, 2012: libphonenumber-4.9.1
95+
* Metadata changes
96+
- AR, BA, BF, CR, DE, EC, ES, KZ, MK, NC, NG, PF, SB, UZ, non-geo entity 882
97+
- Geocoding data updates for country calling codes 54 (AR) and 81 (JP), new data for 234 (NG)
98+
199
June 21st, 2012: libphonenumber-4.9
2100
* Bug fix
3-
- formatInOriginalFormat fixed not to add a star sign if it was not present
4-
originally.
101+
- formatInOriginalFormat fixed not to add a star sign if it was not present originally.
5102
* Metadata changes
6103
- BF, CZ, ES, KW
7-
- Non-geographical entities with calling code 882 (BebbiCell, Maritime
8-
Communications, Oration Technologies, Telespazio and Thuraya)
104+
- Non-geographical entities with calling code 882 (BebbiCell, Maritime Communications, Oration
105+
Technologies, Telespazio and Thuraya)
9106
- Geocoding data updates for country calling codes 221, 224, 226, 242, 244, 245
10107
* Functionality changes:
11-
- Minimum allowed length for a national significant number (NSN) when parsing
12-
changed from 3 to 2.
13-
- Support parsing of RFC3966-formatted strings with an isdn-subaddress or extra
14-
parameters specified.
108+
- Minimum allowed length for a national significant number (NSN) when parsing changed from 3 to 2.
109+
- Support parsing of RFC3966-formatted strings with an isdn-subaddress or extra parameters
110+
specified.
15111
- Allow soft hyphen to appear in phone numbers (\u00AD)
16112
* Testing changes:
17113
- Add extra unit tests for non-geographical phone number entities
@@ -117,33 +213,31 @@ November 24th, 2011: libphonenumber-4.3
117213
November 10th, 2011: libphonenumber-4.2
118214
* Code changes
119215
- Providing an "exact match" isEmergencyNumber method
120-
- Improvement to PhoneNumberMatcher: requires national prefix to be present
121-
when matching national-format numbers, unless matching for a region where it
122-
is explicitly marked in the metadata that they may be omitted. Applies to
123-
leniency level VALID and higher.
216+
- Improvement to PhoneNumberMatcher: requires national prefix to be present when matching
217+
national-format numbers, unless matching for a region where it is explicitly marked in the
218+
metadata that they may be omitted. Applies to leniency level VALID and higher.
124219
- Change formatNumberForMobileDialing not to modify the phoneNumber passed in.
125220

126221
* Metadata changes
127222
- Emergency numbers added for all remaining countries
128-
- Collected data on which numbers we format with a national prefix are
129-
commonly written without one and added this
223+
- Collected data on which numbers we format with a national prefix are commonly written without one
224+
and added this
130225
- Updates for AR, AT, BH, CZ, GR, IR, KM, LT, MX, PT, SE, SO, UG
131226
- Addition of SX (Sint Maarten)
132227

133228
October 19th, 2011: libphonenumber-4.1
134229
* Code changes
135-
- Update code and metadata for countries with IDD "8~10" to accept phone
136-
numbers where the "~" is omitted.
137-
- Modify formatInOriginalFormat to use raw_input (when present) when the number
138-
is considered as invalid by the library.
139-
- Add ShortNumberUtil to deal with international short phone numbers, such as
140-
short codes and emergency numbers.
230+
- Update code and metadata for countries with IDD "8~10" to accept phone numbers where the "~" is
231+
omitted.
232+
- Modify formatInOriginalFormat to use raw_input (when present) when the number is considered as
233+
invalid by the library.
234+
- Add ShortNumberUtil to deal with international short phone numbers, such as short codes and
235+
emergency numbers.
141236
- Increase the maximum phone-number length accepted when parsing (now set to
142237
16).
143238

144239
* Metadata changes
145-
- Updates: BF, BN, CN, DE, DK, DO, FR, IN, KI, KW, MC, MD, ML, PA, QA, SB, UK,
146-
WS
240+
- Updates: BF, BN, CN, DE, DK, DO, FR, IN, KI, KW, MC, MD, ML, PA, QA, SB, UK, WS
147241
- Emergency number information also added to: AE, AF, AL, AM, AR, AT, AU, BA,
148242
BB, BD, BE, BG, BH, BO, BR, BY, CA, CH, CL, CN, CO, CR, CY, CZ, DE, DJ, DK,
149243
DO, DZ, EC, EE, EG, ES, FI, FJ, FO, FR, GB, GE, GF, GH, GI, GL, GR, GT, GY,
@@ -155,10 +249,9 @@ October 19th, 2011: libphonenumber-4.1
155249

156250
October 6th, 2011: libphonenumber-4.0
157251
* Code changes
158-
- New function formatNumberForMobileDialing, which attempts to format a number in
159-
such a way that the call can be connected from a mobile phone. If this is
160-
impossible, for example for numbers that cannot be internationally dialled,
161-
then an empty string is returned.
252+
- New function formatNumberForMobileDialing, which attempts to format a number in such a way that
253+
the call can be connected from a mobile phone. If this is impossible, for example for numbers
254+
that cannot be internationally dialled, then an empty string is returned.
162255
- Fallback functionality to English for non-CJK languages for geocoding
163256

164257
* Metadata changes
@@ -172,8 +265,7 @@ September 13th, 2011: libphonenumber-3.9
172265
- Enable AsYouTypeFormatter to handle long IDD and NDD.
173266
- Allow the presence of an IDD following a +.
174267
- Fix formatting of phone numbers which contain only 0s in the national number.
175-
- Refactored some code in geocoding including AreaCodeMap and the storage
176-
strategies.
268+
- Refactored some code in geocoding including AreaCodeMap and the storage strategies.
177269

178270
* Metadata changes
179271
- Updates: AM, BE, BH, BJ, BR, BT, BZ, CI, CL, CN, DE, DK, DM, DZ, EC, EG, FJ,
@@ -188,16 +280,14 @@ August 11th, 2011: libphonenumber-3.8
188280
* Code changes
189281
- Fix to demo to not throw null-ptr exceptions for invalid NANPA numbers
190282
- Fixed AYTF to not accept plus signs in the middle of input
191-
- PhoneNumberMatcher improvements - added STRICT_GROUPING and EXACT_GROUPING
192-
levels, numbers followed/preceded by a currency symbol will not match,
193-
multiple numbers separated by phone-number punctuation will now match. ", "
194-
is no longer accepted as an extension symbol when matching, only when
195-
parsing. "x" is only accepted as a carrier code or extension marker, not
196-
otherwise.
197-
- Changes to handling of leading zeroes - these will not be silently ignored
198-
anymore, but will be stored as part of the number.
199-
- PhoneNumberOfflineGeocoder - new method to get the description of a number that assumes
200-
the validity of the number has already been checked and will not re-verify it.
283+
- PhoneNumberMatcher improvements - added STRICT_GROUPING and EXACT_GROUPING levels, numbers
284+
followed/preceded by a currency symbol will not match, multiple numbers separated by phone-number
285+
punctuation will now match. ", " is no longer accepted as an extension symbol when matching, only
286+
when parsing. "x" is only accepted as a carrier code or extension marker, not otherwise.
287+
- Changes to handling of leading zeroes - these will not be silently ignored anymore, but will be
288+
stored as part of the number.
289+
- PhoneNumberOfflineGeocoder - new method to get the description of a number that assumes the
290+
validity of the number has already been checked and will not re-verify it.
201291
- Split geocoding US binary data into multiple files.
202292

203293
* Metadata changes
@@ -455,16 +545,16 @@ August 16th, 2010
455545
August 4th, 2010
456546
* Further improve startup performance
457547
- Preload no country specific metadata at startup.
458-
- Stop creating the file containing mapping from country calling code to region code
459-
and loading it at startup; instead, do the initialization in PhoneNumberUtil.
548+
- Stop creating the file containing mapping from country calling code to region code and loading
549+
it at startup; instead, do the initialization in PhoneNumberUtil.
460550

461551
July 31th, 2010
462552

463553
* Improve startup performance
464554
- Separate generated metadata binary file to one file per region
465555
- Preload US at start up, and load other region at the time when needed
466-
- Create a file containing mapping from country calling code to region code,
467-
and load it at startup
556+
- Create a file containing mapping from country calling code to region code, and load it at
557+
startup
468558
- Same change also applied to unittests
469559

470560
July 30th, 2010
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (C) 2012 The Libphonenumber Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/* This file is automatically generated by {@link BuildMetadataProtoFromXml}.
18+
* Please don't modify it directly.
19+
*/
20+
21+
package com.android.i18n.phonenumbers;
22+
23+
import java.util.HashSet;
24+
import java.util.Set;
25+
26+
public class AlternateFormatsCountryCodeSet {
27+
// A set of all country codes for which data is available.
28+
static Set<Integer> getCountryCodeSet() {
29+
// The capacity is set to 8 as there are 6 different country codes,
30+
// and this offers a load factor of roughly 0.75.
31+
Set<Integer> countryCodeSet = new HashSet<Integer>(8);
32+
33+
countryCodeSet.add(43);
34+
countryCodeSet.add(44);
35+
countryCodeSet.add(49);
36+
countryCodeSet.add(55);
37+
countryCodeSet.add(61);
38+
countryCodeSet.add(81);
39+
40+
return countryCodeSet;
41+
}
42+
}

0 commit comments

Comments
 (0)