Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

show certificate fingerprint in PackageInstaller #472

Open
wants to merge 320 commits into
base: 14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
320 commits
Select commit Hold shift + click to select a range
957c4ac
Disable instant apps feature on every boot
quh4gko8 Jul 1, 2023
096c403
CarrierConfig: Always show APN settings on CDMA carriers
flawedworld Sep 28, 2021
e09eccb
CarrierConfig: Do not mark dun APN types as read only
flawedworld Feb 9, 2022
5b0186c
CarrierConfig: Always show ICCID
flawedworld Mar 5, 2022
848c1d5
CarrierConfig: allow toggling VoWiFi while roaming by default
girlbossceo Mar 24, 2023
204dc6e
enable secondary user logout support by default
flawedworld Oct 15, 2021
e792ee6
enable backup service for non-owner users
empratyush May 2, 2021
8206853
increase default max password length to 64
thestinger Jun 29, 2017
8166183
GrapheneOS boot logo mask
thestinger May 11, 2019
f1a0a84
use black wallpaper by default
thestinger Mar 7, 2022
729bc6a
stop auto-granting location to system browsers
thestinger Mar 17, 2019
adc2de8
appop: Save discrete app op history for more permissions
kdrag0n Oct 11, 2021
3970ed3
add check for empty TTS engine name
thestinger Dec 20, 2020
244f6d0
Add a config to state whether a device supports increased touch sensi…
lzlrd Jun 30, 2021
083a809
stop enforcing camera sound for certain carriers
thestinger Feb 11, 2022
573bfd6
colors: Switch to GrapheneOS blue color palette for Material You
kdrag0n Mar 7, 2022
7219c97
improve PendingIntent security check compatibility
thestinger Mar 18, 2022
f49769f
Show USB icon in notification instead of generic system icon
kdrag0n Oct 6, 2020
ceaf509
Sharesheet: Display two rows of max ranked targets
luk1337 Oct 28, 2020
8db122e
add a class for validating package against its valid signatures
muhomorr Mar 30, 2023
20f8060
extsettings: add a set of helper classes for defining system settings
muhomorr Feb 12, 2023
b853986
add exec spawning sysprop to ExtSettings
muhomorr May 24, 2023
3b043c7
add exec-based spawning support
thestinger Mar 14, 2015
1b0d806
disable exec spawning when using debugging options
thestinger May 22, 2019
446270e
add parameter for avoiding full preload with exec
thestinger May 14, 2019
9f97041
pass through fullPreload to libcore
thestinger Sep 11, 2019
fe60739
disable OpenGL preloading for exec spawning
thestinger May 14, 2019
e93e09e
Revert "disable OpenGL preloading for exec spawning"
thestinger Oct 16, 2021
7a4cf6d
disable resource preloading for exec spawning
thestinger May 14, 2019
5a60568
disable class preloading for exec spawning
thestinger May 14, 2019
0077092
disable WebView reservation for exec spawning
thestinger May 14, 2019
c149758
disable JCA provider warm up for exec spawning
thestinger May 14, 2019
f4999a2
disable preloading classloaders for exec spawning
thestinger Sep 11, 2019
6bd36e3
disable preloading HALs for exec spawning
thestinger Sep 11, 2019
6701831
pass through runtime flags for exec spawning and implement them in th…
randomhydrosol Oct 30, 2020
02eac6e
exec spawning: don't close the binder connection when the app crashes
muhomorr Aug 8, 2022
af2ccd7
add a wrapper for execveat(2)
muhomorr Aug 14, 2022
64a5373
zygote: define runtime flags that depend on exec spawning
muhomorr Aug 14, 2022
61f9d44
exec spawning: support runtime resource overlays
muhomorr Mar 30, 2023
5282eb7
exec spawning: support disabling hardened_malloc and extended VA space
muhomorr Aug 14, 2022
e47d2bf
imprecise authenticated timestamps using https
renlord Nov 14, 2019
c1d9385
disable auto time refresh when auto time is off
renlord Jun 30, 2020
03d80ca
extend network time refresh toggle
thestinger Oct 15, 2023
20bf8dc
reduce time update threshold
thestinger Feb 22, 2023
3abf79b
reduce system clock drift warning
thestinger Feb 22, 2023
53a3f98
add system package check methods to PackageUtils
muhomorr Jun 22, 2023
1a51737
filter out non-system packages from location indicator exemptions
muhomorr Jun 22, 2023
25eda2c
filter out non-system packages from getLocationBypassPackages() result
muhomorr Jun 22, 2023
83c4a7b
SystemUI: enable NFC quick settings tile
thestinger Mar 17, 2019
93bb585
SystemUI: Enable production-ready feature flags
kdrag0n Mar 14, 2022
4e5d859
SystemUI: Require unlocking to use sensitive QS tiles
kdrag0n Oct 6, 2021
07e28d8
SystemUI: Remove nav bar background in QS customizer
kdrag0n Oct 12, 2021
61f4c9e
SystemUI: Use new privacy indicators for location
kdrag0n Oct 11, 2021
be2aeb8
SystemUI: fully enable location indicators by default
thestinger Aug 17, 2022
8ef8617
SystemUI: specify config_sceenshotWorkProfileFilesApp
muhomorr Jun 18, 2023
83d9a03
SystemUI: improve media projection dialog wording
muhomorr Jan 22, 2023
029115b
SystemUI: add Battery share & Battery share quick tiles
empratyush Jun 21, 2022
6eba278
SystemUI: change default quick tiles and quick tile order
thestinger Oct 19, 2021
4ca3891
SystemUI: make screenshot sound use touch sounds setting
girlbossceo Mar 19, 2023
aeb20c4
SystemUI: have NfcTile get an NfcAdapter directly
inthewaves Sep 20, 2020
044a3eb
SystemUI: apply "Add users from lock screen" setting to guest users
muhomorr Jun 23, 2023
bf0a50d
Add config to exempt telephony-related app from location indicators
kdrag0n Feb 17, 2022
ef91df7
exempt some system packages from status bar privacy indicator
thestinger Apr 17, 2022
12f28a5
PackageInstaller: link "App info" screen from the uninstallation dialog
muhomorr Apr 17, 2022
d7d365c
PackageInstaller: make sure install confirmation returns a result
muhomorr Jun 2, 2022
f81cdaf
add helpers for system_server extensions
muhomorr Jul 31, 2022
831da27
Warn the user if they are using a prototype Pixel device
flawedworld Jun 15, 2022
c056da6
Support forwarding notifications from other users
girlbossceo Mar 19, 2022
e2c684f
DeviceIdleJobsController: don't ignore whitelisted system apps
muhomorr Jul 7, 2022
7af1fec
do not allow disabling app visibility filtering
muhomorr Apr 6, 2023
0c0d266
add hooks for modifying PackageManagerService behavior
muhomorr Mar 27, 2023
3a10243
add hooks for modifying ActivityThread behavior
muhomorr Aug 18, 2023
fd30c90
AppBindArgs: infrastructure for passing extra args to app process init
muhomorr May 16, 2023
1e4823c
infrastructure for spoofing self permission checks
muhomorr Jul 31, 2022
b588439
infrastructure for special runtime permissions
muhomorr Feb 9, 2023
6695758
add special runtime permission for other sensors
muhomorr Feb 9, 2023
6e24242
notify the user when sensors access is denied by OTHER_SENSORS perm
muhomorr Oct 4, 2022
7dbc84d
make INTERNET into a special runtime permission
thestinger Mar 17, 2019
4983004
improve compatibility of INTERNET special runtime permission
muhomorr Jul 31, 2022
6a24d0b
don't run jobs that need connectivity in apps that lack INTERNET perm
muhomorr May 19, 2023
eaa5c92
PackageInstallerUI: an option to skip auto-grant of INTERNET permission
muhomorr Oct 7, 2022
ebde662
use permanent fingerprint lockout immediately
thestinger Sep 12, 2017
20eebeb
add system property for disabling keyguard camera
thestinger Jul 25, 2017
05dcdc3
automatically reboot device after timeout if set
randomhydrosol Oct 17, 2021
5e3dcbe
Default to automatically rebooting device after 72 hours
flawedworld Mar 29, 2023
40f60a7
gosps: support for per-app GrapheneOS-specific persistent state
muhomorr Jul 31, 2022
05d9723
infrastructure for the Storage Scopes feature
muhomorr Jul 31, 2022
514a433
sscopes: temp: disable incomplete handling of READ_MEDIA_VISUAL_USER_…
muhomorr Oct 5, 2023
d139660
control access to Android/obb directory with a GosPackageState flag
muhomorr Jul 31, 2022
d55661b
add viewer for plain-text error reports
muhomorr Dec 3, 2023
84a3d84
add an option to show the details of an application error to the user
muhomorr Aug 8, 2022
adc1247
ErrorDialogController: do not auto-dismiss crash dialogs
muhomorr Oct 1, 2023
16eb336
Set always-on and lockdown on by default on first vpn connection at s…
quh4gko8 Aug 1, 2022
7c0df3c
pre-grant POST_NOTIFICATIONS to more system apps
muhomorr Aug 22, 2022
2c7c7f4
allow privileged installer to search for packages across all users
muhomorr Nov 23, 2022
b502f0a
extend original-package renaming to provider authorities for Vanadium
muhomorr Nov 5, 2022
bd22c26
extend original-package renaming to static launcher shortcuts
muhomorr Nov 23, 2022
9eaa6b4
disable package parser cache
muhomorr Jan 30, 2023
21b182c
perform additional boot-time checks on system package updates
muhomorr Jan 31, 2023
94609a4
allow out-of-band package updates to use original-package system
muhomorr Jan 27, 2023
13a9cbf
require fs-verity when installing system package updates
muhomorr Jan 31, 2023
4035613
don't allow updating system packages to the same versionCode
muhomorr Dec 27, 2022
00e0abf
Remove build fingerprint from screenshot EXIF
girlbossceo Apr 29, 2022
ecbfa99
add toggle for screenshot timestamp EXIF metadata
girlbossceo Feb 18, 2023
30a41b4
SUPL: Don't send IMSI / Phone number to SUPL server
MSe1969 Oct 29, 2018
5fcbfd2
add GNSS SUPL setting
muhomorr Mar 3, 2023
f1c6ac0
allow privileged installers to maintain a global list of busy packages
muhomorr Mar 4, 2023
404296b
add option to scramble PIN layout
muhomorr Feb 24, 2023
eedd6cd
enable LOCK_PIN_ENHANCED_PRIVACY setting by default
muhomorr Jun 14, 2023
ce30f3d
don't crash apps that depend on missing Gservices provider
muhomorr Mar 26, 2023
c91cee4
integrate Google's EuiccSupportPixel package
muhomorr Mar 27, 2023
c7a1795
gmscompat: add compatibility layer for unprivileged GMS
thestinger Jun 6, 2023
20f544f
integrate Google's eUICC LPA app
muhomorr May 30, 2023
f52795e
do not auto-grant Camera permission to the eUICC LPA UI app
muhomorr Mar 19, 2023
a1f7ba1
gmscompat: hide preinstalled Google eUICC LPA package from Play Store
muhomorr Sep 1, 2023
018a2a0
require vendor camera extensions package to be a system app by default
muhomorr Mar 30, 2023
8c7a5c1
allow "Pixel Camera Services" app to provide vendor camera extensions
muhomorr Mar 30, 2023
88aa534
infrastructure for creating per-package seinfo overrides
muhomorr Mar 30, 2023
f7dc075
support denying special access to hardware accelerators by Google apps
muhomorr Apr 6, 2023
666287d
always preserve package enabled setting after package update
muhomorr Feb 13, 2023
3f20f7a
add GNSS PSDS setting
muhomorr May 2, 2023
c5a24d5
support redirecting ContentProvider calls to another provider
muhomorr May 16, 2023
462b318
infrastructure for the Contact Scopes feature
muhomorr May 16, 2023
9fb905f
add connectivity checks setting and its migration from Settings.Global
muhomorr May 25, 2023
5d45577
Wi-Fi auto turn off
muhomorr Jul 31, 2022
4b9352b
Bluetooth auto turn off
muhomorr Jul 31, 2022
8334111
implement dynamic deny_new_usb toggle mode
thestinger Jun 16, 2016
8392274
add native debugging (ptrace) sysprop to ExtSettings
muhomorr May 24, 2023
212bf47
add support for hooking LocationManager methods
muhomorr Jun 19, 2023
ead489e
improve compat with apps that try to access network location provider
muhomorr Jun 19, 2023
9d4dac1
add RemoteKeyProvisioning server override setting
muhomorr Aug 10, 2023
caf762b
temp: opt-out of using "SPA" rewrites of some Settings app screens
muhomorr Aug 21, 2023
fafbd3b
infrastructure for passing extra args to Zygote and WebViewZygote
muhomorr Sep 23, 2023
3ee720f
infrastructure for passing SELinux flags to the kernel
muhomorr Sep 24, 2023
8493f33
infrastructure for attaching extra data to ApplicationInfo objects
muhomorr Nov 27, 2023
0ab00d5
add base class for complex per-app switches
muhomorr Sep 24, 2023
4d302d8
support specifying per-app compatibility configs
muhomorr Nov 16, 2023
76e2c28
support showing dexopt progress during boot
muhomorr Oct 3, 2023
b5ba048
restore Android 13 "pause work profile" behavior
muhomorr Oct 8, 2023
13a6bea
Allow customizing lock screen shortcuts via ThemePicker
quh4gko8 Oct 10, 2023
9262ead
exempt telephony service from the new package visibility restrictions
muhomorr Oct 13, 2023
6ab25ff
don't skip AOT compilation of apps that weren't recently used
muhomorr Nov 14, 2022
b93405c
do not delete compiled code (OAT files) of hibernated apps
muhomorr Oct 11, 2023
15fb03d
disable OtaDexoptService
muhomorr Oct 23, 2023
8a7d565
add notification-based UI for the background dexopt job
muhomorr Oct 23, 2023
603d166
infrastructure for per-package dex2oat compiler filter overrides
muhomorr Oct 31, 2023
f895715
always use speed dex2oat compiler filter for VPN service packages
muhomorr Nov 1, 2023
5065da4
add per-app setting for hardened_malloc and extended VA space
muhomorr Sep 26, 2023
17114b2
always stop app zygotes when app is being force-stopped
muhomorr Nov 8, 2023
5051a82
add per-app native debugging setting
muhomorr Sep 26, 2023
49aaa27
add per-app dynamic code execution settings
muhomorr Sep 26, 2023
20942ef
add a test for the new per-app hardening features
muhomorr Sep 20, 2023
39c3733
add per-app memory tagging setting
muhomorr Nov 5, 2023
fe5ff16
add helper class for launching non-standard Settings intents
muhomorr Nov 15, 2023
f0ed79d
add system API for getting app info by PID
muhomorr Nov 8, 2023
46be4e7
infrastructure for handling callbacks from logd to system_server
muhomorr Nov 8, 2023
aaef490
infrastructure for showing notifications about app exploit protection
muhomorr Nov 8, 2023
0822787
infrastructure for showing notifications about SELinux TSEC_FLAG denials
muhomorr Nov 15, 2023
cc6f7c6
show notification after app is blocked from accessing ptrace
muhomorr Nov 19, 2023
f5f7adb
fix rate limiting for non-app tombstones
muhomorr Nov 8, 2023
c19e2c4
notify the user about notable system journal entries
muhomorr Nov 8, 2023
271b839
add setting for skipping system process crash notifications
muhomorr Nov 27, 2023
c338a18
show notification after memory tag check failure crashes an app
muhomorr Nov 19, 2023
d1e2b4e
never skip crash notification for MTE crashes of system processes
muhomorr Nov 29, 2023
54976bd
SystemUI: under-display fingerprint scanner support
muhomorr Dec 6, 2022
e35f666
Revert "SystemUI: under-display fingerprint scanner support"
muhomorr Dec 6, 2023
7735f6b
Revert "Convert BubbleDataRepositoryTest to use mockito-kotlin"
muhomorr Dec 6, 2023
e33e674
fixup! pass through runtime flags for exec spawning and implement the…
muhomorr Dec 6, 2023
a855ea5
fixup! Support forwarding notifications from other users
muhomorr Dec 6, 2023
80fe473
fixup! automatically reboot device after timeout if set
muhomorr Dec 6, 2023
1294f2d
fixup! Support forwarding notifications from other users
muhomorr Dec 6, 2023
481edf5
fixup! SystemUI: add Battery share & Battery share quick tiles
muhomorr Dec 6, 2023
31d9042
fixup! gosps: support for per-app GrapheneOS-specific persistent state
muhomorr Dec 6, 2023
a61a20f
fixup! Support forwarding notifications from other users
muhomorr Dec 6, 2023
6a3fe5c
gmscompat: handle privileged AlarmManager.FLAG_PRIORITIZE
muhomorr Dec 7, 2023
e8fd78f
DropBoxMonitor: ignore last_kmsg with "reboot,shell" boot reason
muhomorr Dec 8, 2023
b30069d
PackageInstaller: limit max AppSnippet icon size
muhomorr Dec 8, 2023
cbaad4f
PackageInstaller: fix crash when handling STATUS_PENDING_USER_ACTION
muhomorr Dec 8, 2023
31d237e
raise system_server RLIMIT_NOFILE from 32K to 256K
muhomorr Dec 12, 2023
0f24045
DropBoxMonitor: filter out SoC ID from kernel crash logs
muhomorr Dec 12, 2023
e52497a
DropBoxMonitor: don't report forced reboot as a kernel crash
muhomorr Dec 12, 2023
741630c
Reapply "Convert BubbleDataRepositoryTest to use mockito-kotlin"
thestinger Dec 16, 2023
89155c4
Widevine provisioning setting
maade93791 Sep 29, 2023
65ac646
bugfix: DropBoxMonitor: don't omit boot reason in kernel crash reports
muhomorr Dec 20, 2023
8fa0e6a
TombstoneHandler: add handling of trailing NUL byte in selinuxLabel
muhomorr Dec 18, 2023
7c441dc
TombstoneHandler: include buildFingerprint in stringified tombstones
muhomorr Dec 23, 2023
79bd040
DropBoxManager: fix TreeSet API contract violations
muhomorr Dec 23, 2023
09f6f1e
add workaround for BiometricService.SettingObserver system_server crash
muhomorr Dec 26, 2023
b02dd4c
handle lack of app label in "missing OTHER_SENSORS perm" notification
muhomorr Dec 26, 2023
c2614a8
BluetoothAutoOff: enable logging on release builds
muhomorr Dec 26, 2023
c6aadee
BluetoothAutoOff: handle NPE from BluetoothManager.getConnectedDevices()
muhomorr Dec 26, 2023
04d0236
disable support for pre-approving PackageInstaller sessions
muhomorr Dec 22, 2023
56d787a
gmscompat: catch NoSuchMethodError from ContentProvider.dump()
muhomorr Dec 26, 2023
f6e09bb
fixup! add constants for some system package names
muhomorr Dec 18, 2023
e3ec5f6
move AppInfoExt from android.ext.settings to android.ext package
muhomorr Dec 18, 2023
5b9d3c7
fixup! add base class for complex per-app switches
muhomorr Dec 18, 2023
111211a
gosps: define packageFlags field
muhomorr Dec 20, 2023
dff8bc2
gosps: move shell command into PMHooks file and add packageFlags support
muhomorr Dec 20, 2023
5f00daa
add method for updating cached package permission state
muhomorr Dec 18, 2023
596bc69
gosps: add update-permission-state support to shell command
muhomorr Dec 27, 2023
70a031e
infrastructure for per-package customization of APK parser
muhomorr Dec 20, 2023
e184a64
skip adding manifest entry for OTHER_SENSORS if it's already present
muhomorr Dec 18, 2023
336de2d
PackageExt: infrastructure for attaching extra data to known parsed APKs
muhomorr Dec 18, 2023
a661c02
add PackageId definitions
muhomorr Dec 27, 2023
c6814ad
remove PackageManagerHooks-based AppInfoExt implementation
muhomorr Dec 20, 2023
c1dc308
cache AppCompatConfig values inside parsed APKs that it applies to
muhomorr Dec 18, 2023
2805f3c
switch AppInfoExt to a PackageExt-based implementation
muhomorr Dec 20, 2023
8526667
adjust AppsFilter.shouldFilterApplication() hook definition
muhomorr Dec 18, 2023
85cb0ec
PackageHooks: infrastructure for per-package hooks in system_server
muhomorr Dec 18, 2023
3fa0f81
bugfix: skip PackageEnabledSetting overrides for non-system packages
muhomorr Dec 18, 2023
f9f14d2
switch EuiccSupportPixel integration to PackageHooks
muhomorr Dec 18, 2023
eff8a0a
gmscompat: switch GmsCompat to PackageHooks
muhomorr Dec 18, 2023
bd85302
gmscompat: add FLAG_HAS_GMSCORE_CLIENT_LIBRARY AppInfoExt flag
muhomorr Dec 27, 2023
6424100
gmscompat: improve initialization
muhomorr Dec 18, 2023
3ed2ea4
fixup! integrate Google's eUICC LPA app
muhomorr Dec 18, 2023
70b7297
switch integration of Google's eUICC LPA to PackageHooks
muhomorr Dec 20, 2023
0472248
remove PackageManagerHooks.amendParsedPackage() that is no longer used
muhomorr Dec 18, 2023
e7965c9
remove a buggy debug-build-only shouldForciblyGrantPermission hook
muhomorr Dec 18, 2023
ac8ac8c
add a method for sending BOOT_COMPLETED broadcast to a specific package
muhomorr Dec 23, 2023
d648a93
define READ_DEVICE_SERIAL_NUMBER permission for Build.getSerial() access
muhomorr Dec 18, 2023
9a422bc
gmscompat: skip Build.getSerial() hook when serial number access is a…
muhomorr Dec 18, 2023
723cca3
gmscompat: add checks for privileged permissions
muhomorr Dec 20, 2023
8f961b1
gmscompat: handle listener unregistration in TelephonyManager shims
muhomorr Dec 18, 2023
de3bcbd
aauto: define a restricted version of the MANAGE_USB permission
muhomorr Dec 18, 2023
55d978f
aauto: add definition of restricted BLUETOOTH_PRIVILEGED permission
muhomorr Dec 18, 2023
5633559
aauto: add definition of restricted WIFI_PRIVILEGED permission
muhomorr Dec 18, 2023
0df1ef5
aauto: add definition of restricted READ_PRIVILEGED_PHONE_STATE permi…
muhomorr Dec 25, 2023
c0d36d5
adjust definition of TelecomManager.getUserSelectedOutgoingPhoneAccou…
muhomorr Dec 25, 2023
b30cd19
aauto: support granting privileged permissions via PackageHooks
muhomorr Dec 18, 2023
23b682c
aauto: support using aauto USB accessory activity as a default activity
muhomorr Dec 20, 2023
302389d
aauto: define ASSOCIATE_COMPANION_DEVICES_RESTRICTED permission
muhomorr Dec 18, 2023
d225cc7
aauto: support allowing association with "automotive projection" devices
muhomorr Dec 18, 2023
bdea068
gmscompat: enable GmsCompat for Android Auto
muhomorr Dec 28, 2023
81a306e
gmscompat: add/adjust shims and stubs for Android Auto support
muhomorr Dec 18, 2023
31136e3
gmscompat: turn mandatory app deps of Android Auto into optional deps
muhomorr Dec 28, 2023
72e29c7
gmscompat: add util method for creating link to app's Play Store page
muhomorr Dec 23, 2023
9c7ff08
gmscompat: hide Android Auto from Play Store
muhomorr Dec 28, 2023
abb8062
gmscompat: allow Android Auto installs/updates only from Apps and shell
muhomorr Dec 29, 2023
1208c65
aauto: check the most recent Android Auto certificate
muhomorr Dec 30, 2023
bda6919
skip "missing sensors perm" notification when a wrong app ID is passed
muhomorr Dec 31, 2023
4fb9327
gmscompat: handle lack of Google Search app in startActivity() calls
muhomorr Dec 31, 2023
58d297f
gmscompat: fix incorrect handling of while-in-use permissions
muhomorr Dec 31, 2023
b36dfb1
aauto: do not add ACCESS_BACKGROUND_LOCATION uses-permission
muhomorr Dec 31, 2023
60223b0
gmscompat: add workaround for a rare startForeground() crash
muhomorr Dec 31, 2023
bebb652
define package name of first-party app source
muhomorr Jan 3, 2024
b07c91c
gmscompat: do not hide Android Auto from Play Store
muhomorr Jan 3, 2024
c4d081f
gmscompat: exempt Android Auto from updates via Play Store
muhomorr Jan 3, 2024
65033f4
add workaround for AOSP keyboard (LatinIME) spell checker
muhomorr Jan 3, 2024
9257e88
aauto: add INTERNET perm to baseline perms for wireless Android Auto
muhomorr Jan 3, 2024
cf03ff4
show certificate fingerprint in PackageInstaller
maade93791 Dec 29, 2023
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
  •  
  •  
  •  
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.client.ClientPriorityManager;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collections;
Expand Down Expand Up @@ -609,6 +612,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()) {
ClientPriorityManager.raiseToForeground(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 @@ -73,7 +73,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 @@ -2294,14 +2294,14 @@ public boolean isAppOnWhitelist(int appid) {
}

/**
* 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 @@ -2275,6 +2275,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) !=
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 @@ -368,7 +368,7 @@ static void closeDevice(JNIEnv* /* env */, jclass /* clazz */, jlong ptr) {
}
}

static JNINativeMethod sMethods[] = {
static const JNINativeMethod sMethods[] = {
{"nativeOpenDevice",
"(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 @@ -307,7 +307,7 @@ static void setAbsInfo(JNIEnv* env, jclass /* clazz */, jint handle, jint axisCo
::ioctl(static_cast<int>(handle), UI_ABS_SETUP, &absSetup);
}

static JNINativeMethod sMethods[] = {
static const JNINativeMethod sMethods[] = {
{"nativeOpenUinputDevice",
"(Ljava/lang/String;IIIIILjava/lang/String;"
"Lcom/android/commands/uinput/Device$DeviceCallback;)J",
Expand Down
5 changes: 4 additions & 1 deletion core/api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,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 @@ -329,7 +330,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 @@ -42970,7 +42973,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: 43 additions & 0 deletions core/api/module-lib-current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ package android.app.admin {

}

package android.app.compat.gms {

public class GmsModuleHooks {
method @Nullable public static String deviceConfigGetProperty(@NonNull String, @NonNull String);
method public static boolean deviceConfigSetProperties(@NonNull android.provider.DeviceConfig.Properties);
method public static boolean deviceConfigSetProperty(@NonNull String, @NonNull String, @Nullable String);
method @Nullable public static Boolean enableBluetoothAdapter();
method public static boolean interceptSynchronousResultReceiverException(@NonNull RuntimeException);
method public static void makeBluetoothAdapterDiscoverable();
}

}

package android.content {

public abstract class ContentProvider implements android.content.ComponentCallbacks2 {
Expand Down Expand Up @@ -128,6 +141,31 @@ package android.content.pm {

}

package android.ext.settings {

public class ConnChecksSetting {
method public static int get();
method public static boolean put(int);
field public static final int VAL_DEFAULT = 0; // 0x0
field public static final int VAL_DISABLED = 2; // 0x2
field public static final int VAL_GRAPHENEOS = 0; // 0x0
field public static final int VAL_STANDARD = 1; // 0x1
}

public class RemoteKeyProvisioningSettings {
method @Nullable public static String getServerUrlOverride(@NonNull android.content.Context);
field public static final int GRAPHENEOS_PROXY = 0; // 0x0
field public static final int STANDARD_SERVER = 1; // 0x1
}

public class WidevineProvisioningSettings {
method @Nullable public static String getServerHostnameOverride(@NonNull android.content.Context);
field public static final int WV_GRAPHENEOS_PROXY = 0; // 0x0
field public static final int WV_STANDARD_SERVER = 1; // 0x1
}

}

package android.hardware.usb {

public class UsbManager {
Expand Down Expand Up @@ -450,6 +488,11 @@ package android.os {
field public static final long TRACE_TAG_NETWORK = 2097152L; // 0x200000L
}

public final class UserHandle implements android.os.Parcelable {
method public static int getUid(int, int);
method public static int getUserId(int);
}

}

package android.os.storage {
Expand Down
Loading