Temporary hack to keep file:// Uris working.
Bug: 26860922 Change-Id: I29cc4f4328b829e75a4523bd4d710da3e872f59c
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user