OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.init; | 5 package org.chromium.chrome.browser.init; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.content.res.Configuration; | 10 import android.content.res.Configuration; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 /** | 196 /** |
197 * Extending classes should override {@link AsyncInitializationActivity#preI
nflationStartup()}, | 197 * Extending classes should override {@link AsyncInitializationActivity#preI
nflationStartup()}, |
198 * {@link AsyncInitializationActivity#setContentView()} and | 198 * {@link AsyncInitializationActivity#setContentView()} and |
199 * {@link AsyncInitializationActivity#postInflationStartup()} instead of thi
s call which will | 199 * {@link AsyncInitializationActivity#postInflationStartup()} instead of thi
s call which will |
200 * be called on that order. | 200 * be called on that order. |
201 */ | 201 */ |
202 @Override | 202 @Override |
203 protected final void onCreate(Bundle savedInstanceState) { | 203 protected final void onCreate(Bundle savedInstanceState) { |
204 TraceEvent.begin("AsyncInitializationActivity.onCreate()"); | |
205 onCreateInternal(savedInstanceState); | |
206 TraceEvent.end("AsyncInitializationActivity.onCreate()"); | |
207 } | |
208 | |
209 private final void onCreateInternal(Bundle savedInstanceState) { | |
210 if (DocumentModeAssassin.getInstance().isMigrationNecessary()) { | 204 if (DocumentModeAssassin.getInstance().isMigrationNecessary()) { |
211 super.onCreate(null); | 205 super.onCreate(null); |
212 | 206 |
213 // Kick the user to the MigrationActivity. | 207 // Kick the user to the MigrationActivity. |
214 UpgradeActivity.launchInstance(this, getIntent()); | 208 UpgradeActivity.launchInstance(this, getIntent()); |
215 | 209 |
216 // Don't remove this task -- it may be a DocumentActivity that exist
s only in Recents. | 210 // Don't remove this task -- it may be a DocumentActivity that exist
s only in Recents. |
217 finish(); | 211 finish(); |
218 return; | 212 return; |
219 } | 213 } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 getDecorView().setVisibility(View.GONE); | 497 getDecorView().setVisibility(View.GONE); |
504 } | 498 } |
505 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi
stener); | 499 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi
stener); |
506 } | 500 } |
507 }); | 501 }); |
508 return true; | 502 return true; |
509 } | 503 } |
510 }; | 504 }; |
511 } | 505 } |
512 } | 506 } |
OLD | NEW |