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

disable screencapture detection api #463

Open
wants to merge 242 commits into
base: 14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
ab65792
aapt2: add stringified resource configuration to Configuration.proto
muhomorr Aug 28, 2023
510e6ee
constify JNINativeMethod tables
muhomorr Oct 9, 2023
d455b29
whitelist CAPTURE_AUDIO_OUTPUT for Dialer
thestinger Apr 3, 2023
baddb55
AlertWindowNotification: Correctly load app label
hustler-not-chatty Nov 2, 2022
f71c776
toast: fix bg color not changing with theme change
SuperDroidBond Sep 11, 2022
6bd2cc8
bugfix: Properly set originating app to request for install permission
quh4gko8 Oct 26, 2023
3839e70
IllustrationPreference: Hide illustration when we fail to play anim
luk1337 Jun 9, 2022
281c862
Add app.grapheneos.apps to vendor_required_apps_managed_*
girlbossceo Dec 16, 2022
c3ed744
bugfix: automatic notification permission request breaks in some cases
muhomorr Aug 22, 2022
28bcb76
fix DevicePolicyManager#logoutUser() never succeeding
muhomorr Aug 18, 2022
97b780a
Revert "Null safe package name in AppOps writeState"
muhomorr Jan 6, 2023
bccea6d
appops: skip ops for invalid null package during state serialization
muhomorr Jan 6, 2023
5f68a66
bugfix: lite APK parser didn't parse targetSdkVersion in some cases
muhomorr Dec 30, 2022
b37ecf4
mark UserHandle#get{Uid, UserId} as module SystemApi
muhomorr Aug 17, 2022
72f9156
add getContext() method to ContentResolver
muhomorr Feb 18, 2023
4874be7
add LongArray.addAll(long[]) method
muhomorr May 16, 2023
c30a72b
add BaseBundle.get{Boolean2,Number}() methods
muhomorr May 16, 2023
bd12c4e
allow system apps to make sticky notifications
thestinger Oct 21, 2023
2d9a146
don't leak device-wide package list to apps when work profile is present
muhomorr Nov 5, 2022
6b286f2
always auto-grant permissions that have "normal" protectionLevel
muhomorr Dec 3, 2022
de350e6
add constants for some system package names
muhomorr Nov 15, 2023
55d2533
define package names of the system browser
muhomorr Sep 26, 2023
9c36df4
switch to providing WebView via Vanadium
inthewaves Oct 6, 2020
d43f1a7
add missing display cutout overlays
thestinger Oct 26, 2021
b9982e1
fully disallow installing instant apps
muhomorr Jan 20, 2023
88bc276
enable boot/bootloader/radio version checks
thestinger Jun 15, 2017
5813c04
always set deprecated Build.SERIAL to UNKNOWN
thestinger Sep 7, 2017
3544c90
Display UART notification on user builds
flawedworld Jul 16, 2021
071e4b9
change system_server label from "Android System" to "GrapheneOS"
muhomorr Oct 23, 2023
41b33ef
core/config: [temporary] don't report statementservice crashes
thestinger Oct 20, 2021
45959f6
core/config: Set config_clockFontFamily to empty string
luk1337 Dec 9, 2022
c07152a
core/config: enable doze and app standby
thestinger Oct 16, 2016
e599190
core/config: enable gesture navigation by default
thestinger Nov 28, 2018
41296c1
core/config: enable multi user UI
thestinger Nov 28, 2018
d55fc1a
core/config: revert to pre-12 power button behavior
thestinger Oct 9, 2021
c0e144e
core/config: raise maximum users to 32
thestinger Nov 28, 2018
dd9a39d
core/config: disable long press on power assistant setting
thestinger Oct 17, 2021
4f6bd7e
core/config: disable safe volume everywhere, not just the US
rustybird Apr 22, 2020
6db3c71
core/config: disable using telephony-based auto time
thestinger Feb 22, 2023
65192b9
core/config: use Cloudflare DNS as the default fallback
thestinger Apr 2, 2018
94772df
core/config: set GrapheneOS launcher as notification listener
thestinger Mar 16, 2021
26dbd56
core/config: use round adaptive icon mask and parse round icons
thestinger Mar 10, 2018
9e8bff9
core/config: decrease minimum color temperature for Night Light to 686K
thestinger Aug 26, 2022
81946a2
core/config: add camera app QrTile activity as default
empratyush Oct 29, 2022
92652e4
SettingsLib: use Cloudflare DNS servers as hints
thestinger Apr 2, 2018
6b421ac
SettingsLib: support replacing drawable in SelectorWithWidgetPreference
muhomorr May 16, 2023
366bbc9
SettingsLib: allow Permission APEX to use ActionButtons and MainSwitch
muhomorr Jul 2, 2022
46ec420
SettingsProvider: disable bluetooth by default
thestinger Dec 4, 2018
13efb6f
SettingsProvider: enable backup support via seedvault
thestinger Oct 15, 2021
091e952
SettingsProvider: set TEXT_SHOW_PASSWORD to false by default
thestinger Feb 3, 2017
da77eca
SettingsProvider: Enable screen auto brightness by default
girlbossceo Jan 6, 2023
0a3918d
SettingsProvider: hide sensitive information while locked by default
thestinger Jan 2, 2017
6ed4b98
SettingsProvider: Migration for legacy fingerprint keyguard toggle
flawedworld Oct 18, 2021
c78da11
SettingsProvider: add a helper class for migrating Global,Secure values
muhomorr May 24, 2023
5b88d00
SettingsProviderHooks: Infrastructure for hooking settings state init
quh4gko8 Jun 29, 2023
750aaf2
Disable "Add users when locked" settings on every boot
quh4gko8 Jul 1, 2023
4e5a121
Disable instant apps feature on every boot
quh4gko8 Jul 1, 2023
34822d5
CarrierConfig: Always show APN settings on CDMA carriers
flawedworld Sep 28, 2021
5057c28
CarrierConfig: Do not mark dun APN types as read only
flawedworld Feb 9, 2022
e8aff4a
CarrierConfig: Always show ICCID
flawedworld Mar 5, 2022
d7a563b
CarrierConfig: allow toggling VoWiFi while roaming by default
girlbossceo Mar 24, 2023
44e4656
enable secondary user logout support by default
flawedworld Oct 15, 2021
f511ae1
enable backup service for non-owner users
empratyush May 2, 2021
9da74c3
increase default max password length to 64
thestinger Jun 29, 2017
3cb8ea3
GrapheneOS boot logo mask
thestinger May 11, 2019
9b50f12
use black wallpaper by default
thestinger Mar 7, 2022
de85448
stop auto-granting location to system browsers
thestinger Mar 17, 2019
fdfb752
appop: Save discrete app op history for more permissions
kdrag0n Oct 11, 2021
11295a1
add check for empty TTS engine name
thestinger Dec 20, 2020
6d14e2b
Add a config to state whether a device supports increased touch sensi…
lzlrd Jun 30, 2021
f85a109
stop enforcing camera sound for certain carriers
thestinger Feb 11, 2022
8637f52
colors: Switch to GrapheneOS blue color palette for Material You
kdrag0n Mar 7, 2022
65d6fd6
improve PendingIntent security check compatibility
thestinger Mar 18, 2022
a12b38c
Show USB icon in notification instead of generic system icon
kdrag0n Oct 6, 2020
27a46dd
Sharesheet: Display two rows of max ranked targets
luk1337 Oct 28, 2020
a1ad333
add a class for validating package against its valid signatures
muhomorr Mar 30, 2023
62406bc
extsettings: add a set of helper classes for defining system settings
muhomorr Feb 12, 2023
07d3569
add exec spawning sysprop to ExtSettings
muhomorr May 24, 2023
0125afd
add exec-based spawning support
thestinger Mar 14, 2015
72a2bd7
disable exec spawning when using debugging options
thestinger May 22, 2019
a791cbe
add parameter for avoiding full preload with exec
thestinger May 14, 2019
429c1b6
pass through fullPreload to libcore
thestinger Sep 11, 2019
9043d56
disable OpenGL preloading for exec spawning
thestinger May 14, 2019
a10a6eb
Revert "disable OpenGL preloading for exec spawning"
thestinger Oct 16, 2021
f8de156
disable resource preloading for exec spawning
thestinger May 14, 2019
10439a3
disable class preloading for exec spawning
thestinger May 14, 2019
6032f0c
disable WebView reservation for exec spawning
thestinger May 14, 2019
4933ed6
disable JCA provider warm up for exec spawning
thestinger May 14, 2019
14823af
disable preloading classloaders for exec spawning
thestinger Sep 11, 2019
d100eee
disable preloading HALs for exec spawning
thestinger Sep 11, 2019
1038033
pass through runtime flags for exec spawning and implement them in th…
randomhydrosol Oct 30, 2020
a29102a
exec spawning: don't close the binder connection when the app crashes
muhomorr Aug 8, 2022
d0fb5b5
add a wrapper for execveat(2)
muhomorr Aug 14, 2022
fcf5271
zygote: define runtime flags that depend on exec spawning
muhomorr Aug 14, 2022
7fbef9b
exec spawning: support runtime resource overlays
muhomorr Mar 30, 2023
00e4f63
exec spawning: support disabling hardened_malloc and extended VA space
muhomorr Aug 14, 2022
9a7733f
imprecise authenticated timestamps using https
renlord Nov 14, 2019
7d0f997
disable auto time refresh when auto time is off
renlord Jun 30, 2020
59ab410
extend network time refresh toggle
thestinger Oct 15, 2023
e4fe172
reduce time update threshold
thestinger Feb 22, 2023
3fb51d8
reduce system clock drift warning
thestinger Feb 22, 2023
8244076
add system package check methods to PackageUtils
muhomorr Jun 22, 2023
abc9c64
filter out non-system packages from location indicator exemptions
muhomorr Jun 22, 2023
f9328a1
filter out non-system packages from getLocationBypassPackages() result
muhomorr Jun 22, 2023
0e38a8a
SystemUI: enable NFC quick settings tile
thestinger Mar 17, 2019
1e8f3f7
SystemUI: Enable production-ready feature flags
kdrag0n Mar 14, 2022
2e43618
SystemUI: Require unlocking to use sensitive QS tiles
kdrag0n Oct 6, 2021
c060e94
SystemUI: Remove nav bar background in QS customizer
kdrag0n Oct 12, 2021
276a1a3
SystemUI: Use new privacy indicators for location
kdrag0n Oct 11, 2021
75e0569
SystemUI: fully enable location indicators by default
thestinger Aug 17, 2022
d94808b
SystemUI: specify config_sceenshotWorkProfileFilesApp
muhomorr Jun 18, 2023
566dd71
SystemUI: improve media projection dialog wording
muhomorr Jan 22, 2023
115d190
SystemUI: add Battery share & Battery share quick tiles
empratyush Jun 21, 2022
2d7073b
SystemUI: change default quick tiles and quick tile order
thestinger Oct 19, 2021
5fe1d31
SystemUI: make screenshot sound use touch sounds setting
girlbossceo Mar 19, 2023
2758fba
SystemUI: have NfcTile get an NfcAdapter directly
inthewaves Sep 20, 2020
0e52759
SystemUI: apply "Add users from lock screen" setting to guest users
muhomorr Jun 23, 2023
ef9442a
Add config to exempt telephony-related app from location indicators
kdrag0n Feb 17, 2022
af7dbc3
exempt some system packages from status bar privacy indicator
thestinger Apr 17, 2022
063bf3b
PackageInstaller: link "App info" screen from the uninstallation dialog
muhomorr Apr 17, 2022
2b45d49
PackageInstaller: make sure install confirmation returns a result
muhomorr Jun 2, 2022
b27bc58
add helpers for system_server extensions
muhomorr Jul 31, 2022
940930f
Warn the user if they are using a prototype Pixel device
flawedworld Jun 15, 2022
70730a1
Support forwarding notifications from other users
girlbossceo Mar 19, 2022
e22e0fa
DeviceIdleJobsController: don't ignore whitelisted system apps
muhomorr Jul 7, 2022
89bc070
do not allow disabling app visibility filtering
muhomorr Apr 6, 2023
52a9bcf
add hooks for modifying PackageManagerService behavior
muhomorr Mar 27, 2023
2b853ac
add hooks for modifying ActivityThread behavior
muhomorr Aug 18, 2023
030e1d5
AppBindArgs: infrastructure for passing extra args to app process init
muhomorr May 16, 2023
19d2db8
infrastructure for spoofing self permission checks
muhomorr Jul 31, 2022
c287d2d
infrastructure for special runtime permissions
muhomorr Feb 9, 2023
8e21b92
add special runtime permission for other sensors
muhomorr Feb 9, 2023
cd2d507
notify the user when sensors access is denied by OTHER_SENSORS perm
muhomorr Oct 4, 2022
7481ab5
make INTERNET into a special runtime permission
thestinger Mar 17, 2019
fe7d7b9
improve compatibility of INTERNET special runtime permission
muhomorr Jul 31, 2022
d3c9c2c
don't run jobs that need connectivity in apps that lack INTERNET perm
muhomorr May 19, 2023
feff921
PackageInstallerUI: an option to skip auto-grant of INTERNET permission
muhomorr Oct 7, 2022
c60a83d
use permanent fingerprint lockout immediately
thestinger Sep 12, 2017
4d3c2c3
add system property for disabling keyguard camera
thestinger Jul 25, 2017
4bae145
automatically reboot device after timeout if set
randomhydrosol Oct 17, 2021
bd5ff0a
Default to automatically rebooting device after 72 hours
flawedworld Mar 29, 2023
97b7361
gosps: support for per-app GrapheneOS-specific persistent state
muhomorr Jul 31, 2022
09890f0
infrastructure for the Storage Scopes feature
muhomorr Jul 31, 2022
4d5bbcd
sscopes: temp: disable incomplete handling of READ_MEDIA_VISUAL_USER_…
muhomorr Oct 5, 2023
9ac2409
control access to Android/obb directory with a GosPackageState flag
muhomorr Jul 31, 2022
d16c8b6
add viewer for plain-text error reports
muhomorr Dec 3, 2023
ab95467
add an option to show the details of an application error to the user
muhomorr Aug 8, 2022
c57a585
ErrorDialogController: do not auto-dismiss crash dialogs
muhomorr Oct 1, 2023
019ba39
Set always-on and lockdown on by default on first vpn connection at s…
quh4gko8 Aug 1, 2022
fdc0fde
pre-grant POST_NOTIFICATIONS to more system apps
muhomorr Aug 22, 2022
5acf29d
allow privileged installer to search for packages across all users
muhomorr Nov 23, 2022
f07fd7d
extend original-package renaming to provider authorities for Vanadium
muhomorr Nov 5, 2022
95b8f89
extend original-package renaming to static launcher shortcuts
muhomorr Nov 23, 2022
e87f6a0
disable package parser cache
muhomorr Jan 30, 2023
e74e5a7
perform additional boot-time checks on system package updates
muhomorr Jan 31, 2023
54f98f2
allow out-of-band package updates to use original-package system
muhomorr Jan 27, 2023
73c71a5
require fs-verity when installing system package updates
muhomorr Jan 31, 2023
2283748
don't allow updating system packages to the same versionCode
muhomorr Dec 27, 2022
20bff4c
Remove build fingerprint from screenshot EXIF
girlbossceo Apr 29, 2022
e4df28a
add toggle for screenshot timestamp EXIF metadata
girlbossceo Feb 18, 2023
4b43b00
SUPL: Don't send IMSI / Phone number to SUPL server
MSe1969 Oct 29, 2018
e4499a2
add GNSS SUPL setting
muhomorr Mar 3, 2023
6a632d4
allow privileged installers to maintain a global list of busy packages
muhomorr Mar 4, 2023
b21e811
add option to scramble PIN layout
muhomorr Feb 24, 2023
4bbe0bd
enable LOCK_PIN_ENHANCED_PRIVACY setting by default
muhomorr Jun 14, 2023
fc39e58
don't crash apps that depend on missing Gservices provider
muhomorr Mar 26, 2023
da27711
integrate Google's EuiccSupportPixel package
muhomorr Mar 27, 2023
a57af1e
gmscompat: add compatibility layer for unprivileged GMS
thestinger Jun 6, 2023
8ccf0b6
integrate Google's eUICC LPA app
muhomorr May 30, 2023
fd12d00
do not auto-grant Camera permission to the eUICC LPA UI app
muhomorr Mar 19, 2023
55f7ab7
gmscompat: hide preinstalled Google eUICC LPA package from Play Store
muhomorr Sep 1, 2023
ed45c3f
require vendor camera extensions package to be a system app by default
muhomorr Mar 30, 2023
7112f9b
allow "Pixel Camera Services" app to provide vendor camera extensions
muhomorr Mar 30, 2023
8d9a8bc
infrastructure for creating per-package seinfo overrides
muhomorr Mar 30, 2023
56ef1c5
support denying special access to hardware accelerators by Google apps
muhomorr Apr 6, 2023
04aa09f
always preserve package enabled setting after package update
muhomorr Feb 13, 2023
be0f65e
add GNSS PSDS setting
muhomorr May 2, 2023
15f402a
support redirecting ContentProvider calls to another provider
muhomorr May 16, 2023
187e794
infrastructure for the Contact Scopes feature
muhomorr May 16, 2023
a2fdfcd
add connectivity checks setting and its migration from Settings.Global
muhomorr May 25, 2023
d2fda91
Wi-Fi auto turn off
muhomorr Jul 31, 2022
e46a14b
Bluetooth auto turn off
muhomorr Jul 31, 2022
59df62d
implement dynamic deny_new_usb toggle mode
thestinger Jun 16, 2016
4531954
add native debugging (ptrace) sysprop to ExtSettings
muhomorr May 24, 2023
c100c37
add support for hooking LocationManager methods
muhomorr Jun 19, 2023
9d4fa75
improve compat with apps that try to access network location provider
muhomorr Jun 19, 2023
7067243
add RemoteKeyProvisioning server override setting
muhomorr Aug 10, 2023
e825a14
temp: opt-out of using "SPA" rewrites of some Settings app screens
muhomorr Aug 21, 2023
fa38764
infrastructure for passing extra args to Zygote and WebViewZygote
muhomorr Sep 23, 2023
d56223c
infrastructure for passing SELinux flags to the kernel
muhomorr Sep 24, 2023
be5b884
infrastructure for attaching extra data to ApplicationInfo objects
muhomorr Nov 27, 2023
61844da
add base class for complex per-app switches
muhomorr Sep 24, 2023
f148d89
support specifying per-app compatibility configs
muhomorr Nov 16, 2023
ec2316b
support showing dexopt progress during boot
muhomorr Oct 3, 2023
476fbb1
restore Android 13 "pause work profile" behavior
muhomorr Oct 8, 2023
f63d9a1
Allow customizing lock screen shortcuts via ThemePicker
quh4gko8 Oct 10, 2023
6ce7930
exempt telephony service from the new package visibility restrictions
muhomorr Oct 13, 2023
7af8fbc
don't skip AOT compilation of apps that weren't recently used
muhomorr Nov 14, 2022
e68859f
do not delete compiled code (OAT files) of hibernated apps
muhomorr Oct 11, 2023
210f480
disable OtaDexoptService
muhomorr Oct 23, 2023
1be246a
add notification-based UI for the background dexopt job
muhomorr Oct 23, 2023
44b44f7
infrastructure for per-package dex2oat compiler filter overrides
muhomorr Oct 31, 2023
89b97f4
always use speed dex2oat compiler filter for VPN service packages
muhomorr Nov 1, 2023
eb85230
add per-app setting for hardened_malloc and extended VA space
muhomorr Sep 26, 2023
b114461
always stop app zygotes when app is being force-stopped
muhomorr Nov 8, 2023
9b97026
add per-app native debugging setting
muhomorr Sep 26, 2023
aea658e
add per-app dynamic code execution settings
muhomorr Sep 26, 2023
27a10e7
add a test for the new per-app hardening features
muhomorr Sep 20, 2023
71db0a9
add per-app memory tagging setting
muhomorr Nov 5, 2023
cdff51d
add helper class for launching non-standard Settings intents
muhomorr Nov 15, 2023
cf20f58
add system API for getting app info by PID
muhomorr Nov 8, 2023
2b8ac4c
infrastructure for handling callbacks from logd to system_server
muhomorr Nov 8, 2023
2988c50
infrastructure for showing notifications about app exploit protection
muhomorr Nov 8, 2023
7488ebb
infrastructure for showing notifications about SELinux TSEC_FLAG denials
muhomorr Nov 15, 2023
e2609d5
show notification after app is blocked from accessing ptrace
muhomorr Nov 19, 2023
7df1aa0
fix rate limiting for non-app tombstones
muhomorr Nov 8, 2023
78a05e5
notify the user about notable system journal entries
muhomorr Nov 8, 2023
92fddd8
add setting for skipping system process crash notifications
muhomorr Nov 27, 2023
ad82801
show notification after memory tag check failure crashes an app
muhomorr Nov 19, 2023
becb1cf
never skip crash notification for MTE crashes of system processes
muhomorr Nov 29, 2023
886d6d9
SystemUI: under-display fingerprint scanner support
muhomorr Dec 6, 2022
8ec418d
Revert "SystemUI: under-display fingerprint scanner support"
muhomorr Dec 6, 2023
b5c61d1
Revert "Convert BubbleDataRepositoryTest to use mockito-kotlin"
muhomorr Dec 6, 2023
5490c59
fixup! pass through runtime flags for exec spawning and implement the…
muhomorr Dec 6, 2023
cba05be
fixup! Support forwarding notifications from other users
muhomorr Dec 6, 2023
f7f0431
fixup! automatically reboot device after timeout if set
muhomorr Dec 6, 2023
738087b
fixup! Support forwarding notifications from other users
muhomorr Dec 6, 2023
eb7c251
fixup! SystemUI: add Battery share & Battery share quick tiles
muhomorr Dec 6, 2023
7525d9a
fixup! gosps: support for per-app GrapheneOS-specific persistent state
muhomorr Dec 6, 2023
847e99a
fixup! Support forwarding notifications from other users
muhomorr Dec 6, 2023
9c41bc6
gmscompat: handle privileged AlarmManager.FLAG_PRIORITIZE
muhomorr Dec 7, 2023
9f1f373
DropBoxMonitor: ignore last_kmsg with "reboot,shell" boot reason
muhomorr Dec 8, 2023
5a4b66b
PackageInstaller: limit max AppSnippet icon size
muhomorr Dec 8, 2023
a6c9abe
PackageInstaller: fix crash when handling STATUS_PENDING_USER_ACTION
muhomorr Dec 8, 2023
6c87e22
raise system_server RLIMIT_NOFILE from 32K to 256K
muhomorr Dec 12, 2023
cf9cbab
DropBoxMonitor: filter out SoC ID from kernel crash logs
muhomorr Dec 12, 2023
5f0ba16
DropBoxMonitor: don't report forced reboot as a kernel crash
muhomorr Dec 12, 2023
e97cc55
Reapply "Convert BubbleDataRepositoryTest to use mockito-kotlin"
thestinger Dec 16, 2023
ce1dd79
Widevine provisioning setting
maade93791 Sep 29, 2023
4bcf215
impl boolsetting to disable screencapture detection
nycex Dec 16, 2023
0c77c2d
Revert "impl boolsetting to disable screencapture detection"
nycex Dec 27, 2023
0962aa5
stub (un)registerScreenCaptureCallback
nycex Dec 27, 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
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
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 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,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