344344 Commits

Author SHA1 Message Date
Nathan Harold
22795302be Check mOwnedByTransform to avoid DELSA on SPI
The owned by transform flag prevents the removal
of an SPI from accidentally deleting an associated
SA in the kernel. That flag wasn't actually being
checked, so deleting an SPI would result in the
transform being removed.

The existing code already guarantees that the SA is
deleted when the transform is deleted

Bug: 73258845
Test: runtest frameworks-net
Change-Id: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
2018-03-20 11:26:29 -07:00
Treehugger Robot
448003fc49 Merge "Frameworks: Fix Binder.joinThreadPool" 2018-03-20 15:06:15 +00:00
Andreas Gampe
bd12b4476b Frameworks: Fix Binder.joinThreadPool
Fix the lack of a native implementation.

(cherry picked from commit acd1987950d54afef1f69dad11840996c22cb8fe)

Bug: 75254055
Bug: 75291614
Test: atest BinderTest
Merged-In: Id5b15442a59851e566a24d406a7487f9de66d42f
Change-Id: Id5b15442a59851e566a24d406a7487f9de66d42f
2018-03-19 20:38:52 -07:00
Benedict Wong
2543fbd8a2 Merge "Added implementation for VTI add/remove address" 2018-03-19 22:05:09 +00:00
Treehugger Robot
fe78972bb2 Merge "Allow carrier-privileged apps to register telephony listeners." 2018-03-19 21:24:27 +00:00
Treehugger Robot
78a7b5d44a Merge "Add empty CdmaSmsSubaddress to CDMA PDU parsing" 2018-03-19 21:04:56 +00:00
Treehugger Robot
af3dc4fc70 Merge "Frameworks: Handle exceptions in SystemProperties callbacks" 2018-03-19 19:38:13 +00:00
Treehugger Robot
61265410e8 Merge "Add the AVRCP Target Service (2/2)" 2018-03-19 18:38:40 +00:00
Tyler Gunn
7c8a877231 Merge "Rename handover failure constant per API review comments." 2018-03-19 17:15:58 +00:00
Treehugger Robot
2446a10799 Merge "DndTile: Avoid yet another NPE during boot up phase" 2018-03-19 16:31:29 +00:00
Andreas Gampe
7074e6fd4c Frameworks: Handle exceptions in SystemProperties callbacks
When notifying callbacks, catch thrown exceptions.

Bug: 73058952
Test: m
Test: atest SystemPropertiesTest
Change-Id: I1c61e11b833e8ddd30d80b9859b20a9fb3185a33
2018-03-19 08:36:11 -07:00
Bruno Martins
c154e19357 DndTile: Avoid yet another NPE during boot up phase
* Tile state update can only take place once mController
   is properly initialized.

Change-Id: Ia6c1d6dee7d3e396a5bb6910e03859a0c0cc94ae
2018-03-17 14:03:57 +00:00
nharold
00ef20e853 Merge "Docstring Updates for applyTransportModeTransform" 2018-03-17 00:33:10 +00:00
Nathan Harold
f4cdf25a90 Docstring Updates for applyTransportModeTransform
-Add anotations to usages of PolicyDirection for
 apply...() methods.
-Update the comments on DIRECTION_IN and DIRECTION_OUT
 to better reflect their current usage.
-Add a better explanation to the rekey procedure doc.
-Remove disused createTunnelInterface() stub.

Bug: 73751066
Test: make docs
Change-Id: I9f2ec864466148a18899f1e952c74a525902ccbc
2018-03-16 17:29:45 -07:00
Jack Yu
5b7103ab97 Merge "Renamed getNetworkId and getSystemId" 2018-03-16 21:50:19 +00:00
Treehugger Robot
01cef932c8 Merge "NfcAdapter.EXTRA_SE_NAME -> NfcAdapter.EXTRA_SECURE_ELEMENT_NAME" 2018-03-16 20:12:04 +00:00
Tyler Gunn
5c60d71efb Rename handover failure constant per API review comments.
Expanding EMERG to EMERGENCY.

Test: Build code
Bug: 74831393
Change-Id: Ib7e6bea84e25b1e1a2ddb154c7ed62f1084a7596
2018-03-16 12:38:43 -07:00
Brad Ebinger
465fdc2b25 Merge "Define phone process as a constant" 2018-03-16 18:38:30 +00:00
Brad Ebinger
22018a8ce7 Add empty CdmaSmsSubaddress to CDMA PDU parsing
We were not providing an empty subaddress when
parsing CDMA PDU, which caused an NPE when receiving
CDMA IMS SMS.

Bug: 73994015
Test: Manual, MT/MO SMS
Change-Id: I07be3ac64341eb9235f6da1b6870ac746188f73a
2018-03-16 11:34:20 -07:00
Ajay Panicker
38c3073ba2 Add the AVRCP Target Service (2/2)
Add the AVRCP Target constant to Bluetooth Profile. Also remove redundant
public static final modifier on the constants.

Bug: 68854188
Test: Compiles and local test with service enabled
Change-Id: If2ec607fc704c225f8903d438fe970dfafac25f1
2018-03-16 18:22:00 +00:00
Brad Ebinger
d273dea10b Merge "Added Locking for MmTelFeature" 2018-03-16 18:21:07 +00:00
Jack Yu
46d2bc06d6 Renamed getNetworkId and getSystemId
1. Renamed getNetworkId() to getCdmaNetworkId()
2. Renamed getSystemId() to getCdmaSystemId()

Test: Build
Bug: 74976831
Merged-In: I2a5fb50a59c3239bd3dca5568991a9dff08839fc
Change-Id: I2a5fb50a59c3239bd3dca5568991a9dff08839fc
(cherry picked from commit 2661fac133db49124d2377f49506b12c1a6c9505)
2018-03-16 11:07:37 -07:00
Treehugger Robot
a9c0419010 Merge "Added CTS test cases for getNetworkId() and getSystemId()" 2018-03-16 17:39:38 +00:00
Benedict Wong
ecc9f7cc08 Added implementation for VTI add/remove address
This change adds implementation details for add/remove addresses onto a
VTI.

Bug: 73675031
Test: New tests added, passing on Walleye
Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
2018-03-16 10:25:43 -07:00
Treehugger Robot
cdbf930883 Merge "Use AsyncTask.SERIAL_EXECUTOR as the default executor for scan" 2018-03-16 17:23:53 +00:00
Treehugger Robot
3aa064897e Merge "Add scan background mode to Settings.Global." 2018-03-16 16:15:50 +00:00
Anthony Stange
ff54a35a0f Add scan background mode to Settings.Global.
This enables us to mess with the different scan intervals and shift
clients to a different scan mode in the background based on what scan
interval values we choose for the different power modes.

Bug: 71765044
Test: None. Just adding a key.
Change-Id: Id48ebc521dd3fe8a68c9c4c0bdb1018ea5b3743e
2018-03-16 16:07:45 +00:00
Jack Yu
260f2fa1fe Added CTS test cases for getNetworkId() and getSystemId()
Bug: 32718590
Test: atest CtsTelephonyTestCases:ServiceStateTest#testServiceState
Merged-In: I5826a59d85028f0350ee39c69553f4e488d6456b
Change-Id: I5826a59d85028f0350ee39c69553f4e488d6456b
(cherry picked from commit 1b8b38928b4e20e7e66ab75e39159b158dc5c4c9)
2018-03-16 00:26:33 -07:00
Chen Xu
790e4f475f Merge "reword title of CS rejection notification" 2018-03-16 00:51:04 +00:00
Treehugger Robot
00cc1847d3 Merge "Bluetooth: preserve one advertisement slot for GMS core" 2018-03-15 23:50:49 +00:00
fionaxu
77c1574f05 reword title of CS rejection notification
Device will show a notification when receive MM rejection code from
Network due to CS registration failure. Notification message is
confusing today as it doesn't specify the domain that's being blocked.
The fix is explicitly specifying voice service impact for various MM
rejection code.
(cherry picked from commit a6b9fda6245d21ac9e7370a8d8dd13deff73458c)

Bug: 67754753
Test: Manual
Change-Id: Ia5e93a26f8dccfc18c9dcb63b773e5b23734fd0d
(cherry picked from commit de9d7784ec5879f1d9bebb8851f3b0e82fa82333)
Merged-in: I656ba438659aedce7f56f167707a12ce07286594
2018-03-15 23:27:27 +00:00
Ruchi Kandoi
9a33aefd65 NfcAdapter.EXTRA_SE_NAME -> NfcAdapter.EXTRA_SECURE_ELEMENT_NAME
Test: compiles
Bug: 74976874
Change-Id: Ied783f57078aaa37017cc821adf329ececac74f3
2018-03-15 15:16:39 -07:00
yinxu
2e8d5ed776 Use AsyncTask.SERIAL_EXECUTOR as the default executor for scan
Because there will be multiple callbacks for each scan and they must be
invoked with the same order as they are received by the platform, we
should use AsyncTask.SERIAL_EXECUTOR instead of
AsyncTask.THREAD_POOL_EXECUTOR as the default executor.

Bug:74840070
Test: Unit Test, CTS Test
Change-Id: I7333940dad38f7e400a4124486bdb21cea0d5220
2018-03-15 13:28:05 -07:00
Chen Xu
6a7bb0694f Merge "rename notifications from carrierServiceStateTracker" 2018-03-15 20:19:48 +00:00
Treehugger Robot
28d076b829 Merge "Fixed data connection state callback not working" 2018-03-15 19:04:30 +00:00
fionaxu
c8c2d1db2f rename notifications from carrierServiceStateTracker
Bug: 37578776
Bug: 72712198
Test: Manual
Change-Id: Ifcf670c03f3777e08f03c1a4f0c3f3d6092192b2
(cherry picked from commit 8683f651388ebc4ba063f6e21afb8ceff23c58a0)
Merged-in: Ifcf670c03f3777e08f03c1a4f0c3f3d6092192b2
2018-03-15 11:48:08 -07:00
Jeff Davidson
01efe5e563 Allow carrier-privileged apps to register telephony listeners.
For TelephonyManager#listen, we check carrier privileges if
READ_PHONE_STATE is missing for any calls which enforce the
permission. For calls which check it and behave differently (by
redacting sensitive info), we defer the permission check until the
actual event occurs, at which point it is checked based on the current
state of the device.

For SubscriptionManager#addOnSubscriptionsChangedListener, we remove
the existing permission check for READ_PHONE_STATE altogether. The
event itself contains no information, and reading subscriptions still
requires either READ_PHONE_STATE or carrier privileges on the
subscription in question.

Also updates incorrect Javadoc on
PhoneStateListener#LISTEN_SIGNAL_STRENGTH, which does not actually
check any permissions by design.

Bug: 70041899
Fixes: 74034127
Test: TreeHugger + E2E test w/ a carrier-privileged app
Change-Id: I84a56ad3972b9edcfdefcbb43ef174c54cdcac00
Merged-In: I84a56ad3972b9edcfdefcbb43ef174c54cdcac00
(cherry picked from commit 62b994b3cf0f05801bd8b58a5874118c404d656b)
2018-03-15 10:44:41 -07:00
Jack Yu
29d07b5871 Fixed data connection state callback not working
The old behavior of onDataConnectionStateChanged callback is that
if at least one data connection for one APN type (e.g. default,
mms, supl, ims, etc...) is connected, then it reports connected.
It only reports disconnected if data for all APN types are
disconnected.

Since now we have data connections are always connected. For example,
even if the user disables data, the unmetered IMS data remains
connected. In this case the client's onDataConnectionStateChanged
won't be called.

Now we changed the behavior of onDataConnectionStateChanged to
report the connection state for default APN type only. This matches
the behavior of TelephonyManager.getDataState().

Test: Manual
Bug: 73226433
Merged-In: I0744cf33337864c946af6e7d186bab78584acfa4
Change-Id: I0744cf33337864c946af6e7d186bab78584acfa4
(cherry picked from commit b1bac54d609703ec5fbc633fab89c73994289496)
2018-03-15 10:38:48 -07:00
Treehugger Robot
e70b94815a Merge "Amend package whitelist." 2018-03-15 16:42:10 +00:00
Treehugger Robot
eed99d8629 Merge "Frameworks: Fix system server profiling" 2018-03-15 15:36:28 +00:00
Mathew Inwood
25be36376b Amend package whitelist.
Now that Antons cleanup of all packages is complete, we can generate this
whitelist from those packages that specify

  LOCAL_PRIVATE_PLATFORM_APIS := true

This is the resulting list of packages. This change also includes fixes to
the method; previously, packges that didn't specify any certificate may
have been exluded.

Test: Verify that device boots.
Change-Id: I1f578322135274b80708d4bb7664f7732ac33cc7
2018-03-15 14:06:29 +00:00
Andreas Gampe
5a8ea8c619 Frameworks: Fix system server profiling
Avoid a race to close the profiling file descriptor.

Bug: 74883338
Test: m
Test: am profile start `pid system_server` /data/local/tmp/test.trace && sleep 5s && am profile stop `pid system_server` && adb pull /data/local/tmp/test.trace && [[ $(find test.trace -size +1K) ]] && echo Success
Change-Id: Ib506ce38ac1ac7c0b91079ba9b35aca6ae289d22
2018-03-14 23:19:21 -07:00
Colin Cross
79fe334055 Merge "Revert "Add RequestShortAudioDescriptorAction. [1/2]"" 2018-03-15 05:25:39 +00:00
Colin Cross
f4269d1ac3 Revert "Add RequestShortAudioDescriptorAction. [1/2]"
This reverts commit 9e16580f78a6621c8957f427b6d9b8fadc813afd.

Reason for revert: Broke all the builds.

Change-Id: If2b8a0a36d6e2a902c33a66b82b11f693d7f7139
2018-03-15 05:24:49 +00:00
Dan Zhang
c27ebbaa8f Merge "Add RequestShortAudioDescriptorAction. [1/2]" 2018-03-15 01:49:37 +00:00
Miao-chen Chou
9d3389d17e Bluetooth: preserve one advertisement slot for GMS core
This brings back the check on the multiple advertisement support before
granting any Bluetooth LE advertiser. In other words, one slot is preserved
for GMS core.

Bug: 74819586
Test: Run an BLE application and verify the number of advertisements
Change-Id: Iac3b47c76c6f699018982a69e9b04a9d8c631bfb
2018-03-14 16:35:11 -07:00
Brad Ebinger
835a8fb230 Define phone process as a constant
Test: Manual
Bug: 72645729
Change-Id: If07728ea2cc0128113ebe947a154f80ff45a7d9d
2018-03-14 16:14:55 -07:00
Treehugger Robot
fd4385e633 Merge "Add API to check extended APDU Supported" 2018-03-14 21:59:58 +00:00
Treehugger Robot
0715570648 Merge "Catch the RuntimeException for stopScan()" 2018-03-14 19:47:44 +00:00
Treehugger Robot
d116852e69 Merge "Fix a bug when calling onError(int)" 2018-03-14 19:46:51 +00:00