Adds the registerSessionListener API to android.telecom.Log to allow
callbacks to occur when a session has been fully completed.
CP from internal branch.
Test: Manual Testing
Bug: 26571395
Change-Id: I70ebd6f432768a5d7bd8f3a0997b8e0ef335bb35
When users open and close QS customizer quickly, QSCustomizer#hide()
is not called because QSCustomizer#isCustomizing() returns false.
The isCustomizing() becomes true when the expand animation ends.
The hide() should be called even though the animation is ongoing.
Bug: 30545089
Test: manual - open and close QS customizer quickly
Change-Id: Ic483addfb6ae9da31c997fec7778e5acd718c353
The right way to expose this API is done via MediaBrowser.
Bug: b/28791287
Change-Id: I0a8a185934fd7aaa9f2b5eac7398955fa380060f
(cherry picked from commit b5fbb75aa26a6322b26b1289cc5d14a8c31acb34)
preferred_time_zones.xml is not referenced in any code and has been
deleted here.
TimeUtilsTest.java is broken / out of date and semi-duplicates code
in android.util.cts.TimeUtilsTest. It has been deleted here.
time_zones_by_country.xml file has not been updated since (at least)
2009.
Ideally this information would be updated as needed when the
timezone rule data is updated on device. This change just brings the
data up to date without addressing that issue. Given the apparent,
non-obvious, ordering requirements it may not be possible to use
zone1970.tab data directly.
---------------
Impact assessment:
At the time of writing time_zones_by_country.xml is used from:
Non-public methods:
android.util.TimeUtils.getTimeZones(String)
Public methods:
android.util.TimeUtils.getTimeZone(int, boolean, long, String)
android.util.TimeUtils.getTimeZonesWithUniqueOffsets(String)
Therefore there is some app / user benefit from updating it.
Within the framework, this affects:
telephony.ServiceStateTracker - in some circumstances when receiving
offset information from cell networks when better information is not
available.
There is some clockwork code affected that uses the calls for similar
purposes.
---------------
Notes on file formats / mapping the IANA source data:
The updated data was sourced from the IANA tzdata 2016g file
called zone1970.tab. The time_zones_by_country.xml file was manually
edited in a text editor using criteria detailed below.
The zone1970.tab file maps country codes (column 1) to a zone ID
(column 3). A country can be mapped to multiple zones. The zone.tab file
that was likely used in the past is similar in content and format. See
the zone.tab file header for details of the differences.
The time_zones_by_country.xml can have multiple entries for each
country, starting with a comment.
Comments exist for each (Country, Offset) pair. The name is
free-text, the offset is a non-DST offset for a zone as of 14th Oct
2016 using the 2016g data.
<!-- {Country name}, {offset from UTC} -->
Countries are listed in ASCII ascending order of the country code.
Within each country offsets are mostly ordered east to
west. An exception appears to be Australia. The data may have a
secondary order of "best match" (e.g. maybe by population). This might
be important for getTimeZone(int, boolean, long, String)) since it
returns the first match for a given offset, dst, country.
The timezone offset, transition information itself (offset, dst) is
pulled from the timezone rules data on the device, not this file.
The data is encoded for each (Country, Offset) pair by a sequence
of:
<timezone code="xx">{Olson ID}</timezone>
xx is the country code from column 1 in the zone1970.tab file, the
element content is the zone ID from column 3.
---------------
Notes on the changes made to time_zones_by_country.xml:
There are various changes in this commit associated with switching from
zone.tab to zone1970.tab as a data source: zone.tab uses different
Olson IDs due to the different criteria used by these files.
The offset in each case will be the same so will have no practical
effect on offsets / zone detection, though will affect the exemplar
location for the zone found.
The remaining changes reflect actual zone / offset changes that
have occurred.
When adding new zones or rearranging existing ones they have been
positioned so as not to modify the first zone for each country or
the first zone per offset because of the uncertainty about the
secondary ordering. This is to avoid the risk of now picking a
different zone for a country or {country + dst + offset}. This
has resulted in a couple of places where the ordering is
non-intuitive.
The zone names and the offset information contained in the comments was
checked semi-manually using other 2016g data, i.e. the base offset of
each zone was checked against output from a script that created a
TimeZone object from each Olson ID in the file and output the raw
(non-DST) offset.
---------------
Change specifics:
Changes made due to zone1970.tab vs zone.tab:
ANTIGUA AND BARBUDA
ANGUILLA
ANGOLA
ALAND ISLANDS
ARUBA
BOSNIA AND HERZEGOVINA
BURKINA FASO
BAHRAIN
BENIN
BOTSWANA
CONGO
CENTRAL AFRICAN REPUBLIC
CONGO
CAMEROON
DJIBOUTI
DOMINICA
ERITREA
ETHIOPIA
GABON
GRENADA
GUERNSEY
GAMBIA
GUINEA
GUADELOUPE
EQUATORIAL GUINEA
CROATIA
ISLE OF MAN
JERSEY
CAMBODIA
COMOROS
SAINT KITTS AND NEVIS
KUWAIT
CAYMAN ISLANDS
LAO PEOPLE'S DEMOCRATIC REPUBLIC
SAINT LUCIA
LIECHTENSTEIN
LESOTHO
MONTENEGRO
MADAGASCAR
MACEDONIA
MALI
NORTHERN MARIANA ISLANDS
MAURITANIA
MONTSERRAT
MALAWI
NIGER
OMAN
RWANDA
SAINT HELENA
SLOVENIA
SVALBARD AND JAN MAYEN
SLOVAKIA
SIERRA LEONE
SAN MARINO
SENEGAL
SOMALIA
SAO TOME AND PRINCIPE
SWAZILAND
TOGO
TANZANIA
UGANDA
UNITED STATES MINOR OUTLYING ISLANDS
HOLY SEE
SAINT VINCENT AND THE GRENADINES
VIRGIN ISLANDS
YEMEN
MAYOTTE
ZAMBIA
ZIMBABWE
---------
Changes due to new data:
ANTARCTICA
ARGENTINA
AUSTRALIA
BRAZIL
CANADA
CHINA
MICRONESIA
INDIA
MYANMAR
MEXICO
PAPUA NEW GUINEA
PALESTINE
RUSSIAN FEDERATION
UNITED STATES
UKRAINE
---------
Removal of NETHERLANDS ANTILLES (country code "an"):
"an" no longer present in the IANA data.
The country code is no longer in use.
https://en.wikipedia.org/wiki/ISO_3166-2:AN
New country entries for:
Saint Barthélemy
Caribbean Netherlands
Curaçao
Collectivity of Saint Martin
Sint Maarten
---------
Changes due to new data *and* with differences between zone1970.tab
and zone.tab:
GERMANY
South Sudan (entirely new)
VIET NAM
FRENCH SOUTHERN TERRITORIES
---------
Changes to comments or arrangement of existing entries due to non-DST
offset changes since the last update:
Antarctica/Mawson
Europe/Minsk
America/Resolute
Atlantic/Stanley
Asia/Pyongyang
America/Cancun
America/Grand_Turk
Pacific/Fakaofo
Europe/Istanbul
America/Caracas
Pacific/Apia
Bug: 25338903
Test: Build / CtsUtilTestCases
Change-Id: I87e3db795f55ddd92e7402459c5e97aa70b9301e
Developers of custom tiles should decide whether
the Drawable of their own tiles should be automatically mirrored.
So State#autoMirrorDrawable should be false by default.
Bug: 30930145
Test: manual - change to RTL language and open Quick Settings
Change-Id: Ia3fd8c2aeddb4a27b9ecfaaf52edbcce01fd7f48
Symptom:
Even though one process is executing one BroadcastReceiver,
it may be killed as one EMPTY process occasionally
Detail and sample:
https://code.google.com/p/android/issues/detail?id=221524
Root cause:
app.curReceiver can only remember the last running.
If an application is both receiving FG and BG broadcast,
when one is finished, app.curReceiver becomes null,
the state of application becomes EMPTY.
Solution:
save all running receivers at ProcessRecord
Change-Id: I01b8813af652a8c434be7de0678dc06f99831ae0
Signed-off-by: yangzhenyu <yangzhenyu@xiaomi.com>
frameworks/base/tools/aapt2/util/Files.cpp:81:21: warning: Null pointer
passed as an argument to a 'nonnull' parameter
while ((entry = readdir(dir))) {
Bug: None.
Test: Warning no longer appears.
Change-Id: If242598405e995928378ce317a2e909654e1e985
frameworks/base/tools/aapt/Images.cpp:845:17: warning: Assigned value is
garbage or undefined
row += bpp;
Bug: None.
Test: The warning is gone.
Change-Id: Idf4623d2510111a9188ed39922e109a8db225c76
frameworks/base/libs/androidfw/ResourceTypes.cpp:742:46: warning: Result
of 'calloc' is converted to a pointer of type 'char16_t *', which is
incompatible with sizeof operand type 'char16_t **'
mCache = (char16_t**)calloc(mHeader->stringCount,
sizeof(char16_t**));
frameworks/base/libs/androidfw/ResourceTypes.cpp:4359:28: warning:
Potential leak of memory pointed to by 'set'
return NO_MEMORY;
Bug: None
Test: Builds without the aforementioned warnings.
Change-Id: I1f84c1b9f4cba05f5cc7c3ae9fec1a07bc9cd8fe
If a device isn't voice capable, it shouldn't show the emergency
option.
Test: use tablet which isn't voice capable, insert indian sim and
make sure no emergency option is displayed in global actions.
Bug: 31953703
Change-Id: I351e87320f3ffec76d1c1fc5aac78e5c48c0ac54
The instance of Dnd tile leaks when user taps the edit button
of Quick Settings. To fix this issue, QSTile#destroy should be
called when the tile is no longer needed.
Bug: 32103239
Test: manual - go to Quick Settings -> Edit repeatedly
Change-Id: I9bc9ee836be5c8e46eb1ccd202bd5cc50070ef47
idmap --scan is executed as a part of the pre-loading in ZygoteInit.
The pre loading is executed in parallel for each supported architecture
(32/64 bit). This will cause a race condition in the creation of the
overlays.list file and the idmap files for the system overlays.
Apply flock on overlays.list to prevent the file from being thrown away
and recreated when it is in use by another Zygote.
Bug: 28032298
Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
Location permission is needed for apps to do WiFi scans
and if location is globally off no app can scan too. It
is possible that an OEM does not want location to be on
until the user agrees to that or a device owner can turn
location off before setup. As a result setup wizard
cannot show the WiFi networks preventing the user form
logging in. This change allows the setup wizard component
to perform WiFi scans even if location is globally off.
bug:29577364
Change-Id: I6b7c5dca76b8c8ee6051ea2dad3cec6879683524
cherry-picked from b07f1409045091476e5296f9b0dd41c8712fe49a
Before attempting to retrieve a carrier entitlement setting, first make
sure we have a carrier config manager and if we do have a carrier config
manager, the config it holds is not null.
Bug: 31929638
Test: unittests coming in follow on CL
Change-Id: Iee476c476cb3de109cdccbd955b7fb986dd4267b
Move over the Runnable Class into android.telecom and turn on the
framework's usage in Telecom.
Test: All Telecom unit tests pass. Manual Log testing has also been
confirmed to be working as it did before.
Bug: 26571395
Change-Id: If7e2036c746c5a953f3a77e2d625a423ce5bf8f3
Whitelist free short code batch 2016 Q1 - Android Partner Engineering.
Short codes for Bahrain, Vietname and Slovakia are for Direct carrier
billing, USA and Brazil short codes are used by Google Allo and Italy
short code change is due to government regulation.
Test: manual - uploaded modified file onto test device and tested
sending sms to changed shortcodes to verify behaviour.
Bug: 30212667
Change-Id: If4fe0605d4ad5aafad9ce9b9670526d40ad88f45
Signed-off-by: Matthew Campbell <matthewca@google.com>
When Out Of Band info is provided, first time we learn about
device is when it's state is changed to "Bonding". This currently cause
this event to be discarded and pairing fails. Instead, we should add
CachedDevice object for newly added device.
Bug: 30188629
Change-Id: I4046bfe30e8bf32b888f608ac06d5041e2999dc9