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

add tests for connectivity checks setting #445

Open
wants to merge 310 commits into
base: 14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
310 commits
Select commit Hold shift + click to select a range
5579712
SettingsLib: allow Permission APEX to use ActionButtons and MainSwitch
muhomorr Jul 2, 2022
59e2271
SettingsProvider: disable bluetooth by default
thestinger Dec 4, 2018
87af2a9
SettingsProvider: enable backup support via seedvault
thestinger Oct 15, 2021
c387e61
SettingsProvider: set TEXT_SHOW_PASSWORD to false by default
thestinger Feb 3, 2017
38a09f2
SettingsProvider: Enable screen auto brightness by default
girlbossceo Jan 6, 2023
f5df2ca
SettingsProvider: hide sensitive information while locked by default
thestinger Jan 2, 2017
8f3fd98
SettingsProvider: Migration for legacy fingerprint keyguard toggle
flawedworld Oct 18, 2021
410c90c
SettingsProvider: add a helper class for migrating Global,Secure values
muhomorr May 24, 2023
11c6386
SettingsProviderHooks: Infrastructure for hooking settings state init
quh4gko8 Jun 29, 2023
341235d
Disable "Add users when locked" settings on every boot
quh4gko8 Jul 1, 2023
7930e04
Disable instant apps feature on every boot
quh4gko8 Jul 1, 2023
3b351e4
CarrierConfig: Always show APN settings on CDMA carriers
flawedworld Sep 28, 2021
41e4899
CarrierConfig: Do not mark dun APN types as read only
flawedworld Feb 9, 2022
d2e1722
CarrierConfig: Always show ICCID
flawedworld Mar 5, 2022
eee18a4
CarrierConfig: allow toggling VoWiFi while roaming by default
girlbossceo Mar 24, 2023
dc18926
enable secondary user logout support by default
flawedworld Oct 15, 2021
3b8d92a
enable backup service for non-owner users
empratyush May 2, 2021
d78b907
increase default max password length to 64
thestinger Jun 29, 2017
ed5aab0
GrapheneOS boot logo mask
thestinger May 11, 2019
af6a42c
use black wallpaper by default
thestinger Mar 7, 2022
d461d19
stop auto-granting location to system browsers
thestinger Mar 17, 2019
cf580f1
appop: Save discrete app op history for more permissions
kdrag0n Oct 11, 2021
2bc6d35
add check for empty TTS engine name
thestinger Dec 20, 2020
c4d7665
Add a config to state whether a device supports increased touch sensi…
lzlrd Jun 30, 2021
383f2ad
stop enforcing camera sound for certain carriers
thestinger Feb 11, 2022
610affa
colors: Switch to GrapheneOS blue color palette for Material You
kdrag0n Mar 7, 2022
b4666d0
improve PendingIntent security check compatibility
thestinger Mar 18, 2022
1ab1f0f
Show USB icon in notification instead of generic system icon
kdrag0n Oct 6, 2020
a66eec9
Sharesheet: Display two rows of max ranked targets
luk1337 Oct 28, 2020
6fa022c
add a class for validating package against its valid signatures
muhomorr Mar 30, 2023
5797d91
a set of helper classes for defining system settings
muhomorr Feb 12, 2023
1b25cb9
add exec spawning sysprop to ExtSettings
muhomorr May 24, 2023
d634093
add exec-based spawning support
thestinger Mar 14, 2015
62dbcab
disable exec spawning when using debugging options
thestinger May 22, 2019
cbe5834
add parameter for avoiding full preload with exec
thestinger May 14, 2019
c1fe9b5
pass through fullPreload to libcore
thestinger Sep 11, 2019
f051df8
disable OpenGL preloading for exec spawning
thestinger May 14, 2019
5b91af3
Revert "disable OpenGL preloading for exec spawning"
thestinger Oct 16, 2021
bbd953f
disable resource preloading for exec spawning
thestinger May 14, 2019
7b36374
disable class preloading for exec spawning
thestinger May 14, 2019
349111f
disable WebView reservation for exec spawning
thestinger May 14, 2019
01d402e
disable JCA provider warm up for exec spawning
thestinger May 14, 2019
6a0e2bc
disable preloading classloaders for exec spawning
thestinger Sep 11, 2019
83c653e
disable preloading HALs for exec spawning
thestinger Sep 11, 2019
551d240
pass through runtime flags for exec spawning and implement them in th…
randomhydrosol Oct 30, 2020
661c1a7
exec spawning: don't close the binder connection when the app crashes
muhomorr Aug 8, 2022
e984ac5
add a wrapper for execveat(2)
muhomorr Aug 14, 2022
c4235d1
zygote: define new runtime flags that relax app hardening
muhomorr Aug 14, 2022
1ef7d81
exec spawning: support runtime resource overlays
muhomorr Mar 30, 2023
569656b
imprecise authenticated timestamps using https
renlord Nov 14, 2019
fa0f187
disable auto time refresh when auto time is off
renlord Jun 30, 2020
0b94bbb
reduce time update threshold
thestinger Feb 22, 2023
34efa3b
reduce system clock drift warning
thestinger Feb 22, 2023
7dc59e8
add system package check methods to PackageUtils
muhomorr Jun 22, 2023
27d510c
filter out non-system packages from location indicator exemptions
muhomorr Jun 22, 2023
2988ae1
filter out non-system packages from getLocationBypassPackages() result
muhomorr Jun 22, 2023
44b0310
SystemUI: enable NFC quick settings tile
thestinger Mar 17, 2019
dd0ebec
SystemUI: Enable production-ready feature flags
kdrag0n Mar 14, 2022
cd030db
SystemUI: Require unlocking to use sensitive QS tiles
kdrag0n Oct 6, 2021
1b9a0b6
SystemUI: Remove nav bar background in QS customizer
kdrag0n Oct 12, 2021
680027d
SystemUI: Use new privacy indicators for location
kdrag0n Oct 11, 2021
9b6db19
SystemUI: fully enable location indicators by default
thestinger Aug 17, 2022
70e831e
SystemUI: specify config_sceenshotWorkProfileFilesApp
muhomorr Jun 18, 2023
4a6e89d
SystemUI: improve media projection dialog wording
muhomorr Jan 22, 2023
5832279
SystemUI: add Battery share & Battery share quick tiles
empratyush Jun 21, 2022
e18cd7c
SystemUI: change default quick tiles and quick tile order
thestinger Oct 19, 2021
f13911e
SystemUI: make screenshot sound use touch sounds setting
girlbossceo Mar 19, 2023
f9b1ef8
SystemUI: have NfcTile get an NfcAdapter directly
inthewaves Sep 20, 2020
7a04234
SystemUI: apply "Add users from lock screen" setting to guest users
muhomorr Jun 23, 2023
83c2453
Add config to exempt telephony-related app from location indicators
kdrag0n Feb 17, 2022
eeca66d
exempt some system packages from status bar privacy indicator
thestinger Apr 17, 2022
1d3dd71
PackageInstaller: link "App info" screen from the uninstallation dialog
muhomorr Apr 17, 2022
ddca3a4
PackageInstaller: make sure install confirmation returns a result
muhomorr Jun 2, 2022
31a21d1
Revert "Remove dependency on IME subtype from TSMS"
mikeNG Dec 27, 2021
4ae364b
add helpers for system_server extensions
muhomorr Jul 31, 2022
a3de0b4
Warn the user if they are using a prototype Pixel device
flawedworld Jun 15, 2022
e5de67b
Support forwarding notifications from other users
girlbossceo Mar 19, 2022
f07bc2b
DeviceIdleJobsController: don't ignore whitelisted system apps
muhomorr Jul 7, 2022
a107be9
do not allow disabling app visibility filtering
muhomorr Apr 6, 2023
a9b6e71
add hooks for modifying PackageManagerService behavior
muhomorr Mar 27, 2023
a58471a
add hooks for modifying ActivityThread behavior
muhomorr Aug 18, 2023
38842cf
AppBindArgs: infrastructure for passing extra args to app process init
muhomorr May 16, 2023
222e4c9
infrastructure for spoofing self permission checks
muhomorr Jul 31, 2022
9dc95b4
infrastructure for special runtime permissions
muhomorr Feb 9, 2023
5fa4a62
add special runtime permission for other sensors
muhomorr Feb 9, 2023
372d365
notify the user when sensors access is denied by OTHER_SENSORS perm
muhomorr Oct 4, 2022
ec6c844
make INTERNET into a special runtime permission
thestinger Mar 17, 2019
9234484
improve compatibility of INTERNET special runtime permission
muhomorr Jul 31, 2022
a6b991e
don't run jobs that need connectivity in apps that lack INTERNET perm
muhomorr May 19, 2023
309410b
PackageInstallerUI: an option to skip auto-grant of INTERNET permission
muhomorr Oct 7, 2022
199865d
use permanent fingerprint lockout immediately
thestinger Sep 12, 2017
ea14eca
add system property for disabling keyguard camera
thestinger Jul 25, 2017
2f767c6
automatically reboot device after timeout if set
randomhydrosol Oct 17, 2021
3bc296e
Default to automatically rebooting device after 72 hours
flawedworld Mar 29, 2023
d2641bd
gosps: support for per-app GrapheneOS-specific persistent state
muhomorr Jul 31, 2022
0f8e905
exec spawning: add an option to relax app hardening
muhomorr Aug 14, 2022
06d7008
infrastructure for the Storage Scopes feature
muhomorr Jul 31, 2022
a40e16a
control access to Android/obb directory with a GosPackageState flag
muhomorr Jul 31, 2022
120241a
add an option to show the details of an application error to the user
muhomorr Aug 8, 2022
73e2143
Set always-on and lockdown on by default on first vpn connection at s…
quh4gko8 Aug 1, 2022
9d61584
pre-grant POST_NOTIFICATIONS to more system apps
muhomorr Aug 22, 2022
b0384d1
SystemUI: under-display fingerprint scanner support
muhomorr Dec 6, 2022
ef062ba
allow privileged installer to search for packages across all users
muhomorr Nov 23, 2022
d30e1e2
extend original-package renaming to provider authorities for Vanadium
muhomorr Nov 5, 2022
19483d2
extend original-package renaming to static launcher shortcuts
muhomorr Nov 23, 2022
584a5c5
disable package parser cache
muhomorr Jan 30, 2023
c809433
perform additional boot-time checks on system package updates
muhomorr Jan 31, 2023
5a663da
allow out-of-band package updates to use original-package system
muhomorr Jan 27, 2023
244436a
require fs-verity when installing system package updates
muhomorr Jan 31, 2023
9664c55
don't allow updating system packages to the same versionCode
muhomorr Dec 27, 2022
5a733fd
Remove build fingerprint from screenshot EXIF
girlbossceo Apr 29, 2022
2c6fbc8
add toggle for screenshot timestamp EXIF metadata
girlbossceo Feb 18, 2023
3d4ae08
SUPL: Don't send IMSI / Phone number to SUPL server
MSe1969 Oct 29, 2018
39589f7
add GNSS SUPL setting
muhomorr Mar 3, 2023
9a52c4f
allow privileged installers to maintain a global list of busy packages
muhomorr Mar 4, 2023
06ac3f3
add option to scramble PIN layout
muhomorr Feb 24, 2023
fc03082
enable LOCK_PIN_ENHANCED_PRIVACY setting by default
muhomorr Jun 14, 2023
1309c25
don't crash apps that depend on missing Gservices provider
muhomorr Mar 26, 2023
d86d2c7
integrate Google's EuiccSupportPixel package
muhomorr Mar 27, 2023
e958c4d
gmscompat: add compatibility layer for unprivileged GMS
thestinger Jun 6, 2023
87c36a3
integrate Google's eUICC LPA app
muhomorr May 30, 2023
14c547b
do not auto-grant Camera permission to the eUICC LPA UI app
muhomorr Mar 19, 2023
a0979a3
attestation key provisioning server setting
girlbossceo Apr 3, 2023
1cc4ab7
require vendor camera extensions package to be a system app by default
muhomorr Mar 30, 2023
de411d2
allow "Pixel Camera Services" app to provide vendor camera extensions
muhomorr Mar 30, 2023
c328626
infrastructure for creating per-package seinfo overrides
muhomorr Mar 30, 2023
ca4cd2c
support denying special access to hardware accelerators by Google apps
muhomorr Apr 6, 2023
edf5258
always preserve package enabled setting after package update
muhomorr Feb 13, 2023
7779c4f
add GNSS PSDS setting
muhomorr May 2, 2023
5a489bb
support redirecting ContentProvider calls to another provider
muhomorr May 16, 2023
483fc07
infrastructure for the Contact Scopes feature
muhomorr May 16, 2023
731b681
add connectivity checks setting and its migration from Settings.Global
muhomorr May 25, 2023
a5f5a83
Wi-Fi auto turn off
muhomorr Jul 31, 2022
d947cda
Bluetooth auto turn off
muhomorr Jul 31, 2022
c8dabfe
implement dynamic deny_new_usb toggle mode
thestinger Jun 16, 2016
6e1257d
add native debugging (ptrace) sysprop to ExtSettings
muhomorr May 24, 2023
ed13d55
add support for hooking LocationManager methods
muhomorr Jun 19, 2023
42f990f
improve compat with apps that try to access network location provider
muhomorr Jun 19, 2023
0151fca
gmscompat: hide preinstalled Google eUICC LPA package from Play Store
muhomorr Sep 1, 2023
18b658d
ErrorDialogController: do not auto-dismiss crash dialogs
muhomorr Oct 1, 2023
5b924d4
ErrorReport UI: improve readability of native crash reports
muhomorr Oct 1, 2023
404b67e
Revert "attestation key provisioning server setting"
muhomorr Aug 10, 2023
9e32e58
add RemoteKeyProvisioning server override setting
muhomorr Aug 10, 2023
b8becfb
gmscompat: adjustments for 14
muhomorr Aug 20, 2023
f3649e3
sscopes: 14
muhomorr Aug 10, 2023
9ec760e
temp: opt-out of using "SPA" rewrites of some Settings app screens
muhomorr Aug 21, 2023
bcd7259
bugfix: dynamic pregrants of special perms were skipped
muhomorr Oct 5, 2023
ff46cc7
sscopes: temp: disable incomplete handling of READ_MEDIA_VISUAL_USER_…
muhomorr Oct 5, 2023
73dcfd6
gmscompat: adjust to background activity launch rules in 14
muhomorr Oct 5, 2023
0afc34c
Revert "Revert "Remove dependency on IME subtype from TSMS""
muhomorr Oct 6, 2023
675c2ea
fixup! imprecise authenticated timestamps using https
muhomorr Oct 6, 2023
d7a9f5a
gmscompat: further adjust UserManager shim for 14
muhomorr Oct 6, 2023
3cccdb5
[rwc] added reverse wireless charging
empratyush Oct 7, 2023
7c38242
[rwc] replace battery share implementation
empratyush Oct 7, 2023
8958433
PackageSpec: add an extra utility method
muhomorr Oct 7, 2023
fbfc337
support specifying per-package hardening configs
muhomorr Oct 7, 2023
317e1f8
disable hardened_malloc in Google Camera
muhomorr Oct 7, 2023
3d8120b
temp: add a workaround for SystemServerExt late-initialization bug
muhomorr Oct 7, 2023
a999ff3
support showing dexopt progress during boot
muhomorr Oct 3, 2023
a5dddf7
restore Android 13 "pause work profile" behavior
muhomorr Oct 8, 2023
77ad3f5
gmscompat: adjust TelephonyManager shim for 14
muhomorr Oct 8, 2023
5452f66
adjust "Optimizing apps" string
muhomorr Oct 8, 2023
b372466
temp: unsuspend work profile when resuming it
muhomorr Oct 9, 2023
80647ff
constify JNINativeMethod tables
muhomorr Oct 9, 2023
a7cf740
fixup! restore Android 13 "pause work profile" behavior
muhomorr Oct 9, 2023
a021b17
Unhide GmsCompat#isGmsapp(ApplicationInfo) overload
quh4gko8 Oct 9, 2023
e7d7ee8
Allow customizing lock screen shortcuts via ThemePicker
quh4gko8 Oct 10, 2023
513d932
bugfix: Prevent crashes when setting restrictions for guest users
quh4gko8 Oct 10, 2023
80c6183
fixup! Bluetooth auto turn off
muhomorr Oct 11, 2023
339f8ac
fixup! Wi-Fi auto turn off
muhomorr Oct 11, 2023
a082c02
fixup! add helpers for system_server extensions
muhomorr Oct 11, 2023
f6021bc
fixup! integrate Google's eUICC LPA app
muhomorr Oct 11, 2023
a599541
remove no longer used Context.registerReceiver() wrapper
muhomorr Oct 11, 2023
e3c5709
gmscompat: enable DynamiteLoader v2
muhomorr Oct 11, 2023
218bfce
PackageSpec: make validator into an interface
muhomorr Oct 11, 2023
c185fb4
fix getHardeningConfig() for packages missing from the primary user
muhomorr Oct 11, 2023
9796776
do not delete compiled code (OAT files) of hibernated apps
muhomorr Oct 11, 2023
a03d2a2
gmscompat: fix crash in TelephonyManager.requestCellInfoUpdate()
muhomorr Oct 11, 2023
180e08a
Revert "gmscompat: fix crash in TelephonyManager.requestCellInfoUpdat…
muhomorr Oct 13, 2023
2c04caa
exempt telephony service from the new package visibility restrictions
muhomorr Oct 13, 2023
159953f
gmscompat: expand background activity launch shim to all core GMS apps
muhomorr Oct 13, 2023
bfdaa22
extend network time refresh toggle
thestinger Oct 15, 2023
f7532f8
bugfix: Fix inconsistent check when installing from known source
quh4gko8 Oct 16, 2023
3da6b9e
bugfix: PIN input layout scrambling didn't apply to SIM PIN
muhomorr Oct 18, 2023
32f1b80
allow system apps to make sticky notifications
thestinger Oct 21, 2023
6e7493b
add a helper class for using BroadcastReceiver as a PendingIntent target
muhomorr Oct 23, 2023
60df03a
SseUtils: add a method for adding Notification.Action
muhomorr Oct 23, 2023
9f5b733
MissingSpecialPermNotif: remove dependency on SystemServerExt singleton
muhomorr Oct 23, 2023
e89ca73
SseUtils: remove dependency on SystemServerExt singleton
muhomorr Oct 23, 2023
6779eac
remove now-unused PendingActionReceiver
muhomorr Oct 23, 2023
19bcea5
Revert "temp: add a workaround for SystemServerExt late-initializatio…
muhomorr Oct 23, 2023
0321f22
remove error-prone SystemServerExt.get() method
muhomorr Oct 23, 2023
4cad9cc
change system_server label from "Android System" to "GrapheneOS"
muhomorr Oct 23, 2023
9292857
disable OtaDexoptService
muhomorr Oct 23, 2023
f276be6
add notification-based UI for the background dexopt job
muhomorr Oct 23, 2023
846ad0d
bugfix: Properly set originating app to request for install permission
quh4gko8 Oct 26, 2023
d2d75e9
don't skip showing first app crash dialog
muhomorr Oct 24, 2023
840f038
set memory tagging level to ASYNC for all system apps
muhomorr Oct 28, 2023
202f9da
set memory tagging level to ASYNC for apps without native code
muhomorr Oct 28, 2023
11eba8c
Dexopt UI: don't prompt to restart apps if only non-base APK changed
muhomorr Oct 30, 2023
7bddb99
Dexopt UI: skip progress updates for the first 15 seconds of job run
muhomorr Oct 30, 2023
26df015
infrastructure for per-package dex2oat compiler filter overrides
muhomorr Oct 31, 2023
79ecff5
always use speed dex2oat compiler filter for VPN service packages
muhomorr Nov 1, 2023
1e2e99d
Revert "don't skip showing first app crash dialog"
muhomorr Nov 3, 2023
545f1c8
gmscompat: replace cross-user intent broadcasts with user-local ones
muhomorr Nov 8, 2023
d45a87e
Revert "fix getHardeningConfig() for packages missing from the primar…
muhomorr Nov 16, 2023
9c75de1
Revert "disable hardened_malloc in Google Camera"
muhomorr Nov 16, 2023
d55bb26
Revert "support specifying per-package hardening configs"
muhomorr Nov 16, 2023
fc0baa8
fixup! exec spawning: add an option to relax app hardening
muhomorr Nov 18, 2023
5b9ae30
infrastructure for passing extra args to Zygote and WebViewZygote
muhomorr Sep 23, 2023
4cd2940
infrastructure for passing SELinux flags to the kernel
muhomorr Sep 24, 2023
e5bc812
add base class for complex per-app switches
muhomorr Sep 24, 2023
38d77c4
extsettings: support using resource reference for default setting value
muhomorr Sep 25, 2023
4c582a9
support specifying per-app compatibility configs
muhomorr Nov 16, 2023
4e7d6c6
gosps: adjust definitions of hardening flags and add new ones
muhomorr Sep 24, 2023
04d481c
gosps: remove no longer used eligibleForRelaxHardeningFlag() method
muhomorr Sep 25, 2023
280cd10
add per-app setting for hardened_malloc and extended VA space
muhomorr Sep 26, 2023
2870647
disable hardened_malloc by default for Pixel Camera
muhomorr Nov 17, 2023
f18317d
always stop app zygotes when app is being force-stopped
muhomorr Nov 8, 2023
b40e369
add per-app native debugging setting
muhomorr Sep 26, 2023
02852fd
define package names of the system browser
muhomorr Sep 26, 2023
919a3c9
add per-app dynamic code execution settings
muhomorr Sep 26, 2023
5d0a94e
gosps: don't pass PMService to GosPackageStatePm.getEditor()
muhomorr Sep 14, 2023
9a16f05
gosps: add support for editing GosPackageState via adb on dev builds
muhomorr Sep 20, 2023
ae4ff6f
add a test for the new per-app hardening features
muhomorr Sep 20, 2023
9c65eaa
Revert "set memory tagging level to ASYNC for apps without native code"
muhomorr Nov 5, 2023
abdbe84
Revert "set memory tagging level to ASYNC for all system apps"
muhomorr Nov 5, 2023
893d9d1
add per-app memory tagging setting
muhomorr Nov 5, 2023
5881487
add constants for some system package names
muhomorr Nov 15, 2023
a7f2bd8
improve error report viewer
muhomorr Nov 15, 2023
aadf1f9
add helper class for launching non-standard Settings intents
muhomorr Nov 15, 2023
97cee30
add system API for getting app info by PID
muhomorr Nov 8, 2023
a98b974
infrastructure for handling callbacks from logd to system_server
muhomorr Nov 8, 2023
f3885c7
infrastructure for showing notifications about app exploit protection
muhomorr Nov 8, 2023
687510a
infrastructure for showing notifications about SELinux TSEC_FLAG denials
muhomorr Nov 15, 2023
22b12fb
show notification after app is blocked from accessing ptrace
muhomorr Nov 19, 2023
3ec789b
fix rate limiting for non-app tombstones
muhomorr Nov 8, 2023
03465c3
notify the user about notable system journal entries
muhomorr Nov 8, 2023
1c86acb
show notification after memory tag check failure crashes an app
muhomorr Nov 19, 2023
c57d67e
infrastructure for attaching extra data to ApplicationInfo objects
muhomorr Nov 27, 2023
d0ba8c3
fixup! support specifying per-app compatibility configs
muhomorr Nov 27, 2023
500958e
fixup! add per-app setting for hardened_malloc and extended VA space
muhomorr Nov 27, 2023
11b669a
fixup! add per-app native debugging setting
muhomorr Nov 27, 2023
51d37dd
fixup! add per-app dynamic code execution settings
muhomorr Nov 27, 2023
f4c0d6a
fixup! add per-app memory tagging setting
muhomorr Nov 27, 2023
acb609e
add compat change for skipping notification about blocked ptrace access
muhomorr Nov 27, 2023
471f085
add setting for skipping system process crash notifications
muhomorr Nov 27, 2023
c29e044
fixup! add per-app memory tagging setting
muhomorr Nov 28, 2023
174f75d
never skip crash notification for MTE crashes of system processes
muhomorr Nov 29, 2023
0a7869b
add tests for connectivity checks setting
maade93791 Nov 10, 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
  •  
  •  
  •  
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,14 @@ 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;
}

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 @@ -2257,6 +2257,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
3 changes: 3 additions & 0 deletions 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
37 changes: 37 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 public static void 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,25 @@ 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
}

}

package android.hardware.usb {

public class UsbManager {
Expand Down Expand Up @@ -450,6 +482,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