mirror of
				https://gitlab.com/xynngh/YetAnotherCallBlocker.git
				synced 2025-06-05 22:19:12 +02:00 
			
		
		
		
	Close ParcelFileDescriptor after improting blacklist
This commit is contained in:
		| @@ -248,6 +248,7 @@ public class BlacklistActivity extends AppCompatActivity { | |||||||
|             boolean error = false; |             boolean error = false; | ||||||
|  |  | ||||||
|             ParcelFileDescriptor pfd = null; |             ParcelFileDescriptor pfd = null; | ||||||
|  |             try { | ||||||
|                 try { |                 try { | ||||||
|                     pfd = getContentResolver().openFileDescriptor(data.getData(), "r"); |                     pfd = getContentResolver().openFileDescriptor(data.getData(), "r"); | ||||||
|                 } catch (FileNotFoundException e) { |                 } catch (FileNotFoundException e) { | ||||||
| @@ -264,6 +265,13 @@ public class BlacklistActivity extends AppCompatActivity { | |||||||
|                         error = true; |                         error = true; | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  |             } finally { | ||||||
|  |                 if (pfd != null) { | ||||||
|  |                     try { | ||||||
|  |                         pfd.close(); | ||||||
|  |                     } catch (IOException ignored) {} | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |  | ||||||
|             if (error) { |             if (error) { | ||||||
|                 Toast.makeText(this, R.string.error, Toast.LENGTH_SHORT).show(); |                 Toast.makeText(this, R.string.error, Toast.LENGTH_SHORT).show(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user