am 760cfb02: Merge "Check for null drawable in theme-less getDrawable()" into lmp-mr1-dev
* commit '760cfb02de1e547b2823bf2b9621ef5b953cc5bd': Check for null drawable in theme-less getDrawable()
This commit is contained in:
@@ -747,7 +747,7 @@ public class Resources {
|
||||
*/
|
||||
public Drawable getDrawable(int id) throws NotFoundException {
|
||||
final Drawable d = getDrawable(id, null);
|
||||
if (d.canApplyTheme()) {
|
||||
if (d != null && d.canApplyTheme()) {
|
||||
Log.w(TAG, "Drawable " + getResourceName(id) + " has unresolved theme "
|
||||
+ "attributes! Consider using Resources.getDrawable(int, Theme) or "
|
||||
+ "Context.getDrawable(int).", new RuntimeException());
|
||||
|
||||
Reference in New Issue
Block a user