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
372cd201
Commit
372cd201
authored
11 months ago
by
Sudheer Shanka
Committed by
Android (Google) Code Review
11 months ago
Browse files
Options
Downloads
Plain Diff
Merge "Check for the package stoppped state first before checking the flag." into main
parents
75ee1ea7
5d678dd9
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/am/ActivityManagerService.java
+11
-2
11 additions, 2 deletions
...re/java/com/android/server/am/ActivityManagerService.java
with
11 additions
and
2 deletions
services/core/java/com/android/server/am/ActivityManagerService.java
+
11
−
2
View file @
372cd201
...
...
@@ -4436,8 +4436,17 @@ public class ActivityManagerService extends IActivityManager.Stub
packageName, null, userId);
}
final boolean clearPendingIntentsForStoppedApp = (android.content.pm.Flags.stayStopped()
&& packageStateStopped);
boolean clearPendingIntentsForStoppedApp = false;
try {
clearPendingIntentsForStoppedApp = (packageStateStopped
&& android.content.pm.Flags.stayStopped());
} catch (IllegalStateException e) {
// It's unlikely for a package to be force-stopped early in the boot cycle. So, if we
// check for 'packageStateStopped' which should evaluate to 'false', then this should
// ensure we are not accessing the flag early in the boot cycle. As an additional
// safety measure, catch the exception and ignore to avoid causing a device restart.
clearPendingIntentsForStoppedApp = false;
}
if (packageName == null || uninstalling || clearPendingIntentsForStoppedApp) {
final int cancelReason;
if (packageName == null) {
...
...
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