Temporary hack to keep file:// Uris working.

Bug: 26860922
Change-Id: I29cc4f4328b829e75a4523bd4d710da3e872f59c
This commit is contained in:
Jeff Sharkey
2016-01-28 19:03:18 -07:00
parent 2020e056e1
commit a806f2bff4

View File

@@ -21,6 +21,7 @@ import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.StrictMode;
import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
@@ -65,11 +66,14 @@ public class SettingsLicenseActivity extends Activity {
intent.setPackage("com.android.htmlviewer");
try {
StrictMode.disableDeathOnFileUriExposure();
startActivity(intent);
finish();
} catch (ActivityNotFoundException e) {
Log.e(TAG, "Failed to find viewer", e);
showErrorAndFinish();
} finally {
StrictMode.enableDeathOnFileUriExposure();
}
}