We thought we could push everyone through sdcardfs, but secondary
devices mounted in a stable location don't give full write access to
apps holding WRITE_EXTERNAL_STORAGE, so system internals still need
to reach behind sdcardfs.
To keep sdcardfs in the loop about changes that we make behind its
back, we issue access(2) calls which should be enough for it to
invalidate any cached details.
Bug: 74132243
Test: manual
Change-Id: I727cd179a5a825b16ec4df6e2f41a079758d41c5
PersistableBundle.java expects items to be sorted by the hash codes
of the keys, but PersistableBundle.cpp isn't compatible to it.
PersistableBundle.java now knowns what was parceled by C++
because it now uses a different magic, and change the unpercel
strategy.
Change-Id: Ia516f80b6d48dcb9f981767e0e64303434f39fb4
Fixes: 65744965
Test: adb shell sm fstrim and check logcat
Previously the recommendation seemed to be to just call read/writeInt with a ternary, but if that isn't good enough for internal callers then it isn't good enough for external ones. Plus there's tons of StackOverflow questions and "me too"s on a 8-year-old bug. Boolean is sufficiently ubiquitous as a type to warrant a public method.
Bug: 36912353
Test: none
Change-Id: I7fac76d8ea8647b09b87befbcba41f3f0f2de1dc
Test: On sailfish, set vibration intensity to High, lock the phone and
unlock with FPS. Vibration should be played.
Bug: 76129874
Change-Id: I546341e55fa0e6de0af1d22c8e8e07d67670f0b9
Merged-In: I546341e55fa0e6de0af1d22c8e8e07d67670f0b9
Test: On sailfish, set vibration intensity to High, lock the phone and
unlock with FPS. Vibration should be played.
Bug: 76129874
Change-Id: I546341e55fa0e6de0af1d22c8e8e07d67670f0b9
Merged-In: I546341e55fa0e6de0af1d22c8e8e07d67670f0b9
Virtual disks are adoptable by default, but for debugging purposes
we want to treat them as unadoptable in some cases. Add the ability
for the "sm" shell command to force on/off, or return to default.
Bug: 77849654, 74132243
Test: manual
Change-Id: Ieda317396624ca081e5dd9568795483f684f9297
The warning dedupe logic in the runtime meant that only the first usage of
each API was detected. Disable this logic when DETECT_VM_NON_SDK_API_USAGE
is enabled.
Test: m
Test: $ atest android.os.cts.StrictModeTest#testNonSdkApiUsage
Bug: 78268765
Change-Id: Iba1127b84180b9a5e5eb68abc4691ccad082b80e
If we send a bad API whitelist to the Zygote, it causes it to close the
socket. If we take no further action in AMS, it results in the same list
of exceptions being sent when we re-open the socket, resulting in it again
being closed. This results in no longer fork/start any new processes.
Since the list is persisted, this would result in the device entering a
boot loop upon reboot. Since no apps could be started, we cannot recover.
So in the case that the exemptions list causes problems, clear out the
list so we don't try to send it again next time. This means we will see
a single failure, but future attempts will succeed (obviously without
any whitelist). The device should not enter a boot loop.
Note, the test below relies on the fact that we can send at most 1024
arguments in a command to the Zygote (MAX_ZYGOTE_ARGC), and that each
item on the list is a separate argument.
Test: adb shell settings put global hidden_api_blacklist_exemptions \
Test: $(for i in {1..1025}; do echo -n $i,; done)
Bug: 64382372
Change-Id: Ie47095d516c247ff6a8d667a2ac9b7be45f1acda