File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -2338,13 +2338,19 @@ public File makeSharedFile(String url, String filename){
2338
2338
file = new File (temp , filename );
2339
2339
file .createNewFile ();
2340
2340
2341
- FileChannel ic = new FileInputStream (cached ).getChannel ();
2342
- FileChannel oc = new FileOutputStream (file ).getChannel ();
2341
+ FileInputStream fis = new FileInputStream (cached );
2342
+ FileOutputStream fos = new FileOutputStream (file );
2343
+
2344
+ FileChannel ic = fis .getChannel ();
2345
+ FileChannel oc = fos .getChannel ();
2346
+
2343
2347
try {
2344
2348
ic .transferTo (0 , ic .size (), oc );
2345
2349
}finally {
2346
- if (ic != null ) ic .close ();
2347
- if (oc != null ) oc .close ();
2350
+ AQUtility .close (fis );
2351
+ AQUtility .close (fos );
2352
+ AQUtility .close (ic );
2353
+ AQUtility .close (oc );
2348
2354
}
2349
2355
2350
2356
}
@@ -2445,6 +2451,12 @@ public T longClick(){
2445
2451
//weak hash map that holds the dialogs so they will never memory leaked
2446
2452
private static WeakHashMap <Dialog , Void > dialogs = new WeakHashMap <Dialog , Void >();
2447
2453
2454
+ /**
2455
+ * Show a dialog. Method dismiss() or dismissAll() should be called later.
2456
+ *
2457
+ * @return self
2458
+ *
2459
+ */
2448
2460
public T show (Dialog dialog ){
2449
2461
2450
2462
try {
@@ -2458,6 +2470,12 @@ public T show(Dialog dialog){
2458
2470
return self ();
2459
2471
}
2460
2472
2473
+ /**
2474
+ * Dismiss a dialog previously shown with show().
2475
+ *
2476
+ * @return self
2477
+ *
2478
+ */
2461
2479
public T dismiss (Dialog dialog ){
2462
2480
2463
2481
try {
You can’t perform that action at this time.
0 commit comments