Since FDE is no longer supported, updating the FDE password never does
anything. Stop trying to do so. Remove updateEncryptionPassword() from
ILockSettings, since its only caller outside of LockSettingsService
itself was in LockPatternUtils, and the previous CL removed that caller.
Bug: 208476087
Change-Id: I46c2a472177836f0c9084e4c3b4ed2e6c0ab61d5
(cherry picked from commit 3762ada110)
Merged-In: I46c2a472177836f0c9084e4c3b4ed2e6c0ab61d5
Remove this method which cleared the FDE password, since is no longer
used. It was only being used by the accessibility settings in the
Settings app, and that caller was removed by http://ag/16624515.
Bug: 208476087
Change-Id: If0c75774555d3503f21857e66cce527c5edfa586
(cherry picked from commit 8e265a9fd3)
Merged-In: If0c75774555d3503f21857e66cce527c5edfa586
Now that FDE is no longer supported, getting/setting FDE fields is
always a no-op, so there is no need to do so.
Bug: 208476087
Change-Id: Iab7ba8d36890daa0645b2cedf33e4bd177a86b63
(cherry picked from commit c6ce767e59)
Merged-In: Iab7ba8d36890daa0645b2cedf33e4bd177a86b63
Add a field in the VpnConfig to store local route exclusion
bit from VpnProfile, and set the value into the networkAgent
of VPN network.
Bug: 184750836
Test: atest FrameworksNetTests HostsideVpnTests
Change-Id: I22b9a5990a3dab0418b44ec19d2996ead6529231
* changes:
Ignore vendor apex priv-app permission allowlists
Add test for parsing apex allowlists
Ignore prebuilt shared library if it doesn't exist on device
Rename updatable-library to apex-library
Parse new xml attributes used for updatable shared libraries
Create XML parser only once.
We prefetch standalone system server jars in ZygoteInit based on the
STANDALONE_SYSTEMSERVER_JARS environment variable, so that they can take
the advantage of AOT compilation. This CL adds a check to disallow jars
that are not prefetched, which reminds developers to make appropriate
changes so that their jars will be in the environment variable.
Bug: 203198541
Test: 1. Build a system image.
2. The device boots.
Test: 1. Remove an entry from PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS
2. Build a system image.
3. The device does not boot and encounters the following error:
java.lang.RuntimeException: Creating a ClassLoader from /apex/com.android.wifi/javalib/service-wifi.jar is not allowed. Please make sure that the jar is listed in `PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS` in the Makefile and added as a `standalone_contents` of a `systemserverclasspath_fragment` in `Android.bp`.
Change-Id: I275d75ac37194a4d8fd491529b7cdb697dc04e37
Merged-In: I275d75ac37194a4d8fd491529b7cdb697dc04e37
(cherry picked from commit 418ab8212c)
Add safer Bundle APIs that take an extra Class<T> argument that checks
that the type about to be deserialized is a child of the type passed in
parameter *before* actually deserializing it, while also deprecating old
APIs.
This allows use to reap the benefits of the new typed Parcel APIs and
enhances security.
Only the APIs that could involve custom object injection are modified.
So, besides the obvious ones that have that design (eg.
readParcelableList()), subtler cases such as readIntegerArrayList()
could result in custom object deserialization, and since it's all
generics, even the casting inside Bundle wouldn't fail, only after the
client unpacked the list items would it blow up. Now those are checked
beforehand.
Since Bundle always calls Parcel.readValue() under the hood (instead of
specialized APIs such as readParcelable() etc), we had to augment that
method (that's used by LazyValue when retrieving the item) to accept
item types now for containers, which I implemented as a vararg of
Class<?> parameters (this is all private/@hide). This way we could
retrieve a list of intents like readValue(.., List.class, Intent.class),
or a map of string to intents like readValue(.., Map.class,
String.class, Intent.class). For non-container items, we can just pass
no arguments for the vararg. This is explained in internal javadocs.
Inside readValue() now, we also check the container types before
calling the internal methods for deserialization. So, if the thing on
the wire is a VAL_MAP and we know the method we're about to call will
return a HashMap, we verify that the type passed in parameter is a super
type of that (if it's non-null, if it's null it means "perform no
check").
Now, LazyValue became a BiFunction<Class<?>, Class<?>[], Object> to
receive those extra "item types" for containers. The reason for
separating the first from the rest is that the first defines the return
type in the new APIs and inside Parcel, so we need the T from Class<T>
to ensure type-safety.
(I was torn here between using BiFunction or just exposing LazyValue as
@hide for Bundle since it feels like we're missing meaning/abstraction,
but end up leaving this way, advise if you'd prefer the other way)
There was a bit of a refactor in Parcel so readValue() could call
internal methods that accepted nullable Class<?> parameters with the
meaning that null = "no verification" and non-null = "check against
type provided" (because the external APIs all require non-null
parameters).
Now we can return null in all cases when there is a type mismatch. Note
that the Bundle APIs catch ClassCastException to return null, but that
only works for non-generic types (eg. getSizeF()). For generic types
wrapping "return (T) o" with try-catch doesn't work because the type
gets erased to its bound at runtime, so the type mismatch escapes that
try-catch to the caller, potentially causing a crash. Now they happen
inside the getters, as the non-generic ones.
Test: Boots for now
Test: Working on CTS
Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
CTS-Coverage-Bug: 219980813
Change-Id: Ifcbeb34b4684d7de105756b9d414162a9205ffaa
This allows system_server to search/read skfilter BPF programs. Skfilter
BPF programs status were previously dumped by Netd. In Android T, the
related code are mainlined and dumped by system_server process.
system_server needs to be in net_admin group so that it can read program
status.
$ adb root; adb shell ls -l /sys/fs/bpf/
-r--r----- 1 root net_admin ... prog_netd_skfilter_allowlist_xtbpf
-r--r----- 1 root net_admin ... prog_netd_skfilter_denylist_xtbpf
-r--r----- 1 root net_admin ... prog_netd_skfilter_egress_xtbpf
-r--r----- 1 root net_admin ... prog_netd_skfilter_ingress_xtbpf
Bug: 202086915
Test: test in Ib0e935ee2b714ac61daceba6d13fa7a20f97f68f
Change-Id: I8c48230a5da6873eee7d0ba183cb83e1d92cd8f6
Expose an API to allow VPNs app to ask for running the validation
check on the VPN network built from Ikev2VpnProfile.
Bug: 184750836
Test: New test in Ikev2VpnTest
Also FrameworksNetTests
Change-Id: I385bb887b6c697d8f5d87af750dbd2aab44afca6
CTS-Coverage-Bug: 184750836
(but CTS is in the same topic, just not detected by the tool)
The "legacy" fs-verity was introduced in P in Pixel 3 kernel. During
fs-verity upstream to Linux, the API has changed. During Pixel 4 / Q
development, fs-verity was upstreamed to Linux kernel. By setting
ro.apk_verity.mode = 2, device vendors such as Pixel 4 can opt in to
enable the support. The feature has become mandatory for new devices
shipped with R.
Since Pixel 3 family is no longer supported, it's time to remove the
dead code.
Bug: 120629632
Test: m
Test: TH
Change-Id: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
Merged-In: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
Expose TrafficStats#attachSocketTagger and use it instead.
Test: atest TrafficStatsTest
Bug: 204830222
CTS-Coverage-Bug: 214979748
Change-Id: I1748d349b499053ad08bd62202325fa759ad8da5
Expose systemapi NetworkStats.getDetailedUidStats for use by
BatteryStats.
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest NetworkStatsServiceTest
CTS-Coverage-Bug: 213437796
Change-Id: I40d713923278f4654d67bb4d12155cea85c10447
BatteryUsageStats is created under a BatteryStatsImpl lock. One of
the elements of BatteryUsageStats is the battery history buffer Parcel.
Once the BatteryUsageStats object is created, the BatteryStatsImpl lock
is released and the history buffer parcel continues to be appended
by BatteryStatsImpl. The Parcel may even be reset altogether if the
battery stats session is reset. The BatteryUsageStats object is parceled
during the getBatteryUsageStats binder call. Any modification of the
history buffer concurrent with parceling causes a crash.
Bug: 194256984
Test: atest FrameworksCoreTests:BatteryUsageStatsTest FrameworksCoreTests:BatteryUsageStatsProviderTest
Change-Id: I262c4608cd02943f926e8daaf3e782c6fe6eaee7
Merged-In: Ifb03a32275dfbea172cd28309a42349d6dd4bcd5
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 213523117
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest
Change-Id: I9e8d94259ad9845d94bfd78d971ff1a2cd7bb38e
This change is to make the locale picker list enable the nested
scrolling feature. It is necessay to enable this feature to be able to
work with CollapsingToolbarLayout.
Fixes: 207318265
Fixes: 213036789
Test: manual test
1. Verify the locale picker works with Activity
2. Verify the locale picker works with SettingsBaseActivity
Change-Id: Iaf90211da640cd265fc2b23dd34b3149c4406891
(cherry picked from commit fa861a6b5d)
Merged-In:Iaf90211da640cd265fc2b23dd34b3149c4406891
Apexes contain the allowlists for privileged permissions used by their
respective apk's, however vendor (partner) apexes should be forbidden from
using this mechanism.
Test: atest FrameworksServicesTests:SystemConfigTest
Bug: 190375768
Change-Id: I34bf2a80fb66f2b2a732234111a338e3af1e919b
Mostly for consistency with the names used in related changes.
Test: atest com.android.server.pm.parsing.library.ApexSharedLibraryUpdaterTest com.android.server.systemconfig.SystemConfigTest
Bug: 191978330
Change-Id: Ic4ccc0fdca100b576e28bc0918d378cabae9ce61
Merged-In: Ic4ccc0fdca100b576e28bc0918d378cabae9ce61