print stack trace with the log entries

This commit is contained in:
Domingos Lopes 2016-06-03 17:07:17 -04:00
parent b46b2247b4
commit 6036f2d960
2 changed files with 3 additions and 2 deletions

View File

@ -69,7 +69,7 @@ public abstract class CastEnabledActivity extends AppCompatActivity
super.onPrepareOptionsMenu(menu);
MenuItem mediaRouteButton = menu.findItem(R.id.media_route_menu_item);
if (mediaRouteButton == null) {
Log.wtf(TAG, "MediaRoute item could not be found on the menu!");
Log.wtf(TAG, "MediaRoute item could not be found on the menu!", new Exception());
mediaRouteActionProvider = null;
return true;
}

View File

@ -1746,7 +1746,8 @@ public class CastManager extends BaseCastManager implements OnFailedListener {
if (!(actionProvider instanceof SwitchableMediaRouteActionProvider)) {
Log.wtf(TAG, "MenuItem provided to addMediaRouterButton() is not compatible with " +
"SwitchableMediaRouteActionProvider." +
((actionProvider == null) ? " Its action provider is null!" : ""));
((actionProvider == null) ? " Its action provider is null!" : ""),
new ClassCastException());
return null;
}
SwitchableMediaRouteActionProvider mediaRouteActionProvider =