Temporarily disabled new data stack until all CTS fixed
on aosp_master.
Fix: 226046162
Test: atest CtsNetTestCases
Change-Id: Ie40ca14ae986192542bc1318bd345d9d31562680
Invert the flag so even if this flag does not exist in the
resource, the new data stack is still enabled by default.
Fix: 228813515
Test: Manual && atest FrameworksTelephonyTests
Merged-In: I75737c0ef9bce91385f815133e1878e5abea68ff
Change-Id: I75737c0ef9bce91385f815133e1878e5abea68ff
Internal storage must be prepared before adoptable storage, since the
user's volume keys are stored in their internal storage. Previously,
the order depended on the Java hashcodes of the volume IDs. It seems
that in practice things sort of worked out anyway even with the wrong
order, via a bizarre sequence of events involving the user's storage
being deleted and re-created several times. Regardless, let's fix it.
destroyUserData() sort of had the reverse bug, although I don't think it
actually mattered. My concern there was that destroying the internal
storage first would bypass vold's destroyKey() for the volume keys.
However, that's okay since the volume keys don't actually need a special
destruction procedure in this case. Also, internal storage has already
been locked when destroyUserData() runs anyway.
Test: On Cuttlefish:
$ sm partition disk:253,32 private
$ pm create-user 10
$ pm remove-user 10
Checked logcat for expected messages.
Bug: 231387956
Change-Id: I146d8c786c6b923aed7f8c748db8a7e90c96687f
Provide a way for the system Setting app or other similar system
apps to set the app exclusion list for the specific VPN from
VpnManager. The list affects only VPN provisioned from
VpnManager to keep the design consistence for app using
VpnService.
The list is stored in the keystore for its persistence.
Bug: 192078259
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I157823866e1899b40aa36ea2c0bc4a80370108be
This change adds a utility to convert persistable bundles to and from
disk-stable byte arrays.
Test: atest FrameworksVcnTests:PersistableBundleUtilsTest
Change-Id: Ifafb7081ec6a34ce3ab8e2aa502d46411405cb6d
/data/system_de is only for per-user data; it *must* only contain
per-user encrypted directories. Only vold should ever create anything
directly in this directory. In preparation for removing system_server's
write access to this directory (https://r.android.com/2078213), make
UsageStatsService store its globalcomponentusage file at
/data/system/usagestats/globalcomponentusage instead of
/data/system_de/usagestats/globalcomponentusage.
Migration happens lazily, except that the old file and directory aren't
ever deleted since the SELinux policy will no longer allow system_server
to do that; the old file just stops being used. vold will need to
handle the cleanup instead, or we could just leave the file around.
Note that before Android 11, UsageStatsService stored per-user stats in
/data/system/usagestats/$userId. These per-user stats are *not* the
same thing as globalcomponentusage, which was added in Android 12.
UsageStatsService contains code to migrate the per-user stats to
/data/system_ce/$userId/usagestats. This is fine, and is the right
thing to do, since the per-user stats are potentially sensitive per-user
data. This does mean that UsageStatsService now implements two types of
migrations, and that the source directory for one migration is the
target directory for the other, which is a bit unfortunate. However,
since different files are involved in each one, it all works out.
Bug: 156305599
Change-Id: I53c16640e8ed8b7eac111990f1cdb3f59579e051
NETWORK_TYPE_BITMASK_LTE_CA is not used anywhere even if it's
accidentally passed into setAllowedNetworkTypesForReason(). Will be deprecated in U.
Fix: 230383206
Test: atest cts/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java
Change-Id: Id0c521c4fb74eaf7d73deaf122e923f72b924c18
The permission allows a package to create a protected VM with custom
config. It's used by MicrodroidHostTestCases.
Bug: 207769805
Test: atest MicrodroidHostTestCases
Change-Id: If049d26c0ef97695098979c4a36fe1f7f607af5a
Bug: 213183041
Change-Id: I043d3e7c24f59d17779f81c8a43109beecf7d881
Test: Manually verified by replacing it to US and sending messages to the short numbers
Apps are able to prevent their death by forking multiple processes
under different services and monitoring for the death of any of these.
When a child death is detected, the remaining process restarts the
terminating/terminated service before it's able to be killed itself.
This is now prevented by freezing all processes before killing any of
them so that no process can react to the death of another.
Bug: 148425913
Test: vsoc_arm64:/ $ monkey -p com.haok.nirvana 1
Test: bash arg: -p
Test: bash arg: com.haok.nirvana
Test: bash arg: 1
Test: args: [-p, com.haok.nirvana, 1]
Test: arg: "-p"
Test: arg: "com.haok.nirvana"
Test: arg: "1"
Test: data="com.haok.nirvana"
Test: Events injected: 1
Test: ## Network stats: elapsed time=3200ms (0ms mobile, 0ms wifi, 3200ms not connected)
Test: vsoc_arm64:/ $ ps -eo pid,uid,ppid,name|grep 10088
Test: 6827 10088 2973 com.haok.nirvana
Test: 6850 10088 2973 com.haok.nirvana:resident
Test: 6867 10088 2973 android.media
Test: 6895 10088 1 app_d
Test: 6899 10088 1 app_d
Test: vsoc_arm64:/ $ am force-stop com.haok.nirvana
Test: vsoc_arm64:/ $ ps -eo pid,uid,ppid,name |grep 10088
Test: 1|vsoc_arm64:/ $
Test: Also tested manually on Pixel 6 Pro
Change-Id: Ib0231eaf4b11b15a3d6bac5dc5486844f0f81d18
The /data/system_ce/$userId and /data/system_de/$userId directories are
created by vold, so they should be deleted by vold as well, and in fact
that would already happen except that system_server deletes them
recursively before vold gets to it. Change system_server to delete just
the contents of these directories.
This is a prerequisite to locking down the ability to create these
directories (https://r.android.com/2078213), which is needed to stop
subdirectories from accidentally being created too early. Technically
we could achieve this goal without limiting delete access, as it's
create access that really matters, but having the operations be paired
properly is much cleaner.
Test: Created and deleted a user, and verified that all their
directories still got deleted.
Test: atest UserDataPreparerTest
Bug: 156305599
Change-Id: Iec908e1bc15a00c7179fcd1d80321c315682d339
Removing all process groups during system_server startup can race with
process group creation from init which results in occasional failure to
create a process group and failure to boot the device.
Move process group purging into init to prevent such a race.
Bug: 228160715
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I2e50f53c9692424c994c0b4ee6f1e2762632c3bc