Fixes the opacity value for the insertion handle to range {0..255}.

Bug: 149523168
Test: locally verified.
Change-Id: I53c4be59e128a6451a9d8c847ee9d5fd295659ab
This commit is contained in:
Shu Chen
2020-02-13 10:18:29 +08:00
parent 6afde9247b
commit 523d33f1e1

View File

@@ -5271,6 +5271,8 @@ public class Editor {
if (opacity < 10 || opacity > 100) {
opacity = 50;
}
// Converts the opacity value from range {0..100} to {0..255}.
opacity = opacity * 255 / 100;
}
mDeltaHeight = deltaHeight;
mDrawableOpacity = opacity;