Fields Summary |
---|
public ApplicationInfo | applicationInfoGlobal information about the application/package this component is a
part of. |
public String | processNameThe name of the process this component should run in.
From the "android:process" attribute or, if not set, the same
as applicationInfo.processName. |
public int | descriptionResA string resource identifier (in the package's resources) containing
a user-readable description of the component. From the "description"
attribute or, if not set, 0. |
public boolean | enabledIndicates whether or not this component may be instantiated. Note that this value can be
overriden by the one in its parent {@link ApplicationInfo}. |
public boolean | exportedSet to true if this component is available for use by other applications.
Comes from {@link android.R.attr#exported android:exported} of the
<activity>, <receiver>, <service>, or
<provider> tag. |
Methods Summary |
---|
protected void | dumpBack(android.util.Printer pw, java.lang.String prefix)
if (applicationInfo != null) {
pw.println(prefix + "ApplicationInfo:");
applicationInfo.dump(pw, prefix + " ");
} else {
pw.println(prefix + "ApplicationInfo: null");
}
super.dumpBack(pw, prefix);
|
protected void | dumpFront(android.util.Printer pw, java.lang.String prefix)
super.dumpFront(pw, prefix);
pw.println(prefix + "enabled=" + enabled + " exported=" + exported
+ " processName=" + processName);
if (descriptionRes != 0) {
pw.println(prefix + "description=" + descriptionRes);
}
|
protected ApplicationInfo | getApplicationInfo()
return applicationInfo;
|
public final int | getBannerResource()Return the banner resource identifier to use for this component. If the
component defines a banner, that is used; else, the application banner is
used.
return banner != 0 ? banner : applicationInfo.banner;
|
public final int | getIconResource()Return the icon resource identifier to use for this component. If
the component defines an icon, that is used; else, the application
icon is used.
return icon != 0 ? icon : applicationInfo.icon;
|
public final int | getLogoResource()Return the logo resource identifier to use for this component. If
the component defines a logo, that is used; else, the application
logo is used.
return logo != 0 ? logo : applicationInfo.logo;
|
public boolean | isEnabled()Return whether this component and its enclosing application are enabled.
return enabled && applicationInfo.enabled;
|
protected android.graphics.drawable.Drawable | loadDefaultBanner(PackageManager pm)
return applicationInfo.loadBanner(pm);
|
public android.graphics.drawable.Drawable | loadDefaultIcon(PackageManager pm)
return applicationInfo.loadIcon(pm);
|
protected android.graphics.drawable.Drawable | loadDefaultLogo(PackageManager pm)
return applicationInfo.loadLogo(pm);
|
public java.lang.CharSequence | loadLabel(PackageManager pm)
if (nonLocalizedLabel != null) {
return nonLocalizedLabel;
}
ApplicationInfo ai = applicationInfo;
CharSequence label;
if (labelRes != 0) {
label = pm.getText(packageName, labelRes, ai);
if (label != null) {
return label;
}
}
if (ai.nonLocalizedLabel != null) {
return ai.nonLocalizedLabel;
}
if (ai.labelRes != 0) {
label = pm.getText(packageName, ai.labelRes, ai);
if (label != null) {
return label;
}
}
return name;
|
public void | writeToParcel(android.os.Parcel dest, int parcelableFlags)
super.writeToParcel(dest, parcelableFlags);
applicationInfo.writeToParcel(dest, parcelableFlags);
dest.writeString(processName);
dest.writeInt(descriptionRes);
dest.writeInt(enabled ? 1 : 0);
dest.writeInt(exported ? 1 : 0);
|