Loading core/java/android/app/Application.java +14 −12 Original line number Diff line number Diff line Loading @@ -28,19 +28,21 @@ import android.content.res.Configuration; import android.os.Bundle; /** * Base class for those who need to maintain global application state. You can * provide your own implementation by specifying its name in your * AndroidManifest.xml's <application> tag, which will cause that class * to be instantiated for you when the process for your application/package is * created. * Base class for maintaining global application state. You can provide your own * implementation by creating a subclass and specifying the fully-qualified name * of this subclass as the <code>"android:name"</code> attribute in your * AndroidManifest.xml's <code><application></code> tag. The Application * class, or your subclass of the Application class, is instantiated before any * other class when the process for your application/package is created. * * <p class="note">There is normally no need to subclass Application. In * most situation, static singletons can provide the same functionality in a * more modular way. If your singleton needs a global context (for example * to register broadcast receivers), the function to retrieve it can be * given a {@link android.content.Context} which internally uses * <p class="note"><strong>Note: </strong>There is normally no need to subclass * Application. In most situations, static singletons can provide the same * functionality in a more modular way. If your singleton needs a global * context (for example to register broadcast receivers), include * {@link android.content.Context#getApplicationContext() Context.getApplicationContext()} * when first constructing the singleton.</p> * as a {@link android.content.Context} argument when invoking your singleton's * <code>getInstance()</code> method. * </p> */ public class Application extends ContextWrapper implements ComponentCallbacks2 { private ArrayList<ComponentCallbacks> mComponentCallbacks = Loading core/res/res/values/attrs_manifest.xml +7 −7 Original line number Diff line number Diff line Loading @@ -1176,14 +1176,14 @@ {@link #AndroidManifestActivity activity}, {@link #AndroidManifestActivityAlias activity-alias}, and {@link #AndroidManifestUsesLibrary uses-library}. The application tag appears as a child of the root {@link #AndroidManifest manifest} tag. --> appears as a child of the root {@link #AndroidManifest manifest} tag in an application's manifest file. --> <declare-styleable name="AndroidManifestApplication" parent="AndroidManifest"> <!-- An optional name of a class implementing the overall {@link android.app.Application} for this package. When the process for your package is started, this class is instantiated before any of the other application components. Note that this is not required, and in fact most applications will probably not need it. --> <!-- The (optional) fully-qualified name for a subclass of {@link android.app.Application} that the system instantiates before any other class when an app's process starts. Most applications don't need this attribute. If it's not specified, the system instantiates the base Application class instead.--> <attr name="name" /> <attr name="theme" /> <attr name="label" /> Loading Loading
core/java/android/app/Application.java +14 −12 Original line number Diff line number Diff line Loading @@ -28,19 +28,21 @@ import android.content.res.Configuration; import android.os.Bundle; /** * Base class for those who need to maintain global application state. You can * provide your own implementation by specifying its name in your * AndroidManifest.xml's <application> tag, which will cause that class * to be instantiated for you when the process for your application/package is * created. * Base class for maintaining global application state. You can provide your own * implementation by creating a subclass and specifying the fully-qualified name * of this subclass as the <code>"android:name"</code> attribute in your * AndroidManifest.xml's <code><application></code> tag. The Application * class, or your subclass of the Application class, is instantiated before any * other class when the process for your application/package is created. * * <p class="note">There is normally no need to subclass Application. In * most situation, static singletons can provide the same functionality in a * more modular way. If your singleton needs a global context (for example * to register broadcast receivers), the function to retrieve it can be * given a {@link android.content.Context} which internally uses * <p class="note"><strong>Note: </strong>There is normally no need to subclass * Application. In most situations, static singletons can provide the same * functionality in a more modular way. If your singleton needs a global * context (for example to register broadcast receivers), include * {@link android.content.Context#getApplicationContext() Context.getApplicationContext()} * when first constructing the singleton.</p> * as a {@link android.content.Context} argument when invoking your singleton's * <code>getInstance()</code> method. * </p> */ public class Application extends ContextWrapper implements ComponentCallbacks2 { private ArrayList<ComponentCallbacks> mComponentCallbacks = Loading
core/res/res/values/attrs_manifest.xml +7 −7 Original line number Diff line number Diff line Loading @@ -1176,14 +1176,14 @@ {@link #AndroidManifestActivity activity}, {@link #AndroidManifestActivityAlias activity-alias}, and {@link #AndroidManifestUsesLibrary uses-library}. The application tag appears as a child of the root {@link #AndroidManifest manifest} tag. --> appears as a child of the root {@link #AndroidManifest manifest} tag in an application's manifest file. --> <declare-styleable name="AndroidManifestApplication" parent="AndroidManifest"> <!-- An optional name of a class implementing the overall {@link android.app.Application} for this package. When the process for your package is started, this class is instantiated before any of the other application components. Note that this is not required, and in fact most applications will probably not need it. --> <!-- The (optional) fully-qualified name for a subclass of {@link android.app.Application} that the system instantiates before any other class when an app's process starts. Most applications don't need this attribute. If it's not specified, the system instantiates the base Application class instead.--> <attr name="name" /> <attr name="theme" /> <attr name="label" /> Loading