This requires RestrictedLockUtils to change which then causes further
changes.
I left the old APIs available for non-system-api customers.
Test: RunSettingsLibRoboTests
Bug: 116798569
Change-Id: Id5384ee074bb245e615012b7e0d5298b8bf27ba4
The way we were checking Settings was invoking a 2ms hit.
Move ANGLE_ENABLED_APP to CoreSettings, which are already
available to the ActivityThread, eliminating the hit.
Test: Verify developer option works as expected
Test: atest google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Bug: 117107368
Bug: 80239516
Change-Id: I3df4c3c43489a338b3631484a8811b38c4eff2e6
This adds a new framework user restriction that can be used by the DPC
to block installs from unknown sources on all profiles of a device.
Test: Manual test, disallowing installs in TestDPC disables installing
unknown sources apps.
Bug: 111335021
Change-Id: Ib9fb672c5e5dea2ac63bf8cbd1b04484b12b4056
This CL adds a new privileged permission called POWER_SAVER that
will allow whitelisted packages to toggle battery saver on the
device. This can be done via PowerManager, where the API for
setting battery saver has been updated to accept calls from apps
with either DEVICE_POWER or the POWER_SAVER permission.
Additionally, we whitelist Turbo for the permission.
Test: Framework builds, Turbo can toggle EBS
Bug: 115524274
Change-Id: I49d9747b2d42f792a2f3ba90a15aa23c47e489b3
This CL allows the application's manifest to specify whether
to use ANGLE or native drivers for GLES via meta-data.
To enable, place the following within <application> and it
will be detected by the platform:
<meta-data
android:name:"com.android.angle.GLES_MODE"
android:value:"angle" />
The manifest can also specify "native" to opt-out of
ANGLE, but native will be the default for Q release.
This method is in service of the tech preview of
ANGLE for Android. For Q release, we should move this
to the Android API.
Test: Manual, verify ANGLE can be selected or rejected
Change-Id: I41af7fe02ca6237db042b5f8bdfbab3c9f76078a
(cherry picked from commit a2e5faf4b23bf0b8b84ffc1d67d545e3dd4f8c63)
In order to facilitate ANGLE selection logic in the backend, we need to
start sending more information from GraphicsEnvironment. This includes
the application name, whether the developer opted in, and the list can
be expanded. We also have to send the ANGLE namespace unconditionally
in case the application opts in programmatically.
Bug: 80239516
Test: Manual build, booted clean, ensured developer opt-in still works.
Change-Id: I3b8f99942999de6a3188d2e61355dcd244f9191e
(cherry picked from commit 261dfbd814bf62caaee11e6ebe4e2e61e28f4919)
This commit does the following:
* Create a new Android Setting for use during development,
"angle_enabled_app", which can be used to load ANGLE
only for specified applications.
Usage:
adb shell settings put global angle_enabled_app <package-name>
* When the package name condition is met, build a namespace
that points to the ANGLE APK. The namespace will be used
by the EGL Loader to find ANGLE libs.
* The APK may be the pre-installed version in /system/app/ANGLE,
or it may be an updated version from the Play Store, which will
reside somewhere under /data/app/*.
Test: Manual
Change-Id: Ia0475cf80cf5c2589e52fdb3c8f3672696357923
- Also update vold to create sandboxes for secondary storage devices.
- Since bind mounts are created in the process specific namespaces, we
don't need /mnt/storage anymore which we were using it to prevent
some bind mounts from propagating onto /mnt/runtime/write.
- Create bind mounts for {media,obb} dirs similar to data dir in
per process namespace.
- Also fix a bug where we are not passing correct packages to vold when
a new user starts.
Bug: 111890351
Test: manual
Change-Id: I1abbafabc58993860305e5a928c980420f89f289
Allow VPN apps to lookup the UID owner of a network connection.
Requires specifying the:
- IP address and port for both the source and destination of a TCP
connection.
- IP address and port for either source and destination or just
source for a UDP connection.
Only TCP and UDP protocols are supported. Only connections for UIDs
that apply to the calling VPN app will be resolved. This is intended
to replace direct app access to /proc/net/{tcp,tcp6,udp,udp6}.
The implementation uses netlink inet_diag sockets[1] to perform
the lookup on TCP sockets as well as UDP sockets when supported
(kernel has CONFIG_INET_UDP_DIAG=y).
[1] http://man7.org/linux/man-pages/man7/sock_diag.7.html
Bug: 9496886
Bug: 109758967
Test: atest HostsideVpnTests
Test: atest InetDiagSocketTest on Taimen with CONFIG_INET_UDP_DIAG
and on Sailfish without CONFIG_INET_UDP_DIAG.
Change-Id: I2bbc7072dd091e2e653dadf6dc05024c04180f34
Add ThreadLocalWorkSourceUid and Message.workSourceUid
which will store the UID which caused, directly or
indirectly, the Message to be enqueued.
This was needed because using Binder.getCallingUid() does
not give us enough data since quite a few Binder services
call Binder.clearCallingIdentity() when processing the
call.
Test: UT and manual
Change-Id: I35af3a9ca5193477070990b41ff5d9c52f420069
When statsd pulls data from StatsCompanionService, the data is put into
log_msg format on java side and expanded into LogEvent on cpp side.
There is a lot of dependency on log_msg and liblog to add new types.
There is pending bug to rewrite thta part of the code in statsd to
completely rid the legacy of logd and liblog. But that may not happen
soon.
Now we can support new storage type.
Also no need to specify number of fields in StatsLogEventWrapper cstr,
which is a source of bug in P.
Bug: 115775035
Test: manual test and cts test
Change-Id: Id1f0b033885da6f3bcebe043968061821db48f35
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Otherwise throw an IllegalStateException.
Fix: 26885514
Test: Make the bundle length not aligned by 4 and observe the IllegalStateException.
Change-Id: I57f0d5babdf1b8f1074eb2f4f76b71926db8b93c
We created this API to make it easy to pass a given UserHandle into
all Managers obtained from a given Context, which works great for
"normal" users, but we should also support special users like ALL
and CURRENT.
Also add an AutoCloseable marker to make try-with-resources easier.
Bug: 112153259
Test: atest android.content.cts.ContextTest
Change-Id: I261dfcc5cfdfc76bda5d70181785e11c2715a558