Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
1c0ddc8e
Commit
1c0ddc8e
authored
10 months ago
by
Achim Thesmann
Committed by
Android (Google) Code Review
10 months ago
Browse files
Options
Downloads
Plain Diff
Merge "Revert^2 "Always require opt-in for root/system"" into main
parents
0fe5d8c8
7d8dc15d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/core/java/com/android/server/wm/BackgroundActivityStartController.java
+5
-0
5 additions, 0 deletions
.../android/server/wm/BackgroundActivityStartController.java
with
5 additions
and
0 deletions
services/core/java/com/android/server/wm/BackgroundActivityStartController.java
+
5
−
0
View file @
1c0ddc8e
...
...
@@ -28,6 +28,7 @@ import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import
static
android
.
os
.
Build
.
VERSION_CODES
.
UPSIDE_DOWN_CAKE
;
import
static
android
.
os
.
Process
.
INVALID_PID
;
import
static
android
.
os
.
Process
.
INVALID_UID
;
import
static
android
.
os
.
Process
.
ROOT_UID
;
import
static
android
.
os
.
Process
.
SYSTEM_UID
;
import
static
android
.
provider
.
DeviceConfig
.
NAMESPACE_WINDOW_MANAGER
;
...
...
@@ -385,6 +386,10 @@ public class BackgroundActivityStartController {
return
BackgroundStartPrivileges
.
NONE
;
case
MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED:
// no explicit choice by the app - let us decide what to do
if
(
callingUid
==
ROOT_UID
||
callingUid
==
SYSTEM_UID
)
{
// root and system must always opt in explicitly
return
BackgroundStartPrivileges
.
NONE
;
}
if
(
callingPackage
!=
null
)
{
// determine based on the calling/creating package
boolean
changeEnabled
=
CompatChanges
.
isChangeEnabled
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment