Merge "Catch error when we fail to get slice icon."
This commit is contained in:
committed by
Android (Google) Code Review
commit
a5cafaad3a
@@ -449,6 +449,12 @@ public class SliceBuilderUtils {
|
||||
if (iconResource == 0) {
|
||||
iconResource = R.drawable.ic_settings;
|
||||
}
|
||||
return IconCompat.createWithResource(context, iconResource);
|
||||
try {
|
||||
return IconCompat.createWithResource(context, iconResource);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Falling back to settings icon because there is an error getting slice icon "
|
||||
+ data.getUri(), e);
|
||||
return IconCompat.createWithResource(context, R.drawable.ic_settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user