|
82 | 82 | import java.util.Locale;
|
83 | 83 |
|
84 | 84 | import de.baumann.browser.databases.Database_ReadLater;
|
| 85 | +import de.baumann.browser.helper.Activity_password; |
85 | 86 | import de.baumann.browser.helper.Activity_settings;
|
| 87 | +import de.baumann.browser.helper.class_SecurePreferences; |
86 | 88 | import de.baumann.browser.helper.helper_editText;
|
87 | 89 | import de.baumann.browser.helper.helper_webView;
|
88 | 90 | import de.baumann.browser.helper.helper_main;
|
@@ -140,6 +142,15 @@ protected void onCreate(Bundle savedInstanceState) {
|
140 | 142 | PreferenceManager.setDefaultValues(this, R.xml.user_settings_search, false);
|
141 | 143 | sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
142 | 144 |
|
| 145 | + class_SecurePreferences sharedPrefSec = new class_SecurePreferences(Browser.this, "sharedPrefSec", "Ywn-YM.XK$b:/:&CsL8;=L,y4", true); |
| 146 | + String pw = sharedPrefSec.getString("protect_PW"); |
| 147 | + |
| 148 | + if (pw != null && pw.length() > 0) { |
| 149 | + if (sharedPref.getBoolean("isOpened", true)) { |
| 150 | + helper_main.switchToActivity(Browser.this, Activity_password.class, "", false); |
| 151 | + } |
| 152 | + } |
| 153 | + |
143 | 154 | if (sharedPref.getBoolean ("hideStatus", false)){
|
144 | 155 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
145 | 156 | }
|
@@ -253,7 +264,7 @@ public void onClick(View view) {
|
253 | 264 | }
|
254 | 265 | });
|
255 | 266 |
|
256 |
| - helper_editText.editText_Touch(editText, Browser.this); |
| 267 | + helper_editText.editText_Touch(editText, Browser.this, mWebView); |
257 | 268 | helper_editText.editText_EditorAction(editText, Browser.this, mWebView);
|
258 | 269 | helper_editText.editText_FocusChange(editText, Browser.this);
|
259 | 270 |
|
@@ -646,7 +657,7 @@ public void run() {
|
646 | 657 | .apply();
|
647 | 658 | invalidateOptionsMenu();
|
648 | 659 | editText.setHint(R.string.app_search_hint);
|
649 |
| - helper_editText.editText_Touch(editText, Browser.this); |
| 660 | + helper_editText.editText_Touch(editText, Browser.this, mWebView); |
650 | 661 | helper_editText.editText_EditorAction(editText, Browser.this, mWebView);
|
651 | 662 | helper_editText.editText_FocusChange(editText, Browser.this);
|
652 | 663 | helper_main.hideKeyboard(Browser.this, editText);
|
@@ -914,7 +925,7 @@ public void onClick(DialogInterface dialog, int item) {
|
914 | 925 | invalidateOptionsMenu();
|
915 | 926 | editText.setText(mWebView.getTitle());
|
916 | 927 | editText.setHint(R.string.app_search_hint);
|
917 |
| - helper_editText.editText_Touch(editText, Browser.this); |
| 928 | + helper_editText.editText_Touch(editText, Browser.this, mWebView); |
918 | 929 | helper_editText.editText_EditorAction(editText, Browser.this, mWebView);
|
919 | 930 | helper_editText.editText_FocusChange(editText, Browser.this);
|
920 | 931 | helper_main.hideKeyboard(Browser.this, editText);
|
@@ -1186,6 +1197,26 @@ public void onHideCustomView() {
|
1186 | 1197 | }
|
1187 | 1198 | }
|
1188 | 1199 |
|
| 1200 | + @Override |
| 1201 | + protected void onPause() { |
| 1202 | + super.onPause(); //To change body of overridden methods use File | Settings | File Templates. |
| 1203 | + mWebView.onPause(); |
| 1204 | + } |
| 1205 | + |
| 1206 | + @Override |
| 1207 | + protected void onResume() { |
| 1208 | + super.onResume(); //To change body of overridden methods use File | Settings | File Templates. |
| 1209 | + mWebView.onResume(); |
| 1210 | + } |
| 1211 | + |
| 1212 | + @Override |
| 1213 | + protected void onStop() { |
| 1214 | + super.onStop(); //To change body of overridden methods use File | Settings | File Templates. |
| 1215 | + if (inCustomView()) { |
| 1216 | + hideCustomView(); |
| 1217 | + } |
| 1218 | + } |
| 1219 | + |
1189 | 1220 | private boolean inCustomView() {
|
1190 | 1221 | return (mCustomView != null);
|
1191 | 1222 | }
|
|
0 commit comments