Merge "Temporary hack to keep file:// Uris working."

This commit is contained in:
Jeff Sharkey
2016-01-29 02:43:31 +00:00
committed by Android (Google) Code Review

View File

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