mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Fix NPE in InAppBrowser.
When cordova.getActivity().getIntent().getExtras() == null.
This commit is contained in:
parent
0c74090953
commit
73c7994cd1
@ -460,7 +460,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
|
||||
//Toggle whether this is enabled or not!
|
||||
Bundle appSettings = cordova.getActivity().getIntent().getExtras();
|
||||
boolean enableDatabase = appSettings.getBoolean("InAppBrowserStorageEnabled", true);
|
||||
boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true);
|
||||
if(enableDatabase)
|
||||
{
|
||||
String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath();
|
||||
|
Loading…
Reference in New Issue
Block a user