Merge "Use Uri.toSafeString() in MediaPlayer[2].java."

This commit is contained in:
Dongwon Kang
2019-03-01 17:10:08 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -962,7 +962,7 @@ public class MediaPlayer2 implements AutoCloseable
return;
}
} catch (NullPointerException | SecurityException | IOException ex) {
Log.w(TAG, "Couldn't open " + uri + ": " + ex);
Log.w(TAG, "Couldn't open " + uri == null ? "null uri" : uri.toSafeString(), ex);
// Fallback to media server
}
handleDataSource(isCurrent, srcId, uri.toString(), headers, cookies, startPos, endPos);

View File

@@ -1103,7 +1103,7 @@ public class MediaPlayer extends PlayerBase
setDataSource(afd);
return true;
} catch (NullPointerException | SecurityException | IOException ex) {
Log.w(TAG, "Couldn't open " + uri + ": " + ex);
Log.w(TAG, "Couldn't open " + uri == null ? "null uri" : uri.toSafeString(), ex);
return false;
}
}