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
57f25a88
Commit
57f25a88
authored
10 months ago
by
SongFerng Wang
Committed by
Android (Google) Code Review
10 months ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix crash java.lang.IllegalArgumentException" into main
parents
3ab283cb
025e56e5
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
packages/SettingsLib/src/com/android/settingslib/qrcode/QrDecorateView.java
+6
-0
6 additions, 0 deletions
...ib/src/com/android/settingslib/qrcode/QrDecorateView.java
with
6 additions
and
0 deletions
packages/SettingsLib/src/com/android/settingslib/qrcode/QrDecorateView.java
+
6
−
0
View file @
57f25a88
...
...
@@ -24,6 +24,7 @@ import android.graphics.PorterDuff;
import
android.graphics.PorterDuffXfermode
;
import
android.graphics.RectF
;
import
android.util.AttributeSet
;
import
android.util.Log
;
import
android.util.TypedValue
;
import
android.view.View
;
...
...
@@ -33,6 +34,7 @@ public class QrDecorateView extends View {
private
static
final
float
CORNER_STROKE_WIDTH
=
4
f
;
// 4dp
private
static
final
float
CORNER_LINE_LENGTH
=
264
f
;
// 264dp
private
static
final
float
CORNER_RADIUS
=
16
f
;
// 16dp
private
static
final
String
TAG
=
"QrDecorateView"
;
private
final
int
mCornerColor
;
private
final
int
mFocusedCornerColor
;
...
...
@@ -94,6 +96,10 @@ public class QrDecorateView extends View {
@Override
protected
void
onLayout
(
boolean
changed
,
int
left
,
int
top
,
int
right
,
int
bottom
)
{
super
.
onLayout
(
changed
,
left
,
top
,
right
,
bottom
);
if
(
getWidth
()
<=
0
||
getHeight
()
<=
0
)
{
Log
.
e
(
TAG
,
"width and height must be > 0"
);
return
;
}
if
(
mMaskBitmap
==
null
)
{
mMaskBitmap
=
Bitmap
.
createBitmap
(
getWidth
(),
getHeight
(),
Bitmap
.
Config
.
ARGB_8888
);
...
...
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