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
80e557d6
Commit
80e557d6
authored
4 years ago
by
TreeHugger Robot
Committed by
Android (Google) Code Review
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Create VibrationThread only after binder calling ID cleared" into sc-dev
parents
594fc49d
995bd864
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/vibrator/VibratorManagerService.java
+8
-11
8 additions, 11 deletions
...a/com/android/server/vibrator/VibratorManagerService.java
with
8 additions
and
11 deletions
services/core/java/com/android/server/vibrator/VibratorManagerService.java
+
8
−
11
View file @
80e557d6
...
...
@@ -352,10 +352,7 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
return
;
}
VibrationThread
vibThread
=
new
VibrationThread
(
vib
,
mVibrators
,
mWakeLock
,
mBatteryStatsService
,
mVibrationCallbacks
);
ignoreStatus
=
shouldIgnoreVibrationForCurrentLocked
(
vibThread
);
ignoreStatus
=
shouldIgnoreVibrationForCurrentLocked
(
vib
);
if
(
ignoreStatus
!=
null
)
{
endVibrationLocked
(
vib
,
ignoreStatus
);
return
;
...
...
@@ -366,7 +363,7 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
if
(
mCurrentVibration
!=
null
)
{
mCurrentVibration
.
cancel
();
}
Vibration
.
Status
status
=
startVibrationLocked
(
vib
Thread
);
Vibration
.
Status
status
=
startVibrationLocked
(
vib
);
if
(
status
!=
Vibration
.
Status
.
RUNNING
)
{
endVibrationLocked
(
vib
,
status
);
}
...
...
@@ -491,19 +488,19 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
}
@GuardedBy
(
"mLock"
)
private
Vibration
.
Status
startVibrationLocked
(
Vibration
Thread
vibThread
)
{
private
Vibration
.
Status
startVibrationLocked
(
Vibration
vib
)
{
Trace
.
traceBegin
(
Trace
.
TRACE_TAG_VIBRATOR
,
"startVibrationLocked"
);
try
{
Vibration
vib
=
vibThread
.
getVibration
();
vib
.
updateEffect
(
mVibrationScaler
.
scale
(
vib
.
getEffect
(),
vib
.
attrs
.
getUsage
()));
boolean
inputDevicesAvailable
=
mInputDeviceDelegate
.
vibrateIfAvailable
(
vib
.
uid
,
vib
.
opPkg
,
vib
.
getEffect
(),
vib
.
reason
,
vib
.
attrs
);
if
(
inputDevicesAvailable
)
{
return
Vibration
.
Status
.
FORWARDED_TO_INPUT_DEVICES
;
}
VibrationThread
vibThread
=
new
VibrationThread
(
vib
,
mVibrators
,
mWakeLock
,
mBatteryStatsService
,
mVibrationCallbacks
);
if
(
mCurrentVibration
==
null
)
{
return
startVibrationThreadLocked
(
vibThread
);
}
...
...
@@ -595,8 +592,8 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
*/
@GuardedBy
(
"mLock"
)
@Nullable
private
Vibration
.
Status
shouldIgnoreVibrationForCurrentLocked
(
Vibration
Thread
vibThread
)
{
if
(
vib
Thread
.
getVib
ration
()
.
isRepeating
())
{
private
Vibration
.
Status
shouldIgnoreVibrationForCurrentLocked
(
Vibration
vibration
)
{
if
(
vibration
.
isRepeating
())
{
// Repeating vibrations always take precedence.
return
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