userId is a new field added in ag/8350816, and it is written in between
some old fields when we parcelize it.
That breaks AiAi because some of its code rely on the implementation
details of SelectionEvent.writeToParcel.
In the long run, we may want to update AiAi such that it works
without this assumption, but before that, let's fix that in platform
for now.
Bug: 145962464
Bug: 123232892
Test: atest FrameworksCoreTests:android.view.textclassifier.SelectionEventTest
Merged-In: I98137a095cddf0fb4c600e1e09eef507bb750528
Change-Id: I66f65ac4c81ca964f710404fd081496355276435
* changes:
RESTRICT AUTOMERGE Fixes NPE when preparing app data during init
RESTRICT AUTOMERGE Use KNOWN_PACKAGES when shared lib consumers
RESTRICT AUTOMERGE Handles null outInfo in deleteSystemPackageLI
am skip reason: Change-Id Iaa78a7edcf23755c89d7b354edbc28d37d74d891 with SHA-1 f98611062c is in history
Change-Id: I92c1131ef02f7ca5e399b47c62993cf28719b66a
Fixes NPE when preparing app data during init
When deleting an unused static shared library on Q, the user manager was
fetched via mContext.getSystemService. At this time during boot, the
service wasn't registered and so null was returned. This has already
been addressed in R with a move to injecting dependencies in the
PackageManagerService constructor.
Bug: 142083996
Bug: 141413692
Test: manual; remove static dependency on eng Q build and reboot
Change-Id: I8ae4e331d09b4734c54cdc6887b273705dce88b1
Merged In: I8ae4e331d09b4734c54cdc6887b273705dce88b1
Use KNOWN_PACKAGES when shared lib consumers
This change ensures we find ALL known packages that could be consuming a
shared library, not only currently installed ones. Without this check,
the system may get into a state in which we have currently uninstalled
but on-device apps that depend on a shared library that does not exist
on device.
This change also leaves static shared library packages on device even if
it's not installed for any of the remaining users as it could still be
used, but marked uninstalled for users in which it is consumed.
Bug: 141413692
Bug: 142083996
Test: Manual; attempt to remove shared lib after marking its consumer uninstalled.
Test: atest StaticSharedLibsHostTests
Change-Id: Id4e37c3e4d3ea3ad5fddae5d2c7305e56f50eeea
Merged In: Id4e37c3e4d3ea3ad5fddae5d2c7305e56f50eeea
Handles null outInfo in deleteSystemPackageLI
This change adds null checks before accessing outInfo in
deleteSystemPackageLI.
Bug: 142083996
Bug: 141413692
Test: manual; remove static dependency on eng build and reboot
Change-Id: If0fd48343e89cbb77ccd25826656194195d5b0cd
(cherry picked from commit 1747101650)
Merged In: If0fd48343e89cbb77ccd25826656194195d5b0cd
When a notification becomes lifetime-extended, NotificationEntryManager
was holding onto the RankingMap that was passed at the time of removal
of _that_ notification, and using it again in the
NotificationSafeToRemoveCallback. The problem here is that when
onSafeToRemove gets called, it was passing that same stale ranking map
to removeNotification, which caused any notification that arrived in the
intervening time to get improperly ranked.
This fixes an issue where any notification that arrives while another is
lifetime-extended can get the wrong ranking applied to it, causing
trouble later in time such as mis-ranking and mis-sorting until the next
update from system server.
Bug: 146046016
Bug: 119041698
Test: atest SystemUITests
Test: manual - Post a FGS notification and immediately cancel, then post
a regular notification and wait for the FGS notification to dismiss.
Note that the regular notification keeps showing in the status bar.
Change-Id: I3df1279f13c424fcedd878bae2095fadc75d61b4
Currently, strict mode private DNS does not work on VPNs because
NetworkMonitor does not validate VPNs. When a VPN connects, it
immediately transitions to ValidatedState, skipping private DNS
hostname resolution.
This change makes NetworkMonitor perform private DNS hostname
resolution and evaluation even on VPNs.
In order to ensure that the system always immediately switches to
the VPN as soon as it connects, remove the unvalidated penalty
for VPN networks. This ensures that the VPN score is always 101
and the VPN always outscores other networks as soon as it
connects. Previously, it would only outscore other networks
when no-op validation completed.
Backport of 414b8c8b1c.
Bug: 122652057
Test: atest FrameworksNetTests
Test: manually ran a VPN with private DNS in strict mode
Test: atest android.net.cts.ConnectivityManagerTest com.android.cts.net.HostsideVpnTests
Change-Id: Iaa78a7edcf23755c89d7b354edbc28d37d74d891
Merged-In: Iaa78a7edcf23755c89d7b354edbc28d37d74d891
Support faking out the DNS lookups used by NetworkMonitor to
resolve strict mode DNS, and add more test coverage.
These tests were partly adapted from tests we have in Q but
also contain new coverage. This is because in Q the interface
between ConnectivityService and NetworkMonitor changed
substantially, and it is impractical to backport
NetworkMonitorTest.
Bug: 122652057
Test: atest FrameworksNetTests
Change-Id: I6497b7efa539267576d38d3036eef0af0df4e9cb
Merged-In: Iaa78a7edcf23755c89d7b354edbc28d37d74d891
When an AIDL file is listed in the srcs property, the build system
expects a Java file for the AIDL file even when the AIDL file is for a
parcelable declaration. Previously, the AIDL compiler generated an empty
Java file in that case, but with Iaa9c78c5df06afee165462db05c6dc6e11a1ba8a
that is no longer the case.
Therefore, removing two AIDL files for the parcelable declarations from
the srcs property.
Note that, in master branch (for R and beyond), we don't need to
filter-out such AIDL files because the build system expects a srcjar
file from AIDL files. This change is only for Q where the build system
change doesn't exist.
Bug: 143993752
Test: m
Merged-In: I0705ddf76b3c628127f65d75e0a8b06c6c250fe2
Change-Id: Iadb82092b8f6ea12c93285e9e0af18845f0feab9