Methods Summary |
---|
final void | attach(android.content.Context context)
attachBaseContext(context);
mLoadedApk = ContextImpl.getImpl(context).mPackageInfo;
|
private java.lang.Object[] | collectActivityLifecycleCallbacks()
Object[] callbacks = null;
synchronized (mActivityLifecycleCallbacks) {
if (mActivityLifecycleCallbacks.size() > 0) {
callbacks = mActivityLifecycleCallbacks.toArray();
}
}
return callbacks;
|
private java.lang.Object[] | collectComponentCallbacks()
Object[] callbacks = null;
synchronized (mComponentCallbacks) {
if (mComponentCallbacks.size() > 0) {
callbacks = mComponentCallbacks.toArray();
}
}
return callbacks;
|
void | dispatchActivityCreated(Activity activity, android.os.Bundle savedInstanceState)
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ActivityLifecycleCallbacks)callbacks[i]).onActivityCreated(activity,
savedInstanceState);
}
}
|
void | dispatchActivityDestroyed(Activity activity)
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ActivityLifecycleCallbacks)callbacks[i]).onActivityDestroyed(activity);
}
}
|
void | dispatchActivityPaused(Activity activity)
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ActivityLifecycleCallbacks)callbacks[i]).onActivityPaused(activity);
}
}
|
void | dispatchActivityResumed(Activity activity)
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ActivityLifecycleCallbacks)callbacks[i]).onActivityResumed(activity);
}
}
|
void | dispatchActivitySaveInstanceState(Activity activity, android.os.Bundle outState)
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ActivityLifecycleCallbacks)callbacks[i]).onActivitySaveInstanceState(activity,
outState);
}
}
|
void | dispatchActivityStarted(Activity activity)
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ActivityLifecycleCallbacks)callbacks[i]).onActivityStarted(activity);
}
}
|
void | dispatchActivityStopped(Activity activity)
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ActivityLifecycleCallbacks)callbacks[i]).onActivityStopped(activity);
}
}
|
void | dispatchOnProvideAssistData(Activity activity, android.os.Bundle data)
Object[] callbacks;
synchronized (this) {
if (mAssistCallbacks == null) {
return;
}
callbacks = mAssistCallbacks.toArray();
}
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((OnProvideAssistDataListener)callbacks[i]).onProvideAssistData(activity, data);
}
}
|
public void | onConfigurationChanged(android.content.res.Configuration newConfig)
Object[] callbacks = collectComponentCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ComponentCallbacks)callbacks[i]).onConfigurationChanged(newConfig);
}
}
|
public void | onCreate()Called when the application is starting, before any activity, service,
or receiver objects (excluding content providers) have been created.
Implementations should be as quick as possible (for example using
lazy initialization of state) since the time spent in this function
directly impacts the performance of starting the first activity,
service, or receiver in a process.
If you override this method, be sure to call super.onCreate().
|
public void | onLowMemory()
Object[] callbacks = collectComponentCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
((ComponentCallbacks)callbacks[i]).onLowMemory();
}
}
|
public void | onTerminate()This method is for use in emulated process environments. It will
never be called on a production Android device, where processes are
removed by simply killing them; no user code (including this callback)
is executed when doing so.
|
public void | onTrimMemory(int level)
Object[] callbacks = collectComponentCallbacks();
if (callbacks != null) {
for (int i=0; i<callbacks.length; i++) {
Object c = callbacks[i];
if (c instanceof ComponentCallbacks2) {
((ComponentCallbacks2)c).onTrimMemory(level);
}
}
}
|
public void | registerActivityLifecycleCallbacks(android.app.Application$ActivityLifecycleCallbacks callback)
synchronized (mActivityLifecycleCallbacks) {
mActivityLifecycleCallbacks.add(callback);
}
|
public void | registerComponentCallbacks(android.content.ComponentCallbacks callback)
synchronized (mComponentCallbacks) {
mComponentCallbacks.add(callback);
}
|
public void | registerOnProvideAssistDataListener(android.app.Application$OnProvideAssistDataListener callback)
synchronized (this) {
if (mAssistCallbacks == null) {
mAssistCallbacks = new ArrayList<OnProvideAssistDataListener>();
}
mAssistCallbacks.add(callback);
}
|
public void | unregisterActivityLifecycleCallbacks(android.app.Application$ActivityLifecycleCallbacks callback)
synchronized (mActivityLifecycleCallbacks) {
mActivityLifecycleCallbacks.remove(callback);
}
|
public void | unregisterComponentCallbacks(android.content.ComponentCallbacks callback)
synchronized (mComponentCallbacks) {
mComponentCallbacks.remove(callback);
}
|
public void | unregisterOnProvideAssistDataListener(android.app.Application$OnProvideAssistDataListener callback)
synchronized (this) {
if (mAssistCallbacks != null) {
mAssistCallbacks.remove(callback);
}
}
|