aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2011-10-14 23:52:56 -0500
committerAndy Doan <doanac@gmail.com>2011-10-14 23:52:56 -0500
commit64ec8fe4adcd1887582d6f1afdf6faf492f3b272 (patch)
treeba957ee05381b8d8ebfe3174ef5209b4112c1996
parented8857a682d8be12b9e076c6b5355f72561c77d2 (diff)
downloadLinaroConnect-64ec8fe4adcd1887582d6f1afdf6faf492f3b272.tar.gz
allow label to be passed to intent
some intents might want the label from the given item
-rw-r--r--src/org/linaro/connect/JSONLayoutItem.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/linaro/connect/JSONLayoutItem.java b/src/org/linaro/connect/JSONLayoutItem.java
index 2a71914..8561eb5 100644
--- a/src/org/linaro/connect/JSONLayoutItem.java
+++ b/src/org/linaro/connect/JSONLayoutItem.java
@@ -8,6 +8,8 @@ import android.net.Uri;
class JSONLayoutItem extends JSONItem {
+ public final static String INTENT_LABEL = "org.linaro.connect.label";
+
public JSONLayoutItem(JSONObject jso) {
super(jso, "label");
}
@@ -23,6 +25,8 @@ class JSONLayoutItem extends JSONItem {
public Intent getIntent(Context ctx) {
String i = getIntentString();
Uri data = getData();
- return new Intent(i, data);
+ Intent intent = new Intent(i, data);
+ intent.putExtra(INTENT_LABEL, getLabel());
+ return intent;
}
}