Merge "Merge "Defer deleting a http cache" am: c294af5f94 am: 1aeed34905" into pi-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
2d8fa3336f
@@ -155,17 +155,20 @@ public final class DirectStatementService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if (mThread != null) {
|
final HttpResponseCache responseCache = mHttpResponseCache;
|
||||||
mThread.quit();
|
mHandler.post(new Runnable() {
|
||||||
}
|
public void run() {
|
||||||
|
try {
|
||||||
try {
|
if (responseCache != null) {
|
||||||
if (mHttpResponseCache != null) {
|
responseCache.delete();
|
||||||
mHttpResponseCache.delete();
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.i(TAG, "HTTP(S) response cache deletion failed:" + e);
|
||||||
|
}
|
||||||
|
Looper.myLooper().quit();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
});
|
||||||
Log.i(TAG, "HTTP(S) response cache deletion failed:" + e);
|
mHttpResponseCache = null;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user