Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
scorpio
frameworks_base
Commits
d303dd3d
Commit
d303dd3d
authored
13 years ago
by
Romain Guy
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Download
Plain Diff
Merge "Prevent NPE in TextureView.getBitmap()" into jb-dev
parents
9ac32040
78245f77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
core/java/android/view/TextureView.java
core/java/android/view/TextureView.java
+11
-1
No files found.
core/java/android/view/TextureView.java
View file @
d303dd3d
...
...
@@ -561,7 +561,17 @@ public class TextureView extends View {
applyUpdate
();
applyTransformMatrix
();
mLayer
.
copyInto
(
bitmap
);
// This case can happen if the app invokes setSurfaceTexture() before
// we are able to create the hardware layer. We can safely initialize
// the layer here thanks to the validate() call at the beginning of
// this method
if
(
mLayer
==
null
&&
mUpdateSurface
)
{
getHardwareLayer
();
}
if
(
mLayer
!=
null
)
{
mLayer
.
copyInto
(
bitmap
);
}
}
return
bitmap
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment