OSDN Git Service

Only kill apps with storage app data isolation enabled
authorRicky Wai <rickywai@google.com>
Thu, 29 Apr 2021 16:47:28 +0000 (17:47 +0100)
committerRicky Wai <rickywai@google.com>
Fri, 30 Apr 2021 09:06:32 +0000 (10:06 +0100)
commita58b535495f274f2a576150e4f574d90256d73dd
tree30fe8d74cf186b61df119391b37c76f6dfb868d4
parent73eda071ef9c19d8631841c116ce127a614b3c15
Only kill apps with storage app data isolation enabled

Originally it kills all the apps with obb and data mounted.
Due to recent changes, all apps will have obb and data dirs mounted
in default root namespace. Hence all apps will be killed by
by KillProcessesWithMounts().

To fix this, we also check if the dir is mounted as tmpfs,
as the default namespace one is bind mounted to lowerfs,
which app data isolation is mounted as tmpfs, so we only
kill the process that have obb dir mounted as tmpfs.

Bug: 148049767
Test: Able to boot without warnings / errors
Ignore-AOSP-First: Merge it along with other CLs, will cherry-pick to
AOSP afterwards.

Change-Id: I45d9a63ed47cbc27aebb63357a43f51ad62275db
Process.cpp
Process.h
Utils.cpp
Utils.h
model/EmulatedVolume.cpp