Commit Graph

17279 Commits

Author SHA1 Message Date
Eric Biggers
6d66f9a556 Stop trying to update FDE password from LockSettingsService am: d63d0e12cc am: 426b3da0d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2016259

Change-Id: Id5a34ed74e970ea553bdf46640ccc3d0f35dc09d
2022-03-10 01:18:10 +00:00
Eric Biggers
c1341a7fb3 Remove clearEncryptionPassword() from LockPatternUtils am: 0a9389d296 am: a8daebb9d0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2016258

Change-Id: I8829b879fdd22f5a029a269d17113928df4f4827
2022-03-10 01:18:06 +00:00
Eric Biggers
c76db81ef9 Stop trying to get/set fields in FDE footer am: 77d147be49 am: a051497d86
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2016257

Change-Id: I0cfcaaa9d6113abb8a62ac56a34b872f380f29f3
2022-03-10 01:17:54 +00:00
Eric Biggers
d63d0e12cc Stop trying to update FDE password from LockSettingsService
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
2022-03-09 05:11:10 +00:00
Eric Biggers
0a9389d296 Remove clearEncryptionPassword() from LockPatternUtils
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
2022-03-09 05:11:09 +00:00
Eric Biggers
77d147be49 Stop trying to get/set fields in FDE footer
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
2022-03-09 05:11:09 +00:00
Chiachang Wang
c30f82b94b Merge "Set local routes exclusion in the networkAgent" am: 4734b5810b am: b8cda9d7e0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978095

Change-Id: I46931b7926b1da889989384159b012826e02d96a
2022-03-07 08:09:05 +00:00
Chiachang Wang
b8cda9d7e0 Merge "Set local routes exclusion in the networkAgent" am: 4734b5810b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978095

Change-Id: I03eaf7cf1ffc7237f267a85d2d1a25d93afe3896
2022-03-07 07:46:21 +00:00
Chiachang Wang
4734b5810b Merge "Set local routes exclusion in the networkAgent" 2022-03-07 07:25:52 +00:00
Chiachang Wang
68e528d468 Set local routes exclusion in the networkAgent
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
2022-03-07 04:26:52 +00:00
Andrei-Valentin Onea
a5098729ea Merge changes from topic "ignore-vendor-apex-allowlists" am: a22612eb94 am: 8ceedbd375
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926339

Change-Id: Ida1d994bb0f24f7a8f83bf1fef47d41457b243d1
2022-03-01 16:13:12 +00:00
Rhed Jao
6bd95fdfb4 Ignore prebuilt shared library if it doesn't exist on device am: 791eb6934d am: e7be86fd15
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926342

Change-Id: Iff9caa4a49a55f47ef785466ba29f355a569593e
2022-03-01 16:13:04 +00:00
Pedro Loureiro
2367227297 Rename updatable-library to apex-library am: 1df9a1e8f5 am: be595a1cb7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954037

Change-Id: I89d0a4a0ef490a8bc8d9bd41c346aece4e1df58e
2022-03-01 16:13:00 +00:00
Pedro Loureiro
c19d3ed957 Parse new xml attributes used for updatable shared libraries am: 5c228ca3e9 am: 7936aaf92e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926341

Change-Id: I7ae71734b45022e40403df1f1ec7d4290fb61d76
2022-03-01 16:12:58 +00:00
Alex Buynytskyy
56ab2afd2c Create XML parser only once. am: 66fc1f1941 am: 1adacbf9d7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926340

Change-Id: I0fce88538388f7105653e20c66a7b78cecc490ad
2022-03-01 16:12:55 +00:00
Andrei-Valentin Onea
8ceedbd375 Merge changes from topic "ignore-vendor-apex-allowlists" am: a22612eb94
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926339

Change-Id: Ia43268fea619a0af6a39aef79cc52ed67e92ee99
2022-03-01 15:51:43 +00:00
Rhed Jao
e7be86fd15 Ignore prebuilt shared library if it doesn't exist on device am: 791eb6934d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926342

Change-Id: I63155e278047882b33af00e349d2a7a32099655c
2022-03-01 15:51:38 +00:00
Pedro Loureiro
be595a1cb7 Rename updatable-library to apex-library am: 1df9a1e8f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954037

Change-Id: I559fecd56edbc4fcf1047bb8ab9ec029e515e17f
2022-03-01 15:51:31 +00:00
Pedro Loureiro
7936aaf92e Parse new xml attributes used for updatable shared libraries am: 5c228ca3e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926341

Change-Id: I2255f2357f4786cb8931e83cb007a2818a3ba720
2022-03-01 15:51:26 +00:00
Alex Buynytskyy
1adacbf9d7 Create XML parser only once. am: 66fc1f1941
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926340

Change-Id: I83e8a593a251300aee1fa8d6d9002d22eabf6fc8
2022-03-01 15:51:14 +00:00
Andrei-Valentin Onea
a22612eb94 Merge changes from topic "ignore-vendor-apex-allowlists"
* 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.
2022-03-01 15:15:56 +00:00
Treehugger Robot
cdeb61ebb7 Merge "Add a runtime check to ensure that system server jars are prefetched." am: 990ac01f71 am: a80c2cd027
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925695

Change-Id: I38f4a3f9f523fc2a59c0dd9569870c0a7de7379f
2022-02-25 14:35:25 +00:00
Treehugger Robot
a80c2cd027 Merge "Add a runtime check to ensure that system server jars are prefetched." am: 990ac01f71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925695

Change-Id: I90d1b85718c49e772107724aea59155dbe0bf8d1
2022-02-25 14:10:46 +00:00
Treehugger Robot
990ac01f71 Merge "Add a runtime check to ensure that system server jars are prefetched." 2022-02-25 13:44:34 +00:00
Jiakai Zhang
8db9757f08 Add a runtime check to ensure that system server jars are prefetched.
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)
2022-02-24 16:21:28 +00:00
Bernardo Rufino
aed366dc04 Merge "Add safer Bundle APIs and deprecated old ones" am: c5589d2c92 am: ce09bba3fc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1988908

Change-Id: I2f821d9de45980035ae3b4f36d83b36ad859568e
2022-02-22 14:10:52 +00:00
Bernardo Rufino
ce09bba3fc Merge "Add safer Bundle APIs and deprecated old ones" am: c5589d2c92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1988908

Change-Id: Iadab8b0106bf99b9c6fbdeca6cc020e1d909ae1a
2022-02-22 13:50:00 +00:00
Bernardo Rufino
cccb1b78d9 Add safer Bundle APIs and deprecated old ones
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
2022-02-19 14:10:29 +00:00
Xin Li
2b87be68b8 Merge SP2A.220305.012
Bug: 219523960
Merged-In: I748fdd49626acaa0e986a9d8038039cada6faa60
Change-Id: I67693156d705f2488fe18149d2dd02d529f009ff
2022-02-14 20:06:38 +00:00
Xin Li
5ad6db7742 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I8cfa435bb6233818adb9cc99dadeeb06a03443d5
Change-Id: Ib93992d88fd1704179009a3872798b9e7b83a6d1
2022-02-11 07:25:43 +00:00
Treehugger Robot
94c6cdf4fb Merge "[MS70] Have BatteryStatsImpl use the public NetworkStats API" am: 8bbb5be10e am: 6a48a6d6f2 am: acc12c32f4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978092

Change-Id: Ib55e46bdb2679fea42d37a4858accd4c41d86d51
2022-02-10 18:49:56 +00:00
Treehugger Robot
acc12c32f4 Merge "[MS70] Have BatteryStatsImpl use the public NetworkStats API" am: 8bbb5be10e am: 6a48a6d6f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978092

Change-Id: I81ad272bcfd09eaf9da4dbcaf2e5b56c73eba5ea
2022-02-10 18:34:14 +00:00
Treehugger Robot
8bbb5be10e Merge "[MS70] Have BatteryStatsImpl use the public NetworkStats API" 2022-02-10 18:04:39 +00:00
Junyu Lai
571e216af5 [MS70] Have BatteryStatsImpl use the public NetworkStats API
Test: BatteryStatsManagerTest
Bug: 204830222
  (cherry-picked from ag/16713581)
Change-Id: I35dd909b5da563cea27d8a81a81fe472c59e9b17
Merged-In: I35dd909b5da563cea27d8a81a81fe472c59e9b17
2022-02-09 22:04:45 +08:00
Ken Chen
d13163b7a5 Merge "Add system_server to net_admin group" am: f584f880ab am: 0cd6e77d0e am: 18a04ccda5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978086

Change-Id: Iee69ac1cace716b3fa457518db7c97b9a7731285
2022-02-09 10:24:30 +00:00
Ken Chen
18a04ccda5 Merge "Add system_server to net_admin group" am: f584f880ab am: 0cd6e77d0e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978086

Change-Id: Ied6448fb2f73d8867463357d6eacc7fbe00ddaea
2022-02-09 10:12:53 +00:00
Ken Chen
f584f880ab Merge "Add system_server to net_admin group" 2022-02-09 09:42:29 +00:00
Jeff Chang
4436955d35 [RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity am: 9c5c42ad03 am: 0281b203d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16743243

Change-Id: I9833001187073a9a148690e34c0960fc687a6022
2022-02-09 09:26:33 +00:00
Jeff Chang
0281b203d8 [RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity am: 9c5c42ad03
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16743243

Change-Id: I36a91c0de0d6a072f930277c0f235177b7822d33
2022-02-09 09:09:08 +00:00
Jeff Chang
aa0349bc78 [RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppWarningActivity am: f36b7b9f80
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16742068

Change-Id: I32f44bfc27e8086a2937112851989c1160877b39
2022-02-09 08:45:52 +00:00
Jean Chalard
aac1b3a307 Merge "Allow VPN apps to ask for running the validation checks" am: cbb2fa2f00 am: 64ba50411e am: 1f929d9bd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962928

Change-Id: Ie35764f5a4d7f9c1d3765a73331687450bbdbaf5
2022-02-09 06:56:37 +00:00
Jean Chalard
1f929d9bd5 Merge "Allow VPN apps to ask for running the validation checks" am: cbb2fa2f00 am: 64ba50411e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962928

Change-Id: I8dcb813cfe589411da7345bc2c4308e9f149b275
2022-02-09 06:38:31 +00:00
Jean Chalard
cbb2fa2f00 Merge "Allow VPN apps to ask for running the validation checks" 2022-02-09 06:03:45 +00:00
Ken Chen
5c5b682b6d Add system_server to net_admin group
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
2022-02-09 03:47:18 +00:00
Felipe Leme
cc98604cbe Merge "Adds OWNERS to com.androd.internal.util.Dump*" am: 0b6e3a959b am: 2727d1af13 am: a9428c51ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976675

Change-Id: I613dd7d9e8e246aef420bda8c79817685a690be1
2022-02-08 19:22:08 +00:00
Felipe Leme
a9428c51ac Merge "Adds OWNERS to com.androd.internal.util.Dump*" am: 0b6e3a959b am: 2727d1af13
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976675

Change-Id: I9094e6421123193cc474520d43c00f299e64a3ac
2022-02-08 19:05:18 +00:00
Felipe Leme
0b6e3a959b Merge "Adds OWNERS to com.androd.internal.util.Dump*" 2022-02-08 18:14:23 +00:00
Chiachang Wang
3fc98d5ebd Allow VPN apps to ask for running the validation checks
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)
2022-02-09 02:19:15 +09:00
Felipe Leme
3c5dea3fe4 Adds OWNERS to com.androd.internal.util.Dump*
Test: no, thanks
Bug: 149254050

Change-Id: I1dbb8a4c04817f39de147927c26c14e461eb564b
2022-02-08 08:50:43 -08:00
Treehugger Robot
ed3eb039b8 Merge "Delete legacy fs-verity support" am: 81568fa22f am: b4661e274c am: b754030dbe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1966068

Change-Id: If68ccff8bad40fd9c74f38a7cd935a00c1575ba8
2022-02-08 01:50:05 +00:00