Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_inputmethods_LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
LMODroid
platform_packages_inputmethods_LatinIME
Commits
1b3568f9
Commit
1b3568f9
authored
8 months ago
by
Treehugger Robot
Committed by
Gerrit Code Review
8 months ago
Browse files
Options
Downloads
Plain Diff
Merge "LatinIME: Fix Implicit PendingIntent Vulnerability" into main
parents
e85c57fb
8064a47f
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
java/src/com/android/inputmethod/dictionarypack/DictionaryService.java
+7
-1
7 additions, 1 deletion
...android/inputmethod/dictionarypack/DictionaryService.java
with
7 additions
and
1 deletion
java/src/com/android/inputmethod/dictionarypack/DictionaryService.java
+
7
−
1
View file @
1b3568f9
...
...
@@ -229,8 +229,14 @@ public final class DictionaryService extends Service {
final
long
now
=
System
.
currentTimeMillis
();
final
long
alarmTime
=
now
+
new
Random
().
nextInt
(
MAX_ALARM_DELAY_MILLIS
);
final
Intent
updateIntent
=
new
Intent
(
DictionaryPackConstants
.
UPDATE_NOW_INTENT_ACTION
);
// Set the package name to ensure the PendingIntent is only delivered to trusted components
updateIntent
.
setPackage
(
context
.
getPackageName
());
int
pendingIntentFlags
=
PendingIntent
.
FLAG_CANCEL_CURRENT
;
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
23
)
{
pendingIntentFlags
|=
PendingIntent
.
FLAG_IMMUTABLE
;
}
final
PendingIntent
pendingIntent
=
PendingIntent
.
getBroadcast
(
context
,
0
,
updateIntent
,
P
endingIntent
.
FLAG_CANCEL_CURRENT
);
updateIntent
,
p
endingIntent
Flags
);
// We set the alarm in the type that doesn't forcefully wake the device
// from sleep, but fires the next time the device actually wakes for any
...
...
This diff is collapsed.
Click to expand it.
LMO GerritBot
@lmo-gerritbot
mentioned in commit
fee42b3a
·
3 months ago
mentioned in commit
fee42b3a
mentioned in commit fee42b3a1a1f36866b80ffa883f0535a6987fd3f
Toggle commit list
LMO GerritBot
@lmo-gerritbot
mentioned in commit
5be036d5
·
3 months ago
mentioned in commit
5be036d5
mentioned in commit 5be036d5e33e174286f0f545ee4c4cd30d09c8d2
Toggle commit list
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