зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401354 - [4.0] Always load settings from intent extra in geckoview_example. r=snorp
This commit is contained in:
Родитель
703a6f1baa
Коммит
4be4dd80e3
|
@ -71,6 +71,7 @@ public class GeckoViewActivity extends Activity {
|
|||
permission.androidPermissionRequestCode = REQUEST_PERMISSIONS;
|
||||
mGeckoView.setPermissionDelegate(permission);
|
||||
|
||||
loadSettings(getIntent());
|
||||
loadFromIntent(getIntent());
|
||||
}
|
||||
|
||||
|
@ -79,18 +80,21 @@ public class GeckoViewActivity extends Activity {
|
|||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
|
||||
loadSettings(intent);
|
||||
if (intent.getData() != null) {
|
||||
loadFromIntent(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadFromIntent(final Intent intent) {
|
||||
final Uri uri = intent.getData();
|
||||
mGeckoView.loadUri(uri != null ? uri.toString() : DEFAULT_URL);
|
||||
}
|
||||
|
||||
private void loadSettings(final Intent intent) {
|
||||
mGeckoView.getSettings().setBoolean(
|
||||
GeckoViewSettings.USE_MULTIPROCESS,
|
||||
intent.getBooleanExtra(USE_MULTIPROCESS_EXTRA, true));
|
||||
|
||||
final Uri uri = intent.getData();
|
||||
mGeckoView.loadUri(uri != null ? uri.toString() : DEFAULT_URL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Загрузка…
Ссылка в новой задаче