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

Commit dcf19a8d authored by Leon Scroggins's avatar Leon Scroggins
Browse files

String extras to be used with share page.

Provides Strings to be used as hash keys for accessing the data in
the Intent created for sharing a link.

Part of http://b/issue?id=2243246
parent fc35343c
Loading
Loading
Loading
Loading
+25 −2
Original line number Diff line number Diff line
@@ -173,9 +173,32 @@ public class Browser {
        c.startActivity(i);
    }

    /**
     * Stores a String extra in an {@link Intent} representing the title of a
     * page to share.  When receiving an {@link Intent#ACTION_SEND} from the
     * Browser, use this to access the title.
     * @hide
     */
    public final static String EXTRA_SHARE_TITLE = "share_title";

    /**
     * Stores a Bitmap extra in an {@link Intent} representing the screenshot of
     * a page to share.  When receiving an {@link Intent#ACTION_SEND} from the
     * Browser, use this to access the screenshot.
     * @hide
     */
    public final static String EXTRA_SHARE_SCREENSHOT = "share_screenshot";

    /**
     * Stores a Bitmap extra in an {@link Intent} representing the favicon of a
     * page to share.  When receiving an {@link Intent#ACTION_SEND} from the
     * Browser, use this to access the favicon.
     * @hide
     */
    public final static String EXTRA_SHARE_FAVICON = "share_favicon";

    public static final void sendString(Context c, String s) {
        sendString(c, s,
                c.getText(com.android.internal.R.string.sendText).toString());
        sendString(c, s, c.getString(com.android.internal.R.string.sendText));
    }

    /**