Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ae13354 authored by Andrew Solovay's avatar Andrew Solovay
Browse files

cherrypick from klp-docs docs: Corrected doc for getLaunchIntentForPackage()....

cherrypick from klp-docs docs: Corrected doc for getLaunchIntentForPackage(). Change-Id: I2eab0956eaedac71289e19a3618a3553908f8c38

Doc had inaccurately said that getLaunchIntentForPackage() throws an
exception if the package name is not recognized; in fact, it returns
null. Also cleaned up some style issues for that Javadoc item.

Doc is staged to:

http://asolovay.mtv:9655/reference/android/content/pm/PackageManager.html#getLaunchIntentForPackage(java.lang.String)

Bug: 15022655
Original SHA1: I2eab0956eaedac71289e19a3618a3553908f8c38

Change-Id: Ief8dfaac248ba03779c6f13237aff9b26d362fd9
parent 7f6af88e
Loading
Loading
Loading
Loading
+10 −12
Original line number Original line Diff line number Diff line
@@ -1460,21 +1460,19 @@ public abstract class PackageManager {
    public abstract String[] canonicalToCurrentPackageNames(String[] names);
    public abstract String[] canonicalToCurrentPackageNames(String[] names);


    /**
    /**
     * Return a "good" intent to launch a front-door activity in a package,
     * Returns a "good" intent to launch a front-door activity in a package.
     * for use for example to implement an "open" button when browsing through
     * This is used, for example, to implement an "open" button when browsing
     * packages.  The current implementation will look first for a main
     * through packages.  The current implementation looks first for a main
     * activity in the category {@link Intent#CATEGORY_INFO}, next for a
     * activity in the category {@link Intent#CATEGORY_INFO}, and next for a
     * main activity in the category {@link Intent#CATEGORY_LAUNCHER}, or return
     * main activity in the category {@link Intent#CATEGORY_LAUNCHER}. Returns
     * null if neither are found.
     * <code>null</code> if neither are found.
     *
     * <p>Throws {@link NameNotFoundException} if a package with the given
     * name cannot be found on the system.
     *
     *
     * @param packageName The name of the package to inspect.
     * @param packageName The name of the package to inspect.
     *
     *
     * @return Returns either a fully-qualified Intent that can be used to
     * @return A fully-qualified {@link Intent} that can be used to launch the
     * launch the main activity in the package, or null if the package does
     * main activity in the package. Returns <code>null</code> if the package
     * not contain such an activity.
     * does not contain such an activity, or if <em>packageName</em> is not
     * recognized. 
     */
     */
    public abstract Intent getLaunchIntentForPackage(String packageName);
    public abstract Intent getLaunchIntentForPackage(String packageName);