11bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel/*
21bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * Copyright (C) 2014 The Android Open Source Project
31bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel *
41bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * Licensed under the Apache License, Version 2.0 (the "License");
51bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * you may not use this file except in compliance with the License.
61bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * You may obtain a copy of the License at
71bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel *
81bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel *      http://www.apache.org/licenses/LICENSE-2.0
91bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel *
101bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * Unless required by applicable law or agreed to in writing, software
111bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * distributed under the License is distributed on an "AS IS" BASIS,
121bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * See the License for the specific language governing permissions and
141bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * limitations under the License.
151bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel */
161bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel
171bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Rousselpackage android.support.multidex;
181bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel
191bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Rousselimport android.app.Application;
201bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Rousselimport android.content.Context;
211bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel
221bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel/**
231bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * Minimal MultiDex capable application. To use the legacy multidex library there is 3 possibility:
241bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * <ul>
251bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * <li>Declare this class as the application in your AndroidManifest.xml.</li>
261bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * <li>Have your {@link Application} extends this class.</li>
271bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * <li>Have your {@link Application} override attachBaseContext starting with<br>
281bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel * <code>
291bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel  protected void attachBaseContext(Context base) {<br>
301bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel    super.attachBaseContext(base);<br>
311bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel    MultiDex.install(this);
321bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel    </code></li>
331bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel *   <ul>
341bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel */
351bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Rousselpublic class MultiDexApplication extends Application {
361bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel  @Override
371bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel  protected void attachBaseContext(Context base) {
381bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel    super.attachBaseContext(base);
391bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel    MultiDex.install(this);
401bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel  }
411bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0Yohann Roussel}
42