Commit Graph

344804 Commits

Author SHA1 Message Date
Tyler Gunn
f2e08b4c2c Ensure self-managed calls use voip audio mode.
Although Telecom ensures that new calls use voip audio mode, the default
value from a Connection would override the Telecom default.

Bug: 76362663
Test: Modify test app to ensure it does not set voip audio mode, ensure
Telecom uses voip audio mode for new calls.

Change-Id: Ie6477659cf6dabd08f371d4958ece1d258cd3106
2018-05-24 10:44:44 -07:00
Treehugger Robot
00c0a5bb23 Merge "PacProcessor: Include libpac as a JNI_SHARED_LIBRARY." 2018-05-22 12:24:33 +00:00
Treehugger Robot
59fa1bcf69 Merge "Use AAPT2 for modules with manifest validation errors" 2018-05-21 19:53:38 +00:00
Colin Cross
b3c1814b98 Use AAPT2 for modules with manifest validation errors
Add LOCAL_AAPT_FLAGS += --warn-manifest-validation to the modules
that have manifests that AAPT2 can't parse.

Bug: 79755007
Test: m checkbuild
Change-Id: I357fcba75909495ba2b46b9ed1b532e65fee3fe1
2018-05-21 19:52:43 +00:00
Colin Cross
61f92e7e13 Merge changes from topic "aapt2-warn-manifest-validation"
* changes:
  AAPT2: treat manifest validation errors as warnings when asked
  AAPT2: Better error messages for ManifestFixer
  AAPT2: Differentiate between Android and Java package names
2018-05-21 19:52:24 +00:00
Izabela Orlowska
533c09b01b AAPT2: treat manifest validation errors as warnings when asked
Bug: 65670329
Test: updated
Change-Id: Ic554cc20134fce66aa9ddf8d16ddffe0131c50e9
Merged-In: Ic554cc20134fce66aa9ddf8d16ddffe0131c50e9
(cherry picked from commit ad9e1324ff)
2018-05-21 19:51:50 +00:00
Adam Lesinski
b2b20f26db AAPT2: Better error messages for ManifestFixer
AAPT2 will now print the XML hierarchy where it found an unexpected
element.

Test: make aapt2_tests
Change-Id: Iac7918b2f344fab874f0a3e7aa9c6936ecde8913
Merged-In: Iac7918b2f344fab874f0a3e7aa9c6936ecde8913
(cherry picked from commit ed37f4842a)
2018-05-21 19:51:42 +00:00
Adam Lesinski
ef506c73bb AAPT2: Differentiate between Android and Java package names
Android package names are more strict (ASCII only) than Java package names.
Also fixed an issue where trailing underscores were disallowed in Android
package names.

(cherry picked from commit 96ea08f1e7)

Also includes part of I357fb84941bfbb3892a8c46feb47f55b865b6649 to remove
usage of FindNonAlphaNumericAndNotInSet.

Bug: 79481102
Test: make aapt2_tests
Change-Id: I1052e9e82b6617db6065ce448d9bf7972bb68d59
Merged-In: I1052e9e82b6617db6065ce448d9bf7972bb68d59
2018-05-21 19:48:36 +00:00
Treehugger Robot
1e0a5d397d Merge "Change ownership of AAPT2 and libandroidfw" 2018-05-21 19:46:00 +00:00
Jordan Liu
d25198f62f Merge "Change directory where apns-conf.xml is stored" 2018-05-21 19:06:54 +00:00
Treehugger Robot
923208e8c9 Merge "ActivityManager: Fix slow-app ANR dumping" 2018-05-21 16:59:17 +00:00
Niklas Lindgren
d3904f1ca3 Change directory where apns-conf.xml is stored
When apns are downloaded OTA they are stored directly under data/misc
by system server. Files created there gets assigned with file context
system_data_file which TelephonyProvider cannot read.

In order to make sure that downloaded apns gets a file context TelephonyProvider
can read we create an apns sub directory in init where radio_data_file:s are
created. The data path to where apns-conf is stored is here changed from /data/misc/
to /data/misc/apns/.

This change is aligned with other files that ConfigUpdateInstallReceiver writes.

Test: Trigger Apn update via intent UPDATE_APN_DB
Go to settings/apn-list and verify that newly downloaded are present
Bug: 79948106

Change-Id: I5a9ec262bfbac291cca9fee5accf93eb6c06f253
2018-05-21 18:43:44 +02:00
Treehugger Robot
b5dda0e316 Merge changes from topic "apf-read-ram"
* changes:
  apf: Add counters for dropped / passed packets
  Add support for reading a snapshot of the APF data
2018-05-21 15:33:28 +00:00
Tyler Gunn
b1b864cee2 Merge "Require READ_CALL_LOG permission to see phone numbers in phone state." 2018-05-19 00:13:15 +00:00
Tyler Gunn
84dad9565f Require READ_CALL_LOG permission to see phone numbers in phone state.
Incoming and outgoing call phone numbers are visible in the phone state
broadcast and via the PhoneStateListener.  To enhance user privacy, change
to require the READ_CALL_LOG permission in order to receive the call
phone numbers.

This means to see phone numbers:
1. android.intent.action.PHONE_STATE - requires READ_PHONE_STATE and
READ_CALL_LOG permission.
2. PhoneStateListener#onCallStateChanged - now required READ_CALL_LOG
permission.

To support this new behavior, added sendBroadcastAsUserMultiplePermissions
method to context to allow sending the broadcast to all users while
requiring the two permissions.

Bug: 78650469
Test: Created PHONE_STATE broadcast receiver in test app and verified that
when no permissions are granted, the phone number is empty for incoming
and outgoing calls.
Test: Granted Phone state permission to test app and verified that phone
number is not populated.
Test: Granted test app read call log permission and verified that phone
number is populated.
Test: Created PhoneStateListener in test app and verified that when no
permissions are granted, phone number is empty for incoming and outgoing.
calls.
Test: Granted read call log permission to test app and verified that both
the incoming and outgoing numbers are populated.

Change-Id: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
2018-05-18 14:37:43 -07:00
Xiangyu/Malcolm Chen
54bd56d6c5 Merge "Add carrier config for partial sms raw message expiration." 2018-05-18 21:05:55 +00:00
Xiangyu/Malcolm Chen
147dc32b0b Merge "Fix UiccSlotInfo equals method." 2018-05-18 21:05:43 +00:00
Adam Lesinski
89794158a1 Change ownership of AAPT2 and libandroidfw
toddke@ is now the new owner of these projects.

Exempt-From-Owner-Approval: setting new owners
Test: none
Change-Id: Ie92b020e0ba063f48ce8a76ebaef768fe0d554f1
Merged-In: Ie92b020e0ba063f48ce8a76ebaef768fe0d554f1
(cherry picked from commit a95e841846)
2018-05-17 22:13:11 -07:00
Remi NGUYEN VAN
646dfc7703 Merge changes Ieb0a5d24,I44df6668
* changes:
  Fix SntpClientTest failures with no active network
  Allow specifying a network for SNTP time sync
2018-05-18 01:44:44 +00:00
nharold
71c11daaf5 Merge "Add toString() method to PhysicalChannelConfig" 2018-05-18 01:15:48 +00:00
Malcolm Chen
b668535a69 Add carrier config for partial sms raw message expiration.
Everytime at boot-up, we check Sms raw table, and delete the rows
with any partial message that is too old. By default the expiration
age is 30 days, but we want to make it configurable.

Bug: 77910620
Test: sanity-test
Change-Id: Ibd2374324be5513cbd09c04889e7b96051c26fb4
Merged-In: Ibd2374324be5513cbd09c04889e7b96051c26fb4
2018-05-17 16:49:12 -07:00
Malcolm Chen
9fd71f8ec5 Fix UiccSlotInfo equals method.
In UiccSlotInfo#equals method, it's comparing Strings incorrectly.

Bug: 78033760
Test: GTS test
Change-Id: I4fed0a70ee0ef06bcf7a1af544e6aebced31d9c2
Merged-In: I4fed0a70ee0ef06bcf7a1af544e6aebced31d9c2
2018-05-17 16:30:32 -07:00
Nathan Harold
c50d40aa9f Add toString() method to PhysicalChannelConfig
We need to be able to print the PhysicalChannelConfig
for debugging/dumping, so adding a toString() method
to print in a format that we can easily digest and
is consistent with other Telephony log formatting.

Bug: 78791811
Test: manual / TelephonyDebugMenu
Merged-In: Ieb12f78a821369072ca9f03d28b28759836f84b4
Change-Id: Ieb12f78a821369072ca9f03d28b28759836f84b4
(cherry picked from commit 2636dd435a)
2018-05-17 11:48:53 -07:00
Nicolas Geoffray
d27a9f4465 Merge "Add a new dalvik.vm.jitpthreadpriority option." 2018-05-17 15:08:01 +00:00
Remi NGUYEN VAN
6657d42602 Fix SntpClientTest failures with no active network
The last change is using getActiveNetwork to run the queries, which
results in an NPE if there is no network on the device. Using network 0
causes no socket tagging and allows queries to the local test SNTP
server to go through as previously.

Also migrating to JUnit4 and moving mServer and mClient initializers to
setUp().

Test: SntpClientTest now passes
Change-Id: Ieb0a5d247129bcad89c1add0e9c1c504f516e2a9
2018-05-17 10:25:05 +09:00
Treehugger Robot
6ca9d3d97e Merge "Add constant for PhysicalChannelConfig UNSOL" 2018-05-17 01:08:13 +00:00
Eric Schwarzenbach
45ed35e577 Add constant for PhysicalChannelConfig UNSOL
Bug: 78791811
Test: compilation

Change-Id: I48404342daaaf74d81386aa64cac99ae1a5dfa8b
(cherry picked from commit ef44f95cd4)
2018-05-16 16:24:28 -07:00
Treehugger Robot
87dc8d6576 Merge "Disable AAPT2 for modules that use missing features" 2018-05-16 19:31:42 +00:00
Colin Cross
940b98ee4e Disable AAPT2 for modules that use missing features
Use LOCAL_USE_AAPT2 := false to disable AAPT2 for modules that
use features that are not implemented in AAPT2.

Fixes:
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:46: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:82: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_bad/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_good/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/packages/CtsShim/build/shim/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/tests/ActivityTests/AndroidManifest.xml:42: error: unexpected element <preferred> found in <manifest><application><activity>.
out/target/common/obj/APPS/CtsShimPriv_intermediates/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/core/tests/coretests/AndroidManifest.xml:26: error: unexpected element <meta-data> found in <manifest><permission>.
...

Bug: 79755007
Test: m FORCE_AAPT2=true java
Change-Id: I393b697c521ab2a4fbc00b29a43aed6b4729b9a8
2018-05-16 09:34:26 -07:00
Nicolas Geoffray
24934a9c33 Add a new dalvik.vm.jitpthreadpriority option.
To dynamically play with JIT thread priorities.

bug: 79570024
Test: m
Change-Id: I84c691fb57b37e699429b9f511b2e235259d718a
2018-05-16 17:22:37 +01:00
Pete Gillin
ca3450b524 Merge "Stop using Arrays.checkOffsetAndCount." 2018-05-16 13:04:13 +00:00
Kurt Marcinkiewicz
7a4ff6447d Allow specifying a network for SNTP time sync
Permits syncing over a specific network instead of the default for
the process. This was causing an issue with Android Wear devices
paired with iOS where the default network is bluetooth
(see b/32663274).

This CL is in support of ag/3776564

Bug: 32663274

Test: adb shell am instrument -e class android.net.SntpClientTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
(cherry-pick of pi-dev Ic9fc169cf75457810d4992121d85d7642e350b90)
Merged-In: I339c77063c72a9d76a5c4cb17052e20fb6e045a6
Merged-In: I8dfd1cad99c63efdc14c174c19f094a61cdfc44f

Change-Id: I44df66688292b144ec7dfcdd9ae5d82489f82774
2018-05-16 16:43:43 +09:00
Nan Zhang
001d2aed31 Merge "Update Android.bp for api-stubs in order to do api-check." 2018-05-16 01:40:53 +00:00
Nan Zhang
39d2d18b80 Update Android.bp for api-stubs in order to do api-check.
Bug: b/78034256
Test: m clean && m checkapi

Change-Id: Ifbda8825f95e26bb79aac9b1bb73c5e43f12d1fb
Merged-In: Ifbda8825f95e26bb79aac9b1bb73c5e43f12d1fb
2018-05-15 15:47:01 -07:00
Treehugger Robot
6d78fe0385 Merge "Fix errors caught by aapt2" 2018-05-15 22:21:56 +00:00
Treehugger Robot
acbd94d76f Merge "Convert to Soong" 2018-05-15 19:35:04 +00:00
Xiangyu/Malcolm Chen
272769c41a Merge "Unhide constructors of DataService and NetworkService." 2018-05-15 18:54:50 +00:00
Jordan Liu
1c0ef18c39 Merge "Update documentation of ApnSetting with V5 example" 2018-05-15 18:16:33 +00:00
Narayan Kamath
5018208eb6 PacProcessor: Include libpac as a JNI_SHARED_LIBRARY.
libpac is only used by the PacProcessor, so this prevents us
from installing both the 32 and 64 bit versions of the library
on the system partition.

Test: make

Change-Id: I61033ba66116cf21f5518657df8fcd9fa46cd1b5
2018-05-15 11:23:53 +01:00
Colin Cross
489e9a7424 Fix errors caught by aapt2
Fixes:
frameworks/base/tests/LotsOfApps/AndroidManifest.xml:10: error: attribute 'android:name' in <activity> tag must be a valid Java class name.
frameworks/base/tests/LotsOfApps/AndroidManifest.xml:17: error: attribute 'android:name' in <activity> tag must be a valid Java class name.
frameworks/base/tests/LotsOfApps/AndroidManifest.xml:24: error: attribute 'android:name' in <activity> tag must be a valid Java class name.
...

Bug: 79481102
Test: m java FORCE_AAPT2=true
Change-Id: Ib00f277d251497942ad53f1ba1f8f5e12b2f7ba9
2018-05-14 22:42:30 -07:00
Jiyong Park
be7959bb10 Merge "Add api txt files for nfc-extras" 2018-05-15 05:30:41 +00:00
Bernie Innocenti
ab30db7072 apf: Add counters for dropped / passed packets
ApfFilter maintains separate counters for each reason why a packet was
passed or dropped by the filter logic.

There's also a total which should match the individual counters,
*unless* the APF interpreter aborted execution early due to an illegal
instruction or an out-of-bounds access.

Test: both on APFv2 and APFv4-capable device:
	runtest -x tests/net/java/android/net/ip/IpClientTest.java
	runtest -x tests/net/java/android/net/apf/ApfTest.java
	manual tests connected to an AP
Bug: 73804303
Change-Id: I54b17fcbb95dfaea5db975d282314ce73d79d6ec
Merged-In: I54b17fcbb95dfaea5db975d282314ce73d79d6ec
(cherry picked from commit 3cc40ea6c5)
2018-05-15 14:21:54 +09:00
Bernie Innocenti
40b43542c1 Add support for reading a snapshot of the APF data
No functional change yet, since startReadPacketFilter() has no callers
at this time.  In the future, this new hook will be used to take
periodic snapshots of the APF memory (for instance, when the device
wakes up).

Design note: WifiStateMachine grabs the APF data synchronously
from another thread, but then the data snapshot is delivered to IpClient
via an asynchronous reply, following the same pattern used by other
commands. This means that there's no (practical) way for IpClient to
read the APF data just before replacing the APF program.

Even with this limitation, it's still possible to reliably decode packet
counters and compute deltas relative to the last snapshot, provided that
the address range isn't cleared when installing a new APF filter.

Bug: 73804303
Test: Manual - called the new code and inspected 'dumpsys wifi' output.
Change-Id: Ia0923d71cf3ee4128fb1c381557316300adac1a3
Merged-In: Ia0923d71cf3ee4128fb1c381557316300adac1a3
Merged-In: I3b940f5a3b795f85d244882eaa7eca56bd9e167d
Merged-In: I283fd5fb71f8a679911e58c487a4ac12a5190049
(cherry picked from commit bb2193bf58)
2018-05-15 14:21:30 +09:00
nharold
05a16e8a04 Merge "Use INetd Constant for IpSec Interface Prefix" 2018-05-15 02:46:05 +00:00
Dan Willemsen
4888b1f6f0 Convert to Soong
See build/soong/README.md for more information.

Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
2018-05-14 16:47:02 -07:00
Malcolm Chen
1d7e446f6e Unhide constructors of DataService and NetworkService.
DataService and NetworkService are System level classes. We shouldn't
hide their constructors otherwise their System level sub-class
can't be instantiated properly.

Test: gts
Bug: 77531655
Change-Id: I1a58b4857dbcf939ac124e20eb0a801ad5a9b597
Merged-In: I1a58b4857dbcf939ac124e20eb0a801ad5a9b597
2018-05-14 23:27:42 +00:00
Colin Cross
5d58a302e3 Merge "Fix errors caught by aapt2" 2018-05-14 22:42:03 +00:00
Colin Cross
ed90a673d4 Merge "Fix errors caught by aapt2" 2018-05-14 22:41:42 +00:00
Nathan Harold
4fd7c322e7 Use INetd Constant for IpSec Interface Prefix
Convert to using a constant in INetd to ensure
that there is a consistent tunnel prefix  between
Java and native code.

Bug: 74560705
Test: atest FramworksNetTest; atest CtsNetTestCases
Change-Id: Ida233aac2e6c6b26567463964e0ebac9d52eff1e
(cherry picked from commit 649df5e07a)
2018-05-14 13:14:10 -07:00
Jordan Liu
249d3dcb11 Update documentation of ApnSetting with V5 example
ApnSetting#fromString has had 2 version bumps since the documentation
was written. Users of the resource overlay can mix and match versions,
so this documentation gives an example of a V5 format ApnSetting with a
V3 one.

Bug: 70172263
Test: manual; no behavior change
Change-Id: I20ff199fb60304fbb7c2a8b837869bfd143eba16
Merged-In: I20ff199fb60304fbb7c2a8b837869bfd143eba16
2018-05-14 19:13:26 +00:00