Remove getGpuDmabufUsageKb since the kernel no longer
supports the sysfs nodes that this depends on.
Add getGpuPrivateMemoryKb which uses the memtrack hal
to report the system-wide GPU private memory.
Bug: 193226716
Bug: 193465681
Bug: 192621117
Test: dumpsys meminfo
Change-Id: Ib90505ec184339d5acbcd42c67dad3ad65dbd933
The issue occurs when the application proc state changes
rapidly, e.g. from FOREGROUND to BACKGROUND to CACHED.
The original code would sometimes attribute the time slice
to the wrong proc state.
Bug: 192550308
Test: (on cuttlefish) atest --rerun-until-failure 300 FrameworksCoreTests:com.android.internal.os.BstatsCpuTimesValidationTest -- --abi x86_64
Change-Id: Ic22bbfa3aae701014fc016ec9e2d32b1c528d462
Using a direct ByteBuffer allows the buffer to be passed to/from JNI
without intermediate copies.
Test: FileBridgeTests, apps get installed without allocation churn
Bug: 192020559
Change-Id: Ic5965c94ba14de6599af67d2e3bba33cd9996046
Fix the implementation of SystemVibrator to return always no support to
all effect and primitive constants on devices with no vibrator.
Fix: 191414125
Test: FrameworksCoreTests:VibratorTest
Change-Id: I0fd9e27d6e2890df9ee206029488ea70ff50712d
Load composition and pwle limits from the HAL and apply them on
VibrationThread to split long vibrations in multiple calls.
This ensures that long vibration will be performed by the HAL.
Bug: 188431691
Fix: 183517124
Test: VibrationThreadTest & VibrationInfoTest
Change-Id: I09a04c7b1de331320d453899f59b01e4bbb42ac3
Leave the configuration empty by default, which should be ignored by the
audio framework and impose no limit to haptic signals.
Bug: 188025353
Test: N/A
Change-Id: I7553fc00d59d6b0dd52c679320880fc86c4c4aa7
The usageFilter parameter added to Vibrator.cancel is always cancelling
UNKNOWN vibrations (usage = 0). The filter should only cancel them if
the value is the same usage, or if all usages are being cancelled.
Fix: 182440404
Test: VibratorManagerServiceTest
Change-Id: Ibf33fe24e5253501e751b027cbf4b68564d82929
1) Adds UserManager#DISALLOW_BIOMETRIC. We actually need to
pass a restriction from settings to ActionDisabledByAdmin area,
otherwise the biometric-specific dialog would be shown outside of
biometric flows.
2) Adds an interface to ActionDisabledByAdminController to return a
optional OnClickListener for the positive dialog button
3) Returns an instance of the biometric controller when conditions
are met
4) Adds string interfaces to DeviceAdminStringProvider to retrieve
biometric-specific strings
Bug: 188847063
Bug: 191306258
Test: manual
Change-Id: Iaeffdeb1336d5db56d464104cdc7677b9021f609
LocationManagerService was overwriting location source appops tag
information whenever a location provider changed state. Since multiple
location providers can correspond to the same uid/app id, this could
lead to loss of tags. This is fixed by recalculating the set of tag for
an entire app id any time a uid changes.
AppOpsPolicy had a bug where tag lists coming from different uids under
the same appid would inappropriately overwrite each other. This is fixed
by modifying the internal/external APIs to work in terms of appid rather
than uid, so that it is someone else's responsibility to ensure the
result is valid for the app id as a whole.
Also fixes a bug where LMS assumes tag listeners are added prior to any
providers. If listeners are added after some providers they will miss
updates. Fixed by always updating the listener on registration.
Bug: 190073375
Test: manual
Change-Id: Ib52d752d857b6ac3b6683186a8d1bbcb814fb798
When DPM.setAlwaysOnVpn is called with package=null, it resets
any VPN configured by the user. With this change it won't happen
anymore: it will only reset VPN configuration if it was previously
configured by the admin.
If an admin actually wants to remove any user configured VPN, they
can enforce DISALLOW_CONFIG_VPN restriction which will remove any
user VPNs and will prevent the user from configuring a new one.
+ Also make sure that when the DPC removes an always-on VPN
configuration, the package loses ability to start VPN until the
user authorizes it again.
Bug: 139823667
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ia703015b4e8d7eaf156358d7eb000d6f58d32238
Introduces a TestApi that lists which system packages
will be pre-installed for the given user type, for
use with CTS tests that need to predict which packages
are installed on a new user.
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LeaveAllSystemApps
Bug: 189873486
Change-Id: I471c5da55f8cf500a07de5773050a997ea391892
The validation does not exist in Android R and is causing apps to start
crashing in S.
The validation for the static API createOneShot was maintained, as it
already existed in previous releases.
Fix: 184890231
Test: VibrationEffectTest
Change-Id: I606c943a35ddd68ccacab76f0047b9a276b5cf28
Android 10 did not support file path operations for apps in
scoped storage. But Android 11 and above do support file path
operations for such apps.
Fix docs for getExternalStorageDirectory() and
getExternalStoragePublicDirectory() to reflect the current level of support.
BUG: 153562415
Test: m docs
Change-Id: I8bc2a4aa266dbbcc391b415e6209ed6e5d56fe97
Add information to javadocs explaining that apps in background can
only vibrate the device if the given AudioAttributes usage is one of
notification, ringtone or alarm usages.
Bug: 146313440
Test: N/A
Change-Id: Ib0b8401539157f0ce2768aab281f3b23aae38dae
Now that BUS contains an end time and a duration, use
those in the atom instead of estimating them from
the clock time that the request was made.
Bug: 187223764
Test: atest BatteryUsageStatsProtoTests
Change-Id: Ie69d42bfd19c3a0055e96a25ac33c16c0f7d1a3f
Since the handle wasn't nullified, when the memory is explicitly
closed, the finalizer would attempt to close again, which results in
an exception.
Bug: 189213084
Test: Manual verification of ST use-cases, which uses this.
Patch sent to partner for verification.
Change-Id: I4ac6bbdd88b3f729a022896adfed00effec48bd8
While looking into another bug, I noticed that the file descriptors
do not get properly duped when converting to HidlMemory and that they
aren't explicitly closed when creating a temporary instance of
SharedMemory.
Test: Manual verification of ST functionality, which uses these
utilities.
Fixes: 188931943
Change-Id: I76322c56c58be5db8f1a40eb20eb3b96552412f9