fix strict mode exemption to allow disk write as well
Summary: Filpper is doing disk IO on UI thread which actually produce `DiskWriteViolation` (presumably when the directory is not there, it will write to create) Differential Revision: D39196484 fbshipit-source-id: f6b15785ea6ecf3ea5b41211908c14eac3d1309e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
95af1428ce
commit
09e81b19ad
@@ -41,8 +41,8 @@ public final class AndroidFlipperClient {
|
|||||||
final Context app =
|
final Context app =
|
||||||
context.getApplicationContext() == null ? context : context.getApplicationContext();
|
context.getApplicationContext() == null ? context : context.getApplicationContext();
|
||||||
|
|
||||||
// exempt this disk read as this is a debug tool
|
// exempt this disk read/write as this is a debug tool
|
||||||
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
|
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites();
|
||||||
String privateAppDirectory;
|
String privateAppDirectory;
|
||||||
try {
|
try {
|
||||||
privateAppDirectory = context.getFilesDir().getAbsolutePath();
|
privateAppDirectory = context.getFilesDir().getAbsolutePath();
|
||||||
|
|||||||
Reference in New Issue
Block a user