File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
androidTest/java/com/qiniu/android
main/java/com/qiniu/android/http/dns Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public void run() {
7070 @ Override
7171 public void run () {
7272
73- if (Thread .currentThread (). getName ().equals ( "main" )){
73+ if (Thread .currentThread () == Looper . getMainLooper ().getThread ( )){
7474 testParam .successCount += 1 ;
7575 }
7676
@@ -112,7 +112,7 @@ public void testAsyncBg(){
112112 @ Override
113113 public void run () {
114114 String threadName = Thread .currentThread ().getName ();
115- if (! threadName . equals ( "main" )){
115+ if (Thread . currentThread () != Looper . getMainLooper (). getThread ( )){
116116 synchronized (this ){
117117 testParam .successCount += 1 ;
118118 }
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ public DnsCacheFile(String directory) throws IOException {
2929 throw new IOException ("mkdir failed" );
3030 }
3131 }
32+
33+ if (!f .isDirectory ()) {
34+ throw new IOException ("does not mkdir" );
35+ }
3236 }
3337
3438 /**
You can’t perform that action at this time.
0 commit comments