OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.base; | 5 package org.chromium.base; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.app.Application; | 8 import android.app.Application; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.os.Bundle; | 10 import android.os.Bundle; |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 protected BaseChromiumApplication(boolean shouldInitializeApplicationStatusT
racking) { | 38 protected BaseChromiumApplication(boolean shouldInitializeApplicationStatusT
racking) { |
39 mShouldInitializeApplicationStatusTracking = shouldInitializeApplication
StatusTracking; | 39 mShouldInitializeApplicationStatusTracking = shouldInitializeApplication
StatusTracking; |
40 } | 40 } |
41 | 41 |
42 @Override | 42 @Override |
43 protected void attachBaseContext(Context base) { | 43 protected void attachBaseContext(Context base) { |
44 super.attachBaseContext(base); | 44 super.attachBaseContext(base); |
45 assert getBaseContext() != null; | 45 assert getBaseContext() != null; |
46 checkAppBeingReplaced(); | 46 checkAppBeingReplaced(); |
47 ChromiumMultiDexInstaller.install(this); | 47 if (BuildConfig.isMultidexEnabled()) { |
| 48 ChromiumMultiDexInstaller.install(this); |
| 49 } |
48 } | 50 } |
49 | 51 |
50 /** | 52 /** |
51 * Interface to be implemented by listeners for window focus events. | 53 * Interface to be implemented by listeners for window focus events. |
52 */ | 54 */ |
53 public interface WindowFocusChangedListener { | 55 public interface WindowFocusChangedListener { |
54 /** | 56 /** |
55 * Called when the window focus changes for {@code activity}. | 57 * Called when the window focus changes for {@code activity}. |
56 * @param activity The {@link Activity} that has a window focus changed
event. | 58 * @param activity The {@link Activity} that has a window focus changed
event. |
57 * @param hasFocus Whether or not {@code activity} gained or lost focus. | 59 * @param hasFocus Whether or not {@code activity} gained or lost focus. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 assert (Proxy.isProxyClass(activity.getWindow().getCallback(
).getClass()) | 233 assert (Proxy.isProxyClass(activity.getWindow().getCallback(
).getClass()) |
232 || activity.getWindow().getCallback().getClass().get
Name().equals( | 234 || activity.getWindow().getCallback().getClass().get
Name().equals( |
233 TOOLBAR_CALLBACK_WRAPPER_CLASS) | 235 TOOLBAR_CALLBACK_WRAPPER_CLASS) |
234 || activity.getWindow().getCallback().getClass().get
Name().equals( | 236 || activity.getWindow().getCallback().getClass().get
Name().equals( |
235 TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS)); | 237 TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS)); |
236 } | 238 } |
237 } | 239 } |
238 }); | 240 }); |
239 } | 241 } |
240 } | 242 } |
OLD | NEW |