Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional installation of play apps into work profile #4

Open
wants to merge 431 commits into
base: 15
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
431 commits
Select commit Hold shift + click to select a range
7fd2a1a
Support forwarding notifications from other users
girlbossceo Mar 19, 2022
86b0e2a
DeviceIdleJobsController: don't ignore whitelisted system apps
muhomorr Jul 7, 2022
faa17a6
do not allow disabling app visibility filtering
muhomorr Apr 6, 2023
7af6fd0
add hooks for modifying PackageManagerService behavior
muhomorr Mar 27, 2023
dde75e3
rename AppsFilterImpl.grantImplicitAccess method
muhomorr Apr 30, 2024
d16f30d
add hooks for modifying ActivityThread behavior
muhomorr Aug 18, 2023
d31c25f
AppBindArgs: infrastructure for passing extra args to app process init
muhomorr May 16, 2023
d600daf
infrastructure for custom handling of known packages
muhomorr Dec 20, 2023
fa01419
gosps: support for per-app GrapheneOS-specific persistent state
muhomorr Jul 31, 2022
17edc17
extend excludedMethods list in AndroidPackageTest
muhomorr Jun 2, 2024
458773c
add method for updating cached package permission state
muhomorr Dec 18, 2023
2d959f2
PackageHooks: infrastructure for per-package hooks in system_server
muhomorr Dec 18, 2023
c342c5b
add base class for complex per-app switches
muhomorr Sep 24, 2023
168bc68
SettingsLib: add CategoryKey for Exploit protection screen
muhomorr Jul 30, 2024
3703c3b
infrastructure for spoofing self permission checks
muhomorr Jul 31, 2022
1c2b943
infrastructure for special runtime permissions
muhomorr Feb 9, 2023
de96fd3
add special runtime permission for other sensors
muhomorr Feb 9, 2023
f603c1f
notify the user when sensors access is denied by OTHER_SENSORS perm
muhomorr Oct 4, 2022
0f1aec2
make INTERNET into a special runtime permission
thestinger Mar 17, 2019
7588f16
improve compatibility of INTERNET special runtime permission
muhomorr Jul 31, 2022
373682c
don't run jobs that need connectivity in apps that lack INTERNET perm
muhomorr May 19, 2023
312b61b
PackageInstallerUI: an option to skip auto-grant of INTERNET permission
muhomorr Oct 7, 2022
55c0141
use permanent fingerprint lockout immediately
thestinger Sep 12, 2017
d7a26c4
add system property for disabling keyguard camera
thestinger Jul 25, 2017
782ffca
add auto-reboot feature
muhomorr Jan 13, 2024
a5abf65
infrastructure for the Storage Scopes feature
muhomorr Jul 31, 2022
820030f
sscopes: temp: disable incomplete handling of READ_MEDIA_VISUAL_USER_…
muhomorr Oct 5, 2023
b7f25be
control access to Android/obb directory with a GosPackageState flag
muhomorr Jul 31, 2022
34a4cfe
add an option to show the details of an application error to the user
muhomorr Aug 8, 2022
1f35203
ErrorDialogController: do not auto-dismiss crash dialogs
muhomorr Oct 1, 2023
dba27b5
Set always-on and lockdown on by default on first vpn connection at s…
quh4gko8 Aug 1, 2022
34d11ac
pre-grant POST_NOTIFICATIONS to more system apps
muhomorr Aug 22, 2022
b30d9c9
allow privileged installer to search for packages across all users
muhomorr Nov 23, 2022
0ff29e8
extend original-package renaming to provider authorities for Vanadium
muhomorr Nov 5, 2022
a08010c
extend original-package renaming to static launcher shortcuts
muhomorr Nov 23, 2022
73eff62
bugfix: properly acquire package state from original package
quh4gko8 Mar 13, 2024
117ab75
disable package parser cache
muhomorr Jan 30, 2023
e197b1a
perform additional boot-time checks on system package updates
muhomorr Jan 31, 2023
40a0d8a
allow out-of-band package updates to use original-package system
muhomorr Jan 27, 2023
b587a10
require fs-verity when installing system package updates
muhomorr Jan 31, 2023
f1320fd
don't allow updating system packages to the same versionCode
muhomorr Dec 27, 2022
e4adebf
allow privileged installers to use getSharedLibraries(MATCH_ANY_USER)
muhomorr Mar 30, 2024
30a5f90
allow only first party app source and shell to update system packages
muhomorr May 2, 2024
ae49d65
Remove build fingerprint from screenshot EXIF
girlbossceo Apr 29, 2022
d40a899
add toggle for screenshot timestamp EXIF metadata
girlbossceo Feb 18, 2023
fde1d45
SUPL: Don't send IMSI / Phone number to SUPL server
MSe1969 Oct 29, 2018
e5fe074
add GNSS SUPL setting
muhomorr Mar 3, 2023
dbfe720
allow privileged installers to maintain a global list of busy packages
muhomorr Mar 4, 2023
fb72c87
add option to scramble PIN layout
muhomorr Feb 24, 2023
2b580b7
enable LOCK_PIN_ENHANCED_PRIVACY setting by default
muhomorr Jun 14, 2023
54a55d6
don't crash apps that depend on missing Gservices provider
muhomorr Mar 26, 2023
a2c7204
integrate Google's EuiccSupportPixel package
muhomorr Mar 27, 2023
0a760f7
integrate Google's eUICC LPA package (EuiccGoogle)
muhomorr May 30, 2023
63f8cc5
do not auto-grant Camera permission to the eUICC LPA UI app
muhomorr Mar 19, 2023
7391546
gmscompat: add compatibility layer for unprivileged GMS
thestinger Jun 6, 2023
d503f19
require vendor camera extensions package to be a system app by default
muhomorr Mar 30, 2023
b033993
add config for Pixel Camera Services
muhomorr Jan 9, 2024
8ffe4e9
infrastructure for creating per-package seinfo overrides
muhomorr Mar 30, 2023
1725923
support denying special access to hardware accelerators by Google apps
muhomorr Apr 6, 2023
be1b113
add GNSS PSDS setting
muhomorr May 2, 2023
73238eb
support redirecting ContentProvider calls to another provider
muhomorr May 16, 2023
55604d3
infrastructure for the Contact Scopes feature
muhomorr May 16, 2023
fc395ab
add connectivity checks setting and its migration from Settings.Global
muhomorr May 25, 2023
d42b5db
Wi-Fi auto turn off
muhomorr Jul 31, 2022
e34454c
Bluetooth auto turn off
muhomorr Jul 31, 2022
2eeb366
implement dynamic deny_new_usb toggle mode
thestinger Jun 16, 2016
0f378fb
add support for hooking LocationManager methods
muhomorr Jun 19, 2023
3e87a2c
improve compat with apps that try to access network location provider
muhomorr Jun 19, 2023
9c30da8
add RemoteKeyProvisioning server override setting
muhomorr Aug 10, 2023
94ae7b1
support showing dexopt progress during boot
muhomorr Oct 3, 2023
ff8761a
fix crash of boot-time info dialog due to delayed font init
muhomorr Jun 13, 2024
a7c257b
don't skip AOT compilation of apps that weren't recently used
muhomorr Nov 14, 2022
63182a6
do not delete compiled code (OAT files) of hibernated apps
muhomorr Oct 11, 2023
20a254a
disable OtaDexoptService
muhomorr Oct 23, 2023
111c5b5
add notification-based UI for the background dexopt job
muhomorr Oct 23, 2023
a2ed0e5
infrastructure for per-package dex2oat compiler filter overrides
muhomorr Oct 31, 2023
98d070e
always use speed dex2oat compiler filter for VPN service packages
muhomorr Nov 1, 2023
9449aa9
add helper class for launching non-standard Settings intents
muhomorr Nov 15, 2023
833c098
add helper class for notifications that link AppSwitch UI
muhomorr Nov 8, 2023
5245c1e
infrastructure for passing extra args to Zygote and WebViewZygote
muhomorr Sep 23, 2023
c2855d0
infrastructure for passing SELinux flags to the kernel
muhomorr Sep 24, 2023
e8b8da6
add per-app setting for hardened_malloc and extended VA space
muhomorr Sep 26, 2023
a07fd32
always stop app zygotes when app is being force-stopped
muhomorr Nov 8, 2023
b7710c1
add per-app native debugging setting
muhomorr Sep 26, 2023
1c2856f
add system API for getting app info by PID
muhomorr Nov 8, 2023
781d65c
infrastructure for handling callbacks from logd to system_server
muhomorr Nov 8, 2023
e38b33b
infrastructure for showing notifications about SELinux TSEC_FLAG denials
muhomorr Nov 15, 2023
be1e369
show notification after app is blocked from accessing ptrace
muhomorr Nov 19, 2023
021c798
fix rate limiting for non-app tombstones
muhomorr Nov 8, 2023
a183426
DropBoxManager: fix TreeSet API contract violations
muhomorr Dec 23, 2023
5e9e711
DropBox: skip spurious system_server_crash entries
muhomorr Jan 15, 2024
44a7a71
DropBox: skip fsck.f2fs results that don't contain errors
muhomorr Jan 16, 2024
e0d46d2
notify the user about notable system journal entries
muhomorr Nov 8, 2023
1b78956
add per-app dynamic code execution settings
muhomorr Sep 26, 2023
8405fb2
improve memory DCL restriction setting
muhomorr Aug 16, 2024
d66b0f2
improve storage DCL restriction setting
muhomorr Aug 16, 2024
f4f9afb
add per-app memory tagging setting
muhomorr Nov 5, 2023
63b9c95
add a test for the new per-app hardening features
muhomorr Sep 20, 2023
c6949e6
Widevine provisioning setting
maade93791 Sep 29, 2023
d471699
add a method for sending BOOT_COMPLETED broadcast to a specific package
muhomorr Dec 23, 2023
1836157
define READ_DEVICE_SERIAL_NUMBER permission for Build.getSerial() access
muhomorr Dec 18, 2023
32dde6b
aauto: define a restricted version of the MANAGE_USB permission
muhomorr Dec 18, 2023
a6dd4cb
aauto: add definition of restricted BLUETOOTH_PRIVILEGED permission
muhomorr Dec 18, 2023
b191306
aauto: add definition of restricted WIFI_PRIVILEGED permission
muhomorr Dec 18, 2023
0dafe9a
aauto: add definition of restricted READ_PRIVILEGED_PHONE_STATE permi…
muhomorr Dec 25, 2023
d5ecaa9
adjust definition of TelecomManager.getUserSelectedOutgoingPhoneAccou…
muhomorr Dec 25, 2023
29ef03f
aauto: support using aauto USB accessory activity as a default activity
muhomorr Dec 20, 2023
434ffe1
aauto: define ASSOCIATE_COMPANION_DEVICES_RESTRICTED permission
muhomorr Dec 18, 2023
c7476da
aauto: support allowing association with "automotive projection" devices
muhomorr Dec 18, 2023
52bbada
aauto: support granting privileged permissions via PackageHooks
muhomorr Dec 18, 2023
12ebb0b
hide from Aurora Store packages that it's not allowed to update
muhomorr Jan 15, 2024
45c1d17
run full explicit GC in SystemUI and system_server after locking
thestinger Feb 2, 2024
820367e
add UsbManager API for configuring USB port security state
muhomorr Feb 23, 2024
37854bc
add setting for USB port security state
muhomorr Feb 23, 2024
b4fe14a
Do not use filter calling uid parameter originally intended for insta…
quh4gko8 Nov 3, 2023
a141982
Disallow the camera shortcut toggle from the lockscreen
neelchauhan May 28, 2024
7639843
disable support for adoptable storage
muhomorr May 29, 2024
3485e34
add a helper class for wiping eUICCs
muhomorr May 29, 2024
f286034
extend the upstream wipe-without-reboot implementation
muhomorr Jun 1, 2024
cf99897
add duress password feature
muhomorr May 29, 2024
f22ded2
add lock_settings shell commands for testing the duress password feature
muhomorr May 30, 2024
efa0716
add lock_settings shell command option for printing executed Weaver ops
muhomorr Jun 1, 2024
cd8548d
add a test for the duress password feature
muhomorr May 29, 2024
584199e
fix ApplicationInfo flag initialization being skipped in some cases
muhomorr Jun 13, 2024
f8aa993
stub out reads of hidden system settings in Google's text-to-speech app
muhomorr Jul 1, 2024
c1ac59a
show a deprecation warning dialog on each launch of a 32-bit app
muhomorr Jul 6, 2024
87d8cb5
better 32-bit deprecation warning
thestinger Jul 7, 2024
b166d55
fix touch-to-unlock on Google devices with side fingerprint scanner
muhomorr Jul 16, 2024
d6a2cd2
add setting for alternative touchscreen mode
muhomorr Jun 19, 2024
72c35ca
don't report some android.hardware.bluetooth-service.bcmbtlinux crashes
muhomorr Aug 5, 2024
c70843f
don't report some vendor.google.wifi_ext-service-vendor crashes
muhomorr Aug 5, 2024
aa85427
sysconfig: support enabling association restrictions without exemptions
muhomorr Aug 29, 2024
d0b654d
add config for Pixel Health app
muhomorr Aug 26, 2024
643e638
15: enable signature matching of updated system apps for all such apps
muhomorr Aug 9, 2024
f98bfaf
15: new PermissionService: implement shouldBlockGrantRuntimePermission()
muhomorr Aug 10, 2024
788e8a1
15: new PermissionService: implement updatePermissions()
muhomorr Aug 10, 2024
83d8864
15: new PermissionService: implement PackageHooks support
muhomorr Aug 10, 2024
1077238
15: new PermissionService: support for special runtime permissions
muhomorr Aug 11, 2024
c9dc42b
15: PackageInstallerUI: add option to skip auto-grants of INTERNET perm
muhomorr Aug 11, 2024
305cfcc
temp: unconditionally enable system crash notifications
muhomorr Jun 3, 2024
8517c17
Revert "temp: unconditionally enable system crash notifications"
thestinger Jun 13, 2024
37a1195
15: gmscompat: support using GSF 34 on SDK 35
muhomorr Aug 15, 2024
aefe943
_fixup! PackageHooks: infrastructure for per-package hooks in system_…
muhomorr Sep 3, 2024
4a677b1
_fixup! add config for Pixel Health app
muhomorr Sep 3, 2024
ddd0a90
update lint baseline
muhomorr Sep 4, 2024
a5e830a
Reapply "temp: unconditionally enable system crash notifications"
muhomorr Sep 4, 2024
8553f06
wip: fixup! Support forwarding notifications from other users
muhomorr Sep 3, 2024
fe9b4f0
gmscompat: adjust to the updated client Dynamite init sequence
muhomorr Sep 17, 2024
16b956e
add Bundle.toStringDeep()
muhomorr Oct 7, 2024
4b69321
add handling for early boot-time system journal notifications
muhomorr Oct 7, 2024
3ec51a1
add helper class for notifying the user about system_server errors
muhomorr Oct 7, 2024
047d8ae
USB port security API: move implementation to a separate file
muhomorr Oct 7, 2024
310fdd2
USB port security API: redirect errors to status callback
muhomorr Oct 7, 2024
90ff549
USB port security API: add handling for USB HAL service death
muhomorr Oct 7, 2024
f5cc29b
UsbPortSecurityHooks: use a dedicated callbacks thread
muhomorr Oct 7, 2024
48fbaf4
UsbPortSecurityHooks: surface errors to the user as a notification
muhomorr Oct 7, 2024
159b41a
UsbPortSecurityHooks: wait for result callback after updating port state
muhomorr Oct 7, 2024
80a89b5
UsbPortSecurityHooks: move handling of deny_new_usb2 to system_server
muhomorr Oct 7, 2024
ebd61c9
fix an upstream race condition in handling of system error files
muhomorr Oct 7, 2024
53695f6
fixup! wip: fixup! Support forwarding notifications from other users
quh4gko8 Sep 25, 2024
07768a3
bugix: Correct visbility checks for new InternetTile impl
quh4gko8 Sep 25, 2024
99ae861
fixup! add handling for early boot-time system journal notifications
muhomorr Oct 7, 2024
f7df04b
include path of ANR stack traces file in ApplicationErrorReport
muhomorr Oct 7, 2024
48c9cda
don't block reading ANR stack traces file via Unix file permissions
muhomorr Oct 8, 2024
8baff8c
fixup! add APIs for launching LogViewer app
muhomorr Oct 8, 2024
64e4d70
include path of text tombstone file in LogViewer intents
muhomorr Oct 8, 2024
0d36c00
Revert "15: enable signature matching of updated system apps for all …
muhomorr Oct 10, 2024
8a35ac2
gmscompat: ignore declarations of READ_GSERVICES and C2DM RECEIVE perms
muhomorr Oct 10, 2024
230d6cd
fixup! disable package parser cache
muhomorr Oct 10, 2024
5052f6b
fixup! infrastructure for passing SELinux flags to the kernel
muhomorr Sep 5, 2024
d11996a
fixup! 15: new PermissionService: support for special runtime permiss…
muhomorr Oct 15, 2024
ba804e5
gmscompat: don't use GSF for fresh installs
muhomorr Oct 15, 2024
229e73a
Revert "Reapply "temp: unconditionally enable system crash notificati…
muhomorr Oct 16, 2024
4beb584
gmscompat: add util method for catching SecurityExceptions
muhomorr Oct 16, 2024
92f481d
fix NPE system_server crash in IMMS.resetDefaultImeLocked()
muhomorr Oct 16, 2024
78e7fe9
ignore factory reset protection (FRP)
muhomorr Oct 16, 2024
29ffe05
fix toggle for disabling auto-grant of OTHER_SENSORS permission
muhomorr Oct 16, 2024
6a40502
fix KGUM.onPostureChanged() NPE SystemUI crash on foldable devices
muhomorr Oct 16, 2024
7f63a2b
fixup! gmscompat: don't use GSF for fresh installs
muhomorr Oct 17, 2024
0a99fc2
gosps: Persist GrapheneOS-specific package state when archiving an app
quh4gko8 Oct 17, 2024
4d6b3b7
gmscompat: handle lack of SET_BIOMETRIC_DIALOG_ADVANCED permission
muhomorr Oct 18, 2024
c691697
fixup! gmscompat: handle lack of SET_BIOMETRIC_DIALOG_ADVANCED permis…
thestinger Oct 18, 2024
1dfeda7
PackageVerityExt: fix handling of static shared libraries
muhomorr Oct 19, 2024
222c419
fix check for the current holder of the Wallet app role
muhomorr Oct 19, 2024
3b8c1a6
PackageInstaller: fix crash when showing app's first confirmation prompt
muhomorr Oct 19, 2024
3158c88
gmscompat: make isAndroidAuto() part of system API
muhomorr Oct 20, 2024
18492eb
disable memory tagging for Pixel Camera Services
muhomorr Oct 20, 2024
640babe
don't remove app widgets from user's home screen when the user stops
muhomorr Oct 22, 2024
17d7d49
raise backup transport timeout
thestinger Oct 23, 2024
fbc39c8
gmscompat: add stubs for update_engine wrapper
muhomorr Oct 23, 2024
c14fe96
new PermissionService: never auto-grant special perms on package update
muhomorr Oct 23, 2024
1e965c4
partially reset granted special runtime perm state to pre-A15 state
muhomorr Oct 23, 2024
fb5f62c
don't spam to the system log buffer from loadAconfigDefaultValues()
muhomorr Oct 29, 2024
4ff1c74
include full ApplicationInfo in ApplicationErrorReport objects
muhomorr Oct 29, 2024
d143b02
gmscompat: adjust to ApplicationErrorReport API change
muhomorr Oct 29, 2024
2a92a98
fixup! add APIs for launching LogViewer app
muhomorr Oct 30, 2024
f21c555
fixup! improve memory DCL restriction setting
muhomorr Oct 30, 2024
1b1f16c
fixup! notify the user about notable system journal entries
muhomorr Oct 30, 2024
35eec0c
don't add OTHER_SENSORS uses-permission to hasCode=false packages
muhomorr Oct 31, 2024
6b1ef54
mark automatic OTHER_SENSORS uses-permission as implicitly added
muhomorr Oct 31, 2024
4bac5e9
gmscompat: ignore uses-permission in GSF AndroidManifest
muhomorr Oct 29, 2024
4aca367
gmscompat: fix "is dev build" checks
muhomorr Oct 29, 2024
cd94ee9
gmscompat: fix dev-only option for using gmscompat with any app
muhomorr Oct 29, 2024
88b1a38
gmscompat: add dev option to log Service and BroadcastReceiver ops
muhomorr Oct 29, 2024
675996e
Revert "PackageVerityExt: fix handling of static shared libraries"
muhomorr Oct 29, 2024
a2a8237
PackageVerityExt: fix handling of static shared libraries, v2
muhomorr Oct 29, 2024
57f5f31
fixup! exempt telephony service from the new package visibility restr…
muhomorr Oct 29, 2024
f6a82db
gmscompat: fix camel-case of enforceCallingOrSelfManageUsbOrAndroidAuto
muhomorr Oct 31, 2024
8173368
gmscompat: fix MANAGE_USB_ANDROID_AUTO not being checked for some calls
muhomorr Oct 31, 2024
d28d312
USB port security API: integrate deny_new_usb2, plus refactoring
muhomorr Oct 30, 2024
fc1dea6
UsbPortSecurityHooks: adjust to port security API change
muhomorr Oct 30, 2024
9f13be9
fix ANR details link not working in profiles and in secondary users
muhomorr Nov 1, 2024
9b7ae94
fixup! include full ApplicationInfo in ApplicationErrorReport objects
muhomorr Nov 3, 2024
53a5ebf
gmscompat: fix flag overrides being partly ignored on recent versions
muhomorr Nov 3, 2024
301449f
add workaround for showShutdownDialog() system_server crash
muhomorr Nov 4, 2024
623e74c
add utility class for obtaining and keeping track of Binder caller info
muhomorr Nov 4, 2024
bacb4a8
MmsServiceBroker: forward caller UID to MmsService
muhomorr Nov 4, 2024
30540ac
Usage:fix arrayIndexOutOfBoundsException to aviod
Jun 7, 2024
16f1c41
fix handling of MATCH_ARCHIVED_PACKAGES flag in getPackageUidInternal()
muhomorr Nov 4, 2024
63daaf6
Remove visitPersonUri flagged code
Jul 26, 2024
5215462
fixup! PackageInstaller: link "App info" screen from the uninstallati…
muhomorr Nov 5, 2024
aa6894d
cscopes: ignore Person.Builder.setUri() when Contact Scopes is enabled
muhomorr Nov 6, 2024
30c3456
fixup! add Bundle.toStringDeep()
muhomorr Nov 14, 2024
ef767dc
gmscompat: fix Android Auto permission check in createAssociation()
muhomorr Nov 13, 2024
966341a
gmscompat: fix Android Auto voice commands not working in some cases
muhomorr Nov 14, 2024
fc08943
gmscompat: stop Play Store from attempting to auto-install some packages
muhomorr Nov 14, 2024
f19a4ae
gmscompat: remove unnecessary GmsCompat.maybeEnable()
muhomorr Nov 15, 2024
d5ece4a
gmscompat: rework GmsCompatClientService
muhomorr Nov 15, 2024
09fe3a7
gmscompat: move ClientPriorityManager to GmsCompat app
muhomorr Nov 15, 2024
9d91efb
gmscompat: add shim for background service starts
muhomorr Nov 15, 2024
f338706
Revert "don't report some vendor.google.wifi_ext-service-vendor crashes"
muhomorr Nov 15, 2024
9b8d306
don't report harmless fingerprint-service.goodix crash
muhomorr Nov 15, 2024
74c540b
gmscompat: don't stop apps that use Dynamite modules when GmsCore stops
muhomorr Nov 17, 2024
bcace37
Lock CE storage and reset strong auth flags on stopping private profiles
quh4gko8 Nov 12, 2024
5f85fe9
fix mock location not working for missing standard location providers
muhomorr Nov 17, 2024
442329b
Revert "Lock CE storage and reset strong auth flags on stopping priva…
thestinger Nov 18, 2024
8204065
PackageId: add DPC (Android Device Policy)
mkg20001 Aug 13, 2024
b860acc
Permissions: Add USER_TRUSTED_SOURCE for skipping UNKNOWN_SOURCES res…
mkg20001 Aug 13, 2024
cb1190e
add REQUEST_INSTALL_PACKAGES to GmsCore
mkg20001 Aug 13, 2024
9288391
add automatic installation of play apps into work profile
mkg20001 Aug 13, 2024
9d849ce
wip
mkg20001 Sep 7, 2024
0b8da8a
wip
mkg20001 Sep 12, 2024
538c196
wip
mkg20001 Oct 13, 2024
86613e1
remove gsf
mkg20001 Oct 25, 2024
27e6f32
add comment
mkg20001 Oct 31, 2024
6cc39fe
move hooks into own file
mkg20001 Nov 23, 2024
3620d6a
use clean calling identity
mkg20001 Nov 23, 2024
6c929aa
signature check
mkg20001 Nov 23, 2024
6da01bb
cleanup
mkg20001 Nov 23, 2024
4649ac2
cleanup
mkg20001 Nov 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ java_library {
"android.hardware.usb-V1.0-java-constants",
"android.hardware.usb-V1.1-java-constants",
"android.hardware.usb-V1.2-java-constants",
"android.hardware.usb.ext-V1-java",
"android.hardware.usb.gadget-V1-java",
"android.hardware.usb.gadget-V1.0-java",
"android.hardware.usb.gadget-V1.1-java",
Expand Down
12 changes: 12 additions & 0 deletions apex/jobscheduler/framework/java/android/app/AlarmManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.app.compat.gms.GmsCompat;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledSince;
import android.compat.annotation.UnsupportedAppUsage;
Expand Down Expand Up @@ -1049,6 +1050,17 @@ private void setImpl(@AlarmType int type, long triggerAtMillis, long windowMilli
long intervalMillis, int flags, PendingIntent operation, final OnAlarmListener listener,
String listenerTag, Executor targetExecutor, WorkSource workSource,
AlarmClockInfo alarmClock) {
if (GmsCompat.isEnabled()) {
if (windowMillis == WINDOW_EXACT && !canScheduleExactAlarms()) {
windowMillis = WINDOW_HEURISTIC;
}
// non-null WorkSource requires privileged UPDATE_DEVICE_STATS permission
workSource = null;

// requires privileged SCHEDULE_PRIORITIZED_ALARM permission
flags &= ~FLAG_PRIORITIZE;
}

if (triggerAtMillis < 0) {
/* NOTYET
if (mAlwaysExact) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.UserHandleAware;
import android.app.compat.gms.GmsCompat;
import android.content.Context;

import com.android.internal.gmscompat.GmsCompatApp;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collections;
Expand Down Expand Up @@ -626,6 +629,11 @@ public void removeFromPermanentAllowList(@NonNull String packageName) {
@RequiresPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST)
public void addToTemporaryAllowList(@NonNull String packageName, @ReasonCode int reasonCode,
@Nullable String reason, long durationMs) {
if (GmsCompat.isEnabled()) {
GmsCompatApp.raisePackageToForeground(packageName, durationMs, reason, reasonCode);
return;
}

try {
mService.addPowerSaveTempWhitelistApp(packageName, durationMs, mContext.getUserId(),
reasonCode, reason);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void addPowerSaveTempWhitelistAppDirect(int uid, long duration,

boolean isAppOnWhitelist(int appid);

int[] getPowerSaveWhitelistUserAppIds();
int[] getPowerSaveWhitelistAppIds();

int[] getPowerSaveTempWhitelistAppIds();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2383,14 +2383,14 @@ public String[] getFullPowerWhitelistExceptIdle() {
}

/**
* Returns the array of app ids whitelisted by user. Take care not to
* Returns the array of whitelisted app ids. Take care not to
* modify this, as it is a reference to the original copy. But the reference
* can change when the list changes, so it needs to be re-acquired when
* {@link PowerManager#ACTION_POWER_SAVE_WHITELIST_CHANGED} is sent.
*/
@Override
public int[] getPowerSaveWhitelistUserAppIds() {
return DeviceIdleController.this.getPowerSaveWhitelistUserAppIds();
public int[] getPowerSaveWhitelistAppIds() {
return DeviceIdleController.this.getAppIdWhitelistInternal();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void onReceive(Context context, Intent intent) {
case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED:
synchronized (mLock) {
mDeviceIdleWhitelistAppIds =
mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
if (DEBUG) {
Slog.d(TAG, "Got whitelist "
+ Arrays.toString(mDeviceIdleWhitelistAppIds));
Expand Down Expand Up @@ -133,7 +133,7 @@ public DeviceIdleJobsController(JobSchedulerService service) {
mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
mLocalDeviceIdleController =
LocalServices.getService(DeviceIdleInternal.class);
mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
mPowerSaveTempWhitelistAppIds =
mLocalDeviceIdleController.getPowerSaveTempWhitelistAppIds();
mDeviceIdleUpdateFunctor = new DeviceIdleUpdateFunctor();
Expand Down Expand Up @@ -194,7 +194,7 @@ public void setUidActiveLocked(int uid, boolean active) {
}

/**
* Checks if the given job's scheduling app id exists in the device idle user whitelist.
* Checks if the given job's scheduling app id exists in the device idle whitelist.
*/
boolean isWhitelistedLocked(JobStatus job) {
return Arrays.binarySearch(mDeviceIdleWhitelistAppIds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import android.app.job.UserVisibleJobSummary;
import android.content.ClipData;
import android.content.ComponentName;
import android.content.Context;
import android.net.Network;
import android.net.NetworkRequest;
import android.net.Uri;
Expand Down Expand Up @@ -2357,6 +2358,23 @@ private boolean isConstraintsSatisfied(int satisfiedConstraints) {
return true;
}

if ((mRequiredConstraintsOfInterest & CONSTRAINT_CONNECTIVITY) != 0) {
if ((satisfiedConstraints & CONSTRAINT_CONNECTIVITY) != 0) {
var pmi = LocalServices.getService(
com.android.server.pm.permission.PermissionManagerServiceInternal.class);

if (pmi.checkUidPermission(getSourceUid(), android.Manifest.permission.INTERNET, Context.DEVICE_ID_DEFAULT) !=
android.content.pm.PackageManager.PERMISSION_GRANTED) {
if (DEBUG) {
Slog.d(TAG, "skipping job " + getJobId() + " for " + getSourcePackageName()
+ " in user " + getSourceUserId() + ": it has CONSTRAINT_CONNECTIVITY, "
+ "but its UID doesn't have the INTERNET permission");
}
return false;
}
}
}

int sat = satisfiedConstraints;
if (overrideState == OVERRIDE_SOFT) {
// override: pretend all 'soft' requirements are satisfied
Expand Down
6 changes: 4 additions & 2 deletions cmds/app_process/app_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ class AppRuntime : public AndroidRuntime
AndroidRuntime* ar = AndroidRuntime::getRuntime();
ar->callMain(mClassName, mClass, mArgs);

IPCThreadState::self()->stopProcess();
hardware::IPCThreadState::self()->stopProcess();
if (mClassName != "com.android.internal.os.ExecInit") {
IPCThreadState::self()->stopProcess();
hardware::IPCThreadState::self()->stopProcess();
}
}

virtual void onZygoteInit()
Expand Down
2 changes: 1 addition & 1 deletion cmds/hid/jni/com_android_commands_hid_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ static void closeDevice(JNIEnv* /* env */, jclass /* clazz */, jlong ptr) {
}
}

static JNINativeMethod sMethods[] = {
static const JNINativeMethod sMethods[] = {
{"nativeOpenDevice",
"(Ljava/lang/String;Ljava/lang/String;IIII[B"
"Lcom/android/commands/hid/Device$DeviceCallback;)J",
Expand Down
2 changes: 1 addition & 1 deletion cmds/uinput/jni/com_android_commands_uinput_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static jint getEvdevInputPropByLabel(JNIEnv* env, jclass /* clazz */, jstring ra
return InputEventLookup::getLinuxEvdevInputPropByLabel(label.c_str()).value_or(-1);
}

static JNINativeMethod sMethods[] = {
static const JNINativeMethod sMethods[] = {
{"nativeOpenUinputDevice",
"(Ljava/lang/String;IIIIIILjava/lang/String;"
"Lcom/android/commands/uinput/Device$DeviceCallback;)J",
Expand Down
7 changes: 6 additions & 1 deletion core/api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ package android {
field public static final String NFC = "android.permission.NFC";
field public static final String NFC_PREFERRED_PAYMENT_INFO = "android.permission.NFC_PREFERRED_PAYMENT_INFO";
field public static final String NFC_TRANSACTION_EVENT = "android.permission.NFC_TRANSACTION_EVENT";
field public static final String OTHER_SENSORS = "android.permission.OTHER_SENSORS";
field public static final String OVERRIDE_WIFI_CONFIG = "android.permission.OVERRIDE_WIFI_CONFIG";
field public static final String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS";
field @Deprecated public static final String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
Expand Down Expand Up @@ -313,6 +314,7 @@ package android {
field public static final String UNINSTALL_SHORTCUT = "com.android.launcher.permission.UNINSTALL_SHORTCUT";
field public static final String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
field public static final String UPDATE_PACKAGES_WITHOUT_USER_ACTION = "android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION";
field public static final String USER_TRUSTED_SOURCE = "android.permission.USER_TRUSTED_SOURCE";
field public static final String USE_BIOMETRIC = "android.permission.USE_BIOMETRIC";
field public static final String USE_EXACT_ALARM = "android.permission.USE_EXACT_ALARM";
field @Deprecated public static final String USE_FINGERPRINT = "android.permission.USE_FINGERPRINT";
Expand Down Expand Up @@ -344,7 +346,9 @@ package android {
field public static final String LOCATION = "android.permission-group.LOCATION";
field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES";
field public static final String NETWORK = "android.permission-group.NETWORK";
field public static final String NOTIFICATIONS = "android.permission-group.NOTIFICATIONS";
field public static final String OTHER_SENSORS = "android.permission-group.OTHER_SENSORS";
field public static final String PHONE = "android.permission-group.PHONE";
field public static final String READ_MEDIA_AURAL = "android.permission-group.READ_MEDIA_AURAL";
field public static final String READ_MEDIA_VISUAL = "android.permission-group.READ_MEDIA_VISUAL";
Expand Down Expand Up @@ -5143,6 +5147,7 @@ package android.app {
field public static final String OPSTR_RECORD_AUDIO = "android:record_audio";
field public static final String OPSTR_SEND_SMS = "android:send_sms";
field public static final String OPSTR_SYSTEM_ALERT_WINDOW = "android:system_alert_window";
field public static final String OPSTR_USER_TRUSTED_SOURCE = "android:user_trusted_source";
field public static final String OPSTR_USE_FINGERPRINT = "android:use_fingerprint";
field public static final String OPSTR_USE_SIP = "android:use_sip";
field public static final String OPSTR_WRITE_CALENDAR = "android:write_calendar";
Expand Down Expand Up @@ -43277,7 +43282,7 @@ package android.telecom {
method public android.telecom.PhoneAccountHandle getSimCallManager();
method @Nullable public android.telecom.PhoneAccountHandle getSimCallManagerForSubscription(int);
method @Nullable public String getSystemDialerPackage();
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
method @Nullable @RequiresPermission(anyOf={"android.permission.READ_PRIVILEGED_PHONE_STATE", "android.permission.READ_PRIVILEGED_PHONE_STATE_ANDROID_AUTO"}) public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailNumber(android.telecom.PhoneAccountHandle);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handleMmi(String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handleMmi(String, android.telecom.PhoneAccountHandle);
Expand Down
43 changes: 42 additions & 1 deletion core/api/lint-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,30 @@ DeprecationMismatch: javax.microedition.khronos.egl.EGL10#eglCreatePixmapSurface
Method javax.microedition.khronos.egl.EGL10.eglCreatePixmapSurface(javax.microedition.khronos.egl.EGLDisplay, javax.microedition.khronos.egl.EGLConfig, Object, int[]): @Deprecated annotation (present) and @deprecated doc tag (not present) do not match


FlaggedApiLiteral: android.Manifest.permission#BIND_TV_AD_SERVICE:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.media.tv.flags.Flags.FLAG_ENABLE_AD_SERVICE_FW).
FlaggedApiLiteral: android.Manifest.permission#MANAGE_DEVICE_POLICY_THREAD_NETWORK:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (com.android.net.thread.platform.flags.Flags.FLAG_THREAD_USER_RESTRICTION_ENABLED).
FlaggedApiLiteral: android.Manifest.permission#REQUEST_OBSERVE_DEVICE_UUID_PRESENCE:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.companion.Flags.FLAG_DEVICE_PRESENCE).
FlaggedApiLiteral: android.R.attr#adServiceTypes:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.media.tv.flags.Flags.FLAG_ENABLE_AD_SERVICE_FW).
FlaggedApiLiteral: android.R.attr#languageSettingsActivity:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP).
FlaggedApiLiteral: android.R.attr#optional:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.content.pm.Flags.FLAG_SDK_LIB_INDEPENDENCE).
FlaggedApiLiteral: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_INTERNAL_ERROR:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.view.accessibility.Flags.FLAG_A11Y_OVERLAY_CALLBACKS).
FlaggedApiLiteral: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_INVALID:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.view.accessibility.Flags.FLAG_A11Y_OVERLAY_CALLBACKS).
FlaggedApiLiteral: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_SUCCESS:
@FlaggedApi contains a string literal, but should reference the field generated by aconfig (android.view.accessibility.Flags.FLAG_A11Y_OVERLAY_CALLBACKS).


GetterSetterNullability: android.media.tv.ad.TvAdView#getOnUnhandledInputEventListener():
Nullability of android.media.tv.ad.TvAdView.OnUnhandledInputEventListener? in getter method android.media.tv.ad.TvAdView.getOnUnhandledInputEventListener() does not match android.media.tv.ad.TvAdView.OnUnhandledInputEventListener in corresponding setter method android.media.tv.ad.TvAdView.setOnUnhandledInputEventListener(android.media.tv.ad.TvAdView.OnUnhandledInputEventListener)


InvalidNullabilityOverride: android.app.Notification.TvExtender#extend(android.app.Notification.Builder) parameter #0:
Invalid nullability on parameter `builder` in method `extend`. Parameters of overrides cannot be NonNull if the super parameter is unannotated.
InvalidNullabilityOverride: android.media.midi.MidiUmpDeviceService#onBind(android.content.Intent) parameter #0:
Expand All @@ -395,6 +419,14 @@ KotlinOperator: android.graphics.Matrix44#set(int, int, float):
Method can be invoked with an indexing operator from Kotlin: `set` (this is usually desirable; just make sure it makes sense for this type of object)


ManagerLookup: android.telephony.SubscriptionManager#createForAllUserProfiles():
Managers must always be obtained from Context (`createForAllUserProfiles`)


MissingGetterMatchingBuilder: android.content.AttributionSource.Builder#setNextAttributionSource(android.content.AttributionSource):
android.content.AttributionSource does not declare a `getNextAttributionSource()` method matching method android.content.AttributionSource.Builder.setNextAttributionSource(android.content.AttributionSource)


RequiresPermission: android.accounts.AccountManager#getAccountsByTypeAndFeatures(String, String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler):
Method 'getAccountsByTypeAndFeatures' documentation mentions permissions without declaring @RequiresPermission
RequiresPermission: android.accounts.AccountManager#hasFeatures(android.accounts.Account, String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler):
Expand Down Expand Up @@ -1093,6 +1125,14 @@ Todo: android.provider.ContactsContract.RawContacts#newEntityIterator(android.da
Documentation mentions 'TODO'


UnflaggedApi: android.Manifest.permission#OTHER_SENSORS:
New API must be flagged with @FlaggedApi: field android.Manifest.permission.OTHER_SENSORS
UnflaggedApi: android.Manifest.permission#USER_TRUSTED_SOURCE:
New API must be flagged with @FlaggedApi: field android.Manifest.permission.USER_TRUSTED_SOURCE
UnflaggedApi: android.Manifest.permission_group#NETWORK:
New API must be flagged with @FlaggedApi: field android.Manifest.permission_group.NETWORK
UnflaggedApi: android.Manifest.permission_group#OTHER_SENSORS:
New API must be flagged with @FlaggedApi: field android.Manifest.permission_group.OTHER_SENSORS
UnflaggedApi: android.R.color#on_surface_disabled_material:
New API must be flagged with @FlaggedApi: field android.R.color.on_surface_disabled_material
UnflaggedApi: android.R.color#outline_disabled_material:
Expand Down Expand Up @@ -1179,6 +1219,8 @@ UnflaggedApi: android.app.ActivityManager#getHistoricalProcessStartReasons(int):
New API must be flagged with @FlaggedApi: method android.app.ActivityManager.getHistoricalProcessStartReasons(int)
UnflaggedApi: android.app.ActivityManager#setApplicationStartInfoCompletionListener(java.util.concurrent.Executor, java.util.function.Consumer<android.app.ApplicationStartInfo>):
New API must be flagged with @FlaggedApi: method android.app.ActivityManager.setApplicationStartInfoCompletionListener(java.util.concurrent.Executor,java.util.function.Consumer<android.app.ApplicationStartInfo>)
UnflaggedApi: android.app.AppOpsManager#OPSTR_USER_TRUSTED_SOURCE:
New API must be flagged with @FlaggedApi: field android.app.AppOpsManager.OPSTR_USER_TRUSTED_SOURCE
UnflaggedApi: android.app.ApplicationStartInfo:
New API must be flagged with @FlaggedApi: class android.app.ApplicationStartInfo
UnflaggedApi: android.app.ApplicationStartInfo#CREATOR:
Expand Down Expand Up @@ -1445,7 +1487,6 @@ UnflaggedApi: android.graphics.text.PositionedGlyphs#getItalicOverride(int):
New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getItalicOverride(int)
UnflaggedApi: android.graphics.text.PositionedGlyphs#getWeightOverride(int):
New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getWeightOverride(int)

UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_CAR:
New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_CAR
UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_COMPUTER:
Expand Down
Loading