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
Otherwise it may cause a deadlock between
PWM's mlock and WMS's mWindowMap.
Just post the work to the policy handler instead.
Bug: 80279029
Change-Id: Idae333687cf5c88e1893ee216c278b9e6c17dd98
After Treble's FLP merge into GNSS HAL, the FlpHardwareProvider is just
an empty shell. Removing FusedLocation and/or Flp + Hardware classes
altogether.
Bug: 35726697
Test: m -j
Test: Open Google Map and then walk around. The dot moves as I walk.
Merged-In: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
Change-Id: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
(cherry picked from commit 4cc3a1c056f69ac4da1dc5055c36b7357e9f673c)
com.android.location.provider.stubs is the stubs library for the shared
library com.android.location.provider. The stubs library is intended to
provide the stable set of APIs to the apps implementing location
provider.
Without the stubs library, apps had to directly link to the shared
library which is built without Android SDK and exposes private APIs that
are not intended to be used by apps. This also has been causing the
lin-type check warnings when the shared lib is used by apps built with
SDK; apps built with SDK is not allowed to link to lib built without
SDK. This has been reported as warnings but will soon be errors. Now
such apps are required to link to the stubs lib, which is built with
SDK.
While building the stubs library, following APIs are made hidden because
they are exposing private APIs from the Android platform.
1) Activity* classes are removed from the API, as they are not intended
to be used by apps since O.
2) GeocodeProvider and GeofenceProvider are removed from the API.
3) LocationProvider.mLocationManager is removed as it is exposing the
private symbol ILocationProvider
4) ProviderPropertiesUnbundle.getProviderProperties are removed from the
API as it is exposing the private symbol ProviderProperties.
5) The constructor of ProviderRequestUnbundled is removed since the
class is intended to be instantiated by the service.
Bug: 71420593
Test: m -j com.android.location.provider.stubs
Merged-In: I20aba7e9ca9c3adc75db241f37a55f0d657f3ced
Change-Id: I20aba7e9ca9c3adc75db241f37a55f0d657f3ced
(cherry picked from commit eee99986c8021d6825f99a25434725fccf7b2b12)
When device connected with wired headset and without any bluetooth
connection, APP may call MediaRouter to setForceUse to set FOR_MEDIA
with FORCE_SPEAKER, then sound be output to SPEAKER. In this case,
if setBluetoothA2dpOn(false) was called, FOR_MEDIA will be set with
FORCE_NONE and sound be output to wird headset.
The issue discussed above occurred on our device. We developed an FM radio APP.
Beforce work, wired headset must be plugged in to be used as antennas. Then we
setForceUse FOR_MEDIA to FORCE_SPEAKER, and audio stream was output to speaker.
At this moment, if we play other sound (such as ScreenCapture sound),
MediaRouterService will detected audio playbacked state changed. Because FM Audio
was not monitor by AudioPlaybackMonitor, there was not any audio playback active.
So, restoreBluetoothA2dp was called in the function of onAudioPlayerActiveStateChanged,
which call AudioService.setBluetoothA2dpOn(false). As a result sound was switch to headset.
There are two solutions to fix our issue.
1) Check a2dp state before setBluetoothA2dpOn in MediaRouterService::restoreBluetoothA2dp,
if a2dp state does not change, setBluetoothA2dpOn should not be called
2) Check a2dp state before setForceUse in AudioService::setBluetoothA2dpOn,
if a2dp state does not change, setForceUse should not be called
Consdering that setBluetoothA2dpOn may be called by other method, we try to fix it
with the second one.
Test: NA
Change-Id: I3a2e64e7d73d9aa9539176fea556feb433cb7211
Signed-off-by: zengjing <zengjing@xiaomi.com>
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
Global flag --pack-dyn-relocs=android is used with clang lld.
For b/24465209, we need to override that with pack_relocations:false.
Bug: 24465209
Bug: 80093890
Test: build with USE_CLANG_LLD=true and run dlext.compat_elf_hash_and_relocation_tables
Change-Id: I9364feb4070d4f75705d8651d535c792fe6ad6f7
The com.android.media.tv.remoteprovider is built with java_sdk_library
and api files are added by running "make update-api".
The com.android.media.tv.remoteprovider is removed in platform.xml
since it will be made auto generation by soong when the library is
built with java_sdk_library.
Bug:77577799
Test: make -j
make checkapi
Change-Id: If0f33bbdde42d891471cd7d3d295d433a88affec
NTP may be necessary in order to validate Private DNS certificates,
so it should be allowed to bypass Private DNS.
Test: as follows
- built, flashed, booted
- tcpdump for port 53; adb shell am restart
queries for the NTP hostname appear in the clear
- runtest frameworks-net passes
Bug: 64133961
Bug: 80118648
Merged-In: I4655e3ce5691098c73bf070b8a9e4759485bb17a
Merged-In: I327b816a9f472e94328232157a3b8887d17b0baf
Change-Id: Id9ceb3fcaaffb48cbbd4cd381d48cae991572c9e
(cherry picked from commit 7eccfeb9ca60aa6e09afbdf3a4435cb2f0d12987)
This only changes behavior if the EXTRA_CAPTIVE_PORTAL_PROBE_SPEC extra
is passed, which only happens if extra probe specs have been defined in
settings.
Bug: b/79499239
Test: manual: on 2 different portals, works w/ and w/o the setting
Merged-In: Iebd307b5d73a7b4679baea2a1c12c3baba6a7447
Merged-In: I851d8c41d42dccb03f813e549439f44c83f7d5ac
(clean cherry-pick of pi-dev I70acfd9213bf620cbb79ad999b8ad03472e8d43f)
Change-Id: I3b3bcbbd380f8cbd0b663556d55276f43e30b3e5
The probes allow testing for a configurable status code and location
header (regexes). They are disabled by default, so this CL is a
no-op unless the probe configurations are pushed.
Bug: b/79499239
Test: tests in CL pass, manual: captive portal login works
Merged-In: Iec7a74bbf2569a91e958c497200d77e8451cbf7b
Merged-In: Ia958815325d1466345e9626efc8f62fc9d08d774
(clean cherry-pick of pi-dev I785723aaed06054b9aa8ebff77803f23d7836db9)
Change-Id: I18b3f263fed08fa4fee20d5e88f3ec8647d7f835
This is necessary to resolve visibility issues for the next change.
Bug: b/79499239
Test: runtest frameworks-net
Merged-In: Ia48b32307a51a66f2672d7112f71166dd6db41b1
Merged-In: I5df7ee9f16bc6be4f02353d40a843a383dd4cbd9
(Clean cherry-pick of pi-dev I50bc96afe6ae88c8f58a693f0a4e821f1f9b3299)
Change-Id: I3c416c1a91ebfdf914fd528ff8ab73e3eb490562
Not using it doubles the number of DNS lookups for single-stack
networks.
Private DNS hostname resolution still does not use this flag so that we
get all address families in advance, in case of LinkProperties changes.
Bug: b/79811321
Test: manual: Captive portal, 464xlat, networking in apps working
Merged-In: I7037342a93dc48b8e0988e719b9a9a2d5055bcf2
Merged-In: I8ca15fa079cd5ff94e4d9f7e0476504769f9708f
(Clean cherry-pick of pi-dev Ib46756e5e5f8d8d2698c90c5183c368d2d44be7a)
Change-Id: Iedb7a9c5f9caeb66de4505189fca8db91013d844
If the title of the music file includes "/", it's recognized
as a directory separator.
Use correct filename to select the file properly.
Bug: 80202253
Test: Add mp3 which title includes "/" to ringtone
Change-Id: I9bb05f6fe2d7d4dbbdf4f67db7ac6fde04707979
This should only be merged into AOSP branches
Merged-In: Ib66ef392c19c937718e7101f6d48fac3abe51ad0
Test: N/A
Change-Id: Ia9b362cf44821273a8c4d25f73ffd881895e7df1
This method is being removed. All usages of this @hide method in the
platform have already been removed. For an analysis of the usage in
apps, see the bug.
Bug: 78447530
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
(cherry picked from commit 094f08bc41d4124aed63123440d9efcafe1f473c)
Change-Id: I60a158654ad962c8e3b5282c035dae0c014903d0
Merged-In: Ic89cf0775170393fe906f581364bff0e852958ef
org.apache.http.legacy is now built using java_sdk_library. Since the
share lib defintion file for the lib is automatically created and
installed, we don't need to have duplicated entry for the lib.
Bug: 77577799
Test: m -j
Test: adb shell cmd package list libraries shows an entry for
org.apache.http.legacy
Merged-In: I06b356c2ba08abc6c1cece81daf7c1773ed93ed0
Change-Id: I06b356c2ba08abc6c1cece81daf7c1773ed93ed0
(cherry picked from commit 49c0a869550dc6a80f75fb08fd38e11ee84bc33d)
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
* changes:
AAPT2: treat manifest validation errors as warnings when asked
AAPT2: Better error messages for ManifestFixer
AAPT2: Differentiate between Android and Java package names
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 ed37f4842ad838792b16bf19768ed9b2519b0194)
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 96ea08f1e737e0d19e274e9a29f71c387d81b09a)
Also includes part of I357fb84941bfbb3892a8c46feb47f55b865b6649 to remove
usage of FindNonAlphaNumericAndNotInSet.
Bug: 79481102
Test: make aapt2_tests
Change-Id: I1052e9e82b6617db6065ce448d9bf7972bb68d59
Merged-In: I1052e9e82b6617db6065ce448d9bf7972bb68d59
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