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) { |
204 if (DocumentModeAssassin.getInstance().isMigrationNecessary()) { | 210 if (DocumentModeAssassin.getInstance().isMigrationNecessary()) { |
205 super.onCreate(null); | 211 super.onCreate(null); |
206 | 212 |
207 // Kick the user to the MigrationActivity. | 213 // Kick the user to the MigrationActivity. |
208 UpgradeActivity.launchInstance(this, getIntent()); | 214 UpgradeActivity.launchInstance(this, getIntent()); |
209 | 215 |
210 // Don't remove this task -- it may be a DocumentActivity that exist
s only in Recents. | 216 // Don't remove this task -- it may be a DocumentActivity that exist
s only in Recents. |
211 finish(); | 217 finish(); |
212 return; | 218 return; |
213 } | 219 } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 getDecorView().setVisibility(View.GONE); | 503 getDecorView().setVisibility(View.GONE); |
498 } | 504 } |
499 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi
stener); | 505 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi
stener); |
500 } | 506 } |
501 }); | 507 }); |
502 return true; | 508 return true; |
503 } | 509 } |
504 }; | 510 }; |
505 } | 511 } |
506 } | 512 } |
OLD | NEW |