@@ -68,7 +68,6 @@ public abstract class CobaltActivity extends Activity {
68
68
private static final String URL_ARG = "--url=" ;
69
69
private static final java .lang .String META_DATA_APP_URL = "cobalt.APP_URL" ;
70
70
71
- private static final String ACTIVE_SHELL_URL_KEY = "activeUrl" ;
72
71
public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs" ;
73
72
74
73
private static final Pattern URL_PARAM_PATTERN = Pattern .compile ("^[a-zA-Z0-9_=]*$" );
@@ -186,9 +185,6 @@ protected void createContent(final Bundle savedInstanceState) {
186
185
mWindowAndroid .setAnimationPlaceholderView (
187
186
mShellManager .getContentViewRenderView ().getSurfaceView ());
188
187
189
- if (mStartupUrl == null || mStartupUrl .isEmpty ()) {
190
- mStartupUrl = getUrlFromIntent (getIntent ());
191
- }
192
188
if (mStartupUrl == null || mStartupUrl .isEmpty ()) {
193
189
String [] args = getStarboardBridge ().getArgs ();
194
190
mStartupUrl =
@@ -226,16 +222,6 @@ public void onFailure() {
226
222
227
223
// Initially copied from ContentShellActiviy.java
228
224
private void finishInitialization (Bundle savedInstanceState ) {
229
- String shellUrl ;
230
- if (!TextUtils .isEmpty (mStartupUrl )) {
231
- shellUrl = mStartupUrl ;
232
- } else {
233
- shellUrl = ShellManager .DEFAULT_SHELL_URL ;
234
- }
235
-
236
- if (savedInstanceState != null && savedInstanceState .containsKey (ACTIVE_SHELL_URL_KEY )) {
237
- shellUrl = savedInstanceState .getString (ACTIVE_SHELL_URL_KEY );
238
- }
239
225
// Set to overlay video mode.
240
226
mShellManager .getContentViewRenderView ().setOverlayVideoMode (true );
241
227
@@ -246,8 +232,8 @@ private void finishInitialization(Bundle savedInstanceState) {
246
232
getStarboardBridge ().setWebContents (getActiveWebContents ());
247
233
248
234
// Load the `url` with the same shell we created above.
249
- Log .i (TAG , "shellManager load url:" + shellUrl );
250
- mShellManager .getActiveShell ().loadUrl (shellUrl );
235
+ Log .i (TAG , "shellManager load url:" + mStartupUrl );
236
+ mShellManager .getActiveShell ().loadUrl (mStartupUrl );
251
237
}
252
238
253
239
// Initially copied from ContentShellActiviy.java
@@ -259,19 +245,6 @@ private void initializationFailed() {
259
245
finish ();
260
246
}
261
247
262
- // Initially copied from ContentShellActiviy.java
263
- @ Override
264
- protected void onSaveInstanceState (Bundle outState ) {
265
- super .onSaveInstanceState (outState );
266
- WebContents webContents = getActiveWebContents ();
267
- if (webContents != null ) {
268
- // TODO(yfriedman): crbug/783819 - This should use GURL serialize/deserialize.
269
- outState .putString (ACTIVE_SHELL_URL_KEY , webContents .getLastCommittedUrl ().getSpec ());
270
- }
271
-
272
- mIntentRequestTracker .saveInstanceState (outState );
273
- }
274
-
275
248
protected static Optional <KeyEvent > getRemappedKeyEvent (int keyCode , int action ) {
276
249
int mappedKeyCode ;
277
250
if (keyCode == KeyEvent .KEYCODE_BACK ) {
0 commit comments