As a temporary measure waiting for the more robust b/176927978 to be
implemented, query the file lock status of processes prior freezing
them, and skip freeze if any locks are held.
Test: verified form the logs that processes holding file locks are not
frozen
Bug: 176928302
Change-Id: Ib7e1715effb63c1b304ce22a9451294fd9f7b10d
Merged-In: Ib7e1715effb63c1b304ce22a9451294fd9f7b10d
The visibility setting of a removable device shared with Chrome OS is
passed via Disk flags. When a device (stub volume) is marked as visible,
we should set the MOUNT_FLAG_VISIBLE flag to it.
Bug: 123377807
Bug: 142684891
Bug: 132796154
Test: Toggle the visibility setting of a removable device in the Chrome
Test: OS Settings app > Confirm that the device is visible to Android
Test: apps only when it is marked as visible.
Test: Tested in R
Change-Id: I19289596345690b1802738122fe274eeb41f9361
This permission model is only allowed for BUGREPORT_MODE_TELEPHONY to
let carrier apps (even from the Play Store / not pre-loaded) access
BugreportManager to trigger connectivity bugreports.
This also requires SELinux policy changes to allow non-system apps to
get an instance through Context#getSystemService, and then dumpstate
also needs permissions to write public apps' files.
Minor documentation and formatting fixes as well.
BYPASS_INCLUSIVE_LANGUAGE_REASON=leaving variable name derived from
"bugreport-whitelisted" sysconfig alone for now
Bug: 161393541
Test: atest CtsCarrierApiTestCases:BugreportManagerTest
Change-Id: I5a38e7a040fa23146fa6c1e785db102b066ad167
Merged-In: I5a38e7a040fa23146fa6c1e785db102b066ad167
(cherry picked from commit 57fd3440be)
In preparation for a broader set of apps using BugreportManager, we
enforce that only the app which started a bugreport is allowed to cancel
it.
Bug: 161393541
Test: atest BugreportManagerTestCases
Test: manual with two apps triggering/cancelling BRs
Change-Id: I430d856014a226ef345bd2349f0601062dcaa8c7
Merged-In: I430d856014a226ef345bd2349f0601062dcaa8c7
(cherry picked from commit 4a1b9e949d)
This command will be used in tests so tests won't mount data and obb
dirs anymore so won't be killed by system when volume is unmounted.
Bug: 148049767
Test: Enable storage app visibility flag, then run "sm unmount-app-data-dirs PKG PID USER_ID", data and obb are not mounted in /proc/$PID anymore.
Change-Id: Ie5ddf55471f59c61e1906664b87a9bf889702536
Makes two new SystemApis:
getRestrictedProfileParent()
canHaveRestrictedProfile()
Temporarily disables VPN Tests that rely on the old APIs until those
tests are updated (b/175883995).
Bug: 171529940
Test: atest FrameworksNetTests:com.android.server.connectivity.VpnTest
Test: Tests for UserManager SystemApis are TODO awaiting completion of new user test infrastructure (b/163890431)
(cherry picked from commit 20ba13f5bc)
Change-Id: I28e39400039631e7d391dc7b0d003e8a38d1f06a
Expand the "DynSystem" abbreviation to "DynamicSystem".
For simpler log grepping.
Bug: 165471299
Test: No
Change-Id: Ibec692ae45539dacd55e13ffaa903b58f3bf0417
* Remove calls to featureFlagEnabled() as they are causing avc denials,
plus the feature flag is already deprecated.
* Add Intent flag FLAG_ACTIVITY_NEW_TASK to fix the
AndroidRuntimeException, as the Context object used to startActivity()
may not be an Activity object instance.
* Check the nullness of mListener before using it to fix the
NullPointerException.
Bug: 176795908
Test: atest \
cts/tests/tests/os/src/android/os/image/cts/DynamicSystemClientTest.java
Change-Id: I265d9912e76c39406e0adeacd2490b62873c94e4
DSU service would try to install a DSU scratch partition if host system
is debuggable.
If the scratch partition failed to install, then skip installing
scratch, as remount support should be optional.
Otherwise if the guest system is non-debuggable, then the scratch
partition would be ignored by guest, which is harmless.
Otherwise the guest system is debuggable, which means the guest system
would be able to do adb remount.
Relax partition allocation status polling rate from 10ms -> 100ms,
because there's no point polling faster than the screen framerate.
Bug: 165925766
Test: TH
Test: Install a DSU system on a debuggable host, reboot into the guest
system, and guest system can remount.
Change-Id: I9a8255483cc963ebcf7a2909e68ac69371cb369f
- buffer is in bytes, not bits (1MB vs 1Mb)
- this exception is actually a heuristic currently, pending b/28321379
Fixes: 149869862
Test: N/A
Change-Id: Id409a1ce7348666ec9ad6437acf67382be0a0a1f
With latest kernel changes, total GPU memory usage is reported and can
be obtained via a BPF program. Create JNI interface to query it and
report inside dumpsys meminfo output.
Bug: 171261987
Test: dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: I949a13836d5b5bc87fc43f60871b4fbf2add6480
Change-Id: I949a13836d5b5bc87fc43f60871b4fbf2add6480
In a previous change (https://r.android.com/1394342), we did a mass update of whitelist->allowlist
and blacklist->denylist in network policy related code. Updating
some usages of those (like allowlisted to allowed) to make them
sound natural.
Test: atest services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Test: atest services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I6d34b0bd3cdb64d5872874fd9378bfc962a24f8d
Forward ownership of libbinder and libhwbinder related things to
respective libbinder and libhwbinder OWNERS sets, to support future
developments.
Bug: 149869862
Test: N/A
Change-Id: If14bfdd89719c7cb1e39594aecdb089d4d5c96e3
In order to support ConnectivityService mainline, the dependency
with NMS should be removed. The idle timer control API should be
replaced with calling INetd interface instead of using NMS hidden
API.
The state reporting will be triggered from updating idle timer
and netd unsolicited interface activity changed events.
BatteryStatsService should be able to get the netd event by
registering the listener directly. This commit exposes two system
APIs to report the radio power state for wifi and mobile for
supporting update idle timer from CS directly to INetd.
Bug: 170598012
Test: make update-api ; m
Change-Id: I286d6aa237ecb2653e1464e26a3581b8eeeb9e63
This API isn't aware of slot switch, and shouldn't be used by
phonesky. So we prefer to deprecate it in case new callers use
it accidentally. Also don't allow callers with REBOOT permission
to call it.
Bug: 170664917
Test: build
Change-Id: I540b87fad461cb2c900f3e9d177bb5147abc1a22