Merge "Merge "Add additional logging for EMBMS edge cases" am: de57d0d024 am: 8b8591ce46" into pi-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
5d6febdc58
@@ -920,11 +920,11 @@ public class MbmsDownloadSession implements AutoCloseable {
|
|||||||
try {
|
try {
|
||||||
if (!token.createNewFile()) {
|
if (!token.createNewFile()) {
|
||||||
throw new RuntimeException("Failed to create download token for request "
|
throw new RuntimeException("Failed to create download token for request "
|
||||||
+ request);
|
+ request + ". Token location is " + token.getPath());
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException("Failed to create download token for request " + request
|
throw new RuntimeException("Failed to create download token for request " + request
|
||||||
+ " due to IOException " + e);
|
+ " due to IOException " + e + ". Attempted to write to " + token.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,9 @@ public class MbmsDownloadReceiver extends BroadcastReceiver {
|
|||||||
for (Uri tempFileUri : tempFiles) {
|
for (Uri tempFileUri : tempFiles) {
|
||||||
if (verifyTempFilePath(context, request.getFileServiceId(), tempFileUri)) {
|
if (verifyTempFilePath(context, request.getFileServiceId(), tempFileUri)) {
|
||||||
File tempFile = new File(tempFileUri.getSchemeSpecificPart());
|
File tempFile = new File(tempFileUri.getSchemeSpecificPart());
|
||||||
tempFile.delete();
|
if (!tempFile.delete()) {
|
||||||
|
Log.w(LOG_TAG, "Failed to delete temp file at " + tempFile.getPath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -474,6 +476,8 @@ public class MbmsDownloadReceiver extends BroadcastReceiver {
|
|||||||
|
|
||||||
if (!MbmsUtils.isContainedIn(
|
if (!MbmsUtils.isContainedIn(
|
||||||
MbmsUtils.getEmbmsTempFileDirForService(context, serviceId), tempFile)) {
|
MbmsUtils.getEmbmsTempFileDirForService(context, serviceId), tempFile)) {
|
||||||
|
Log.w(LOG_TAG, "File at " + path + " is not contained in the temp file root," +
|
||||||
|
" which is " + MbmsUtils.getEmbmsTempFileDirForService(context, serviceId));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user