ActivityThread#setHttpProxy uses a system context to get
a ConnectivityManager instance. If it's not already cached, the
system service registry will cache this instance initialized
with the system context, and subsequent calls to get this service
will return the bad instance.
This patch uses the application context instead, unless it's
not available for some unlikely reason.
A possible symptom of this issue is to have Bluetooth tethering
failing with a security exception, because it's requested by
the "android" package without system uid.
Merged-In: Ib8815f010883cdb94fcad2cdfb237de39327b20a
Bug: 73572062
Change-Id: Id652c1625194dc73dcbf8dfcad4b4e2e6fbebf4e
Sometimes data service clients do not care the result of the
requests so they pass null callback. In this case the data service
should handle it.
Test: Manual
Bug: 64132030
Change-Id: Ib188994fed4e708de875a24d5386a74a8f6db4dd
* Update usage of A2dpService API calls that take BluetoothDevice
as an additional argument
* Update the description for BluetoothA2dp.connect()
Exempt-From-Owner-Approval: De-facto owner of the relevant changes is
the Bluetooth team.
Bug: 69269748
Test: Manual
Change-Id: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
Merged-In: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
(cherry picked from commit 502af2192c6d291174efa434a70101f302a5bd97)
When there are multiple connected A2DP/HFP devices, if a connected
device's name is clicked on, that device will be chosen as
Active - i.e., it will be the device chosen for audio out / phone call.
Also:
* Listen to the BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED
and BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED intents
and update the the status of the current active device.
* When connecting a new device, and Multi-A2DP is enabled, don't
disconnect the currently connected device.
* Update the implementation of isA2dpPlaying() so it correctly checks
all connected devices, not only the first one.
Test: Manual: multiple connected A2DP devices, and selecting each as
the Active Device.
Bug: 64767509
Change-Id: I69f3c85ebf5a7f07f6deed484c6dd65705460ae4
Merged-In: I69f3c85ebf5a7f07f6deed484c6dd65705460ae4
(cherry picked from commit 1af33a192614bb490701ab2e8e21866690b3b4fa)
This patch adds an overload to DropBoxManager::addFile() which accepts
an already-opened file as a file descriptor. This avoids the need for
clients to create a filesystem-visible file when uploading data to
DropBox.
Test: Tested with perfetto using https://android-review.googlesource.com/c/platform/external/perfetto/+/587674
Change-Id: I076bfd3180fb9b4baff7e1bae2e611419061b2a7
Merged-In: I076bfd3180fb9b4baff7e1bae2e611419061b2a7
This change is meant for ART buildbots which build against a pinned
commit of the framework and thus do not have the commit which
introduced hidden API lists. Normal builds will now copy the blacklist
and dark greylist into the build folder first, and then generate the
light greylist as usual. If a buildbot does not have the framework
changes, it can create dummy API lists in the build folder before
starting the build and avoid the issue.
Test: make
Bug: 64382372
Change-Id: Ib6e53a45bcc917abb4ba67fdcbf01d4a19c2d56f
This is needed because satisfiedByNC() compares UIDs by default now, and
the NCs we receive in callbacks have Tethering's UID patched in.
Bug: 72498421
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes, module library loading failures:
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libdexfile.so" not found
- manually starting tethering works fine
Change-Id: I31f6516e2c1539809f8d052333fd2a616158cb92
In order to receive SMS-Push,
Target SDK will use "Context.startForegroundService ()" API
for more than 26 service applications.
Test: manual
Bug: 63048126
Change-Id: I701eab6002d01cfc6e559db7aad5455781dc162c
Signed-off-by: hirotaka motegi <hirotaka.motegi.um@nttdocomo.com>
In NetworkRegistrationState.java, add hidden inner classes that
stores information specific to voice network registration state
and data network registration state.
Bug: 64132030
Test: build
Change-Id: I746be2a50cfa138acc5b2b40e38ab875ceab6d8d
Since http://r.android.com/565744 , these classes do not appear
in the signature of any other Android API. There are no plans to
make them part of any future API signatures.
They do not provide useful abstractions because:
- They lack encapsulation and functionality (value is nonfinal;
lack of equals/hashCode and toString).
- It's trivial for apps to implement similar types for their
internal use.
Only three of these eight classes (Mutable{Int,Long,Boolean}) are
used internally in Android; most of these usages could be written
better with named, more specific classes.
Therefore these classes do not pull their own weight on the API
surface of android.util.
This CL deprecates all eight classes in preparation for removing
them from the Android API surface at some point in the future, and
to allow the unused classes to be removed entirely.
Bug: 71546998
Test: Treehugger
(cherry picked from commit d57219411b3718da0850ef109e63d1a311a03d31)
Change-Id: Ib8736faa86d0ae5eec2c47a294f21adcf21d3dc4
Merged-In: I1cc1eb5ca9c36749bbb9a233d60036f6319bf2d3
Adds CellConnectionStatus to top level CellInfo type. Adds cell bandwidth
to the CellIdentityLte.
Bug: 72117223
Test: runtest frameworks-telephony
Change-Id: Id5f3b5a2bd4119c099f5e739d5579974e7adc897
Fix NaN comparisons in WorkflowTest.
Bug: 72451126
Test: m javac-check RUN_ERROR_PRONE=true
Merged-In: I3eba48ac3f8dc343cd22cac0f9fbf4d4e6c76631
Change-Id: I19db273ee442c912c2c1052d53b5b2e0c5cd968b
mUids is not marshalled correctly when null so if the
NetworkAgent runs in another process and is not a VPN then
the system will see its allowed Uids as being the empty
list (= nobody can use this network) instead of a null
list (= everybody can use this network). This breaks
emulator networking.
Bug: 72436966
Test: runtests frameworks-net
Test: also manual testing, this does fix emulator networking
and seems not to break phone networking
Change-Id: Id2bbf3808e80b19cd055c832c11cf72372710942
This patch implements the new INetdEventListener.onTcpSocketStatsEvent
callback added in INetdEventListener.
For the time being, tcp socket stats are tracked inside TcpMetrics only
for dumpsys printing and bug report integration as a first step.
Bug: 64147860
Test: manually tested, watching output of
$ adb shell dumpsys connmetrics
Change-Id: I10ab24c6da4bb654d9198a4d8d00ccdc972cc0d5
The lifecycle of Keepalive offloading is, unfortunately
different from that of an IpSecTransform. Because starting
a keepalive is fundamentally asynchronous, and isn't valid
until after a transform exists, it will now be a separate
optional procedure that may succeed or fail. It remains
linked with a Transform by the need for a Transform to exist
in order to initiate a Keepalive.
Bug: 38350389
Test: compilation
Change-Id: Ia76fccee41f86d694dff436043293d0c0762c041