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
halo
packages_apps_Launcher2
Commits
6da2eb9c
Commit
6da2eb9c
authored
10 years ago
by
Daniel Sandler
Committed by
Android (Google) Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Fail more gracefully when wallpaper thumbs are missing."
parents
2a5b0808
83682f1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/com/android/launcher2/WallpaperChooserDialogFragment.java
...com/android/launcher2/WallpaperChooserDialogFragment.java
+8
-5
No files found.
src/com/android/launcher2/WallpaperChooserDialogFragment.java
View file @
6da2eb9c
...
...
@@ -209,14 +209,17 @@ public class WallpaperChooserDialogFragment extends DialogFragment implements
for
(
String
extra
:
extras
)
{
int
res
=
resources
.
getIdentifier
(
extra
,
"drawable"
,
packageName
);
if
(
res
!=
0
)
{
final
int
thumbRes
=
resources
.
getIdentifier
(
extra
+
"_small"
,
int
thumbRes
=
resources
.
getIdentifier
(
extra
+
"_small"
,
"drawable"
,
packageName
);
if
(
thumbRes
!=
0
)
{
mThumbs
.
add
(
thumbRes
);
mImages
.
add
(
res
);
// Log.d(TAG, "add: [" + packageName + "]: " + extra + " (" + res + ")");
//Log.d(TAG, "add: [" + packageName + "]: " + extra + " (res=" + res + " thumb=" + thumbRes + ")");
if
(
thumbRes
==
0
)
{
Log
.
w
(
TAG
,
"warning: built-in wallpaper "
+
extra
+
" without "
+
extra
+
"_thumb"
);
thumbRes
=
R
.
mipmap
.
ic_launcher_wallpaper
;
}
mThumbs
.
add
(
thumbRes
);
mImages
.
add
(
res
);
}
}
}
...
...
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