リビジョン | 7e1c94641d80172a607f016ae490389e5fa2cabd (tree) |
---|---|
日時 | 2012-10-22 00:53:25 |
作者 | Masahiko, SAWAI <say@user...> |
コミッター | Masahiko, SAWAI |
IntentDetailActivity2 を ListView としてテスト実装
@@ -0,0 +1 @@ | ||
1 | +/intent-lab/target/ | |
\ No newline at end of file |
@@ -29,8 +29,8 @@ | ||
29 | 29 | </intent-filter> |
30 | 30 | </activity> |
31 | 31 | |
32 | - <!-- Intent Detail Viewer --> | |
33 | - <activity android:name=".intent.IntentDetailViewerActivity" > | |
32 | + <!-- Intent Detail --> | |
33 | + <activity android:name=".intent.IntentDetailActivity" > | |
34 | 34 | <intent-filter> |
35 | 35 | <action android:name="android.intent.action.VIEW" /> |
36 | 36 | <category android:name="android.intent.category.DEFAULT" /> |
@@ -38,10 +38,10 @@ | ||
38 | 38 | </intent-filter> |
39 | 39 | </activity> |
40 | 40 | |
41 | - <!-- Intent Editor --> | |
42 | - <activity android:name=".intent.IntentDetailEditorActivity" > | |
41 | + <!-- Intent Detail --> | |
42 | + <activity android:name=".intent.IntentDetailActivity2" > | |
43 | 43 | <intent-filter> |
44 | - <action android:name="android.intent.action.EDIT" /> | |
44 | + <action android:name="android.intent.action.VIEW" /> | |
45 | 45 | <category android:name="android.intent.category.DEFAULT" /> |
46 | 46 | <data android:mimeType="vnd.android.cursor.item/vnd.routine_work.intent" /> |
47 | 47 | </intent-filter> |
@@ -0,0 +1,30 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + android:layout_width="fill_parent" | |
4 | + android:layout_height="fill_parent" | |
5 | + android:orientation="vertical" | |
6 | +> | |
7 | + <!-- action bar --> | |
8 | + <LinearLayout | |
9 | + style="@style/actionbar" | |
10 | + > | |
11 | + <ImageButton | |
12 | + style="@style/actionbar_left_button" | |
13 | + android:id="@+id/home_button" | |
14 | + android:src="?attr/ic_home" | |
15 | + /> | |
16 | + <TextView | |
17 | + style="@style/actionbar_title" | |
18 | + android:text="@string/edit_intent" | |
19 | + /> | |
20 | + <ImageButton | |
21 | + style="@style/actionbar_right_button" | |
22 | + android:id="@+id/ok_button" | |
23 | + android:src="?attr/ic_ok" | |
24 | + /> | |
25 | + </LinearLayout> | |
26 | + | |
27 | + <!-- list --> | |
28 | + <include layout="@layout/simple_list" /> | |
29 | + | |
30 | +</LinearLayout> | |
\ No newline at end of file |
@@ -0,0 +1,119 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<FrameLayout | |
3 | + xmlns:android="http://schemas.android.com/apk/res/android" | |
4 | + android:layout_width="fill_parent" | |
5 | + android:layout_height="wrap_content" | |
6 | +> | |
7 | + <!-- Title --> | |
8 | + <LinearLayout | |
9 | + android:id="@+id/intent_detail_item_name" | |
10 | + android:layout_width="fill_parent" | |
11 | + android:layout_height="wrap_content" | |
12 | + android:orientation="vertical" | |
13 | + > | |
14 | + <TextView | |
15 | + style="@style/header" | |
16 | + android:text="@string/title" | |
17 | + /> | |
18 | + <TextView | |
19 | + android:id="@+id/name_textview" | |
20 | + android:layout_width="fill_parent" | |
21 | + android:layout_height="wrap_content" | |
22 | + android:layout_margin="6dip" | |
23 | + android:textSize="20sp" | |
24 | + android:textColor="?android:textColorPrimary" | |
25 | + /> | |
26 | + </LinearLayout> | |
27 | + | |
28 | + <!-- Action --> | |
29 | + <LinearLayout | |
30 | + android:id="@+id/intent_detail_item_action" | |
31 | + android:layout_width="fill_parent" | |
32 | + android:layout_height="wrap_content" | |
33 | + android:orientation="vertical" | |
34 | + > | |
35 | + <TextView | |
36 | + style="@style/header" | |
37 | + android:text="@string/action" | |
38 | + /> | |
39 | + | |
40 | + <TextView | |
41 | + style="@style/key" | |
42 | + android:text="@string/action_name" | |
43 | + /> | |
44 | + <TextView | |
45 | + style="@style/value" | |
46 | + android:id="@+id/action_textview" | |
47 | + /> | |
48 | + </LinearLayout> | |
49 | + | |
50 | + <!-- Component --> | |
51 | + <LinearLayout | |
52 | + android:id="@+id/intent_detail_item_component" | |
53 | + android:layout_width="fill_parent" | |
54 | + android:layout_height="wrap_content" | |
55 | + android:orientation="vertical" | |
56 | + > | |
57 | + <TextView | |
58 | + style="@style/header" | |
59 | + android:text="@string/component" | |
60 | + /> | |
61 | + <TextView | |
62 | + style="@style/key" | |
63 | + android:text="@string/component_package" | |
64 | + /> | |
65 | + <TextView | |
66 | + style="@style/value" | |
67 | + android:id="@+id/component_package_textview" | |
68 | + /> | |
69 | + <TextView | |
70 | + style="@style/key" | |
71 | + android:text="@string/component_class" | |
72 | + /> | |
73 | + <TextView | |
74 | + style="@style/value" | |
75 | + android:id="@+id/component_class_textview" | |
76 | + /> | |
77 | + </LinearLayout> | |
78 | + | |
79 | + <!-- Data URI--> | |
80 | + <LinearLayout | |
81 | + android:id="@+id/intent_detail_item_data_uri" | |
82 | + android:layout_width="fill_parent" | |
83 | + android:layout_height="wrap_content" | |
84 | + android:orientation="vertical" | |
85 | + > | |
86 | + <TextView | |
87 | + style="@style/header" | |
88 | + android:text="@string/data" | |
89 | + /> | |
90 | + | |
91 | + <TextView | |
92 | + style="@style/key" | |
93 | + android:text="@string/data_uri" | |
94 | + /> | |
95 | + <TextView | |
96 | + style="@style/value" | |
97 | + android:id="@+id/data_uri_textview" | |
98 | + /> | |
99 | + | |
100 | + </LinearLayout> | |
101 | + | |
102 | + <!-- Data Type--> | |
103 | + <LinearLayout | |
104 | + android:id="@+id/intent_detail_item_data_type" | |
105 | + android:layout_width="fill_parent" | |
106 | + android:layout_height="wrap_content" | |
107 | + android:orientation="vertical" | |
108 | + > | |
109 | + <TextView | |
110 | + style="@style/key" | |
111 | + android:text="@string/data_type" | |
112 | + /> | |
113 | + <TextView | |
114 | + style="@style/value" | |
115 | + android:id="@+id/data_type_textview" | |
116 | + /> | |
117 | + </LinearLayout> | |
118 | + | |
119 | +</FrameLayout> | |
\ No newline at end of file |
@@ -229,7 +229,7 @@ public class IntentDetailActivity extends Activity | ||
229 | 229 | { |
230 | 230 | if (cursor.moveToFirst()) |
231 | 231 | { |
232 | - int titleColumnIndex = cursor.getColumnIndex(IntentStore.Intents.Columns.TITLE); | |
232 | + int titleColumnIndex = cursor.getColumnIndex(IntentStore.Intents.Columns.NAME); | |
233 | 233 | title = cursor.getString(titleColumnIndex); |
234 | 234 | } |
235 | 235 | } |
@@ -0,0 +1,332 @@ | ||
1 | +package org.routine_work.intent_lab.intent; | |
2 | + | |
3 | +import android.app.Activity; | |
4 | +import android.app.ListActivity; | |
5 | +import android.content.ComponentName; | |
6 | +import android.content.ContentResolver; | |
7 | +import android.content.Intent; | |
8 | +import android.database.Cursor; | |
9 | +import android.net.Uri; | |
10 | +import android.os.Bundle; | |
11 | +import android.view.LayoutInflater; | |
12 | +import android.view.View; | |
13 | +import android.view.ViewGroup; | |
14 | +import android.widget.BaseAdapter; | |
15 | +import android.widget.ImageButton; | |
16 | +import android.widget.TextView; | |
17 | +import android.widget.Toast; | |
18 | +import org.routine_work.intent_lab.R; | |
19 | +import org.routine_work.intent_lab.intent.provider.IntentStore; | |
20 | +import org.routine_work.utils.Log; | |
21 | + | |
22 | +public class IntentDetailActivity2 extends ListActivity | |
23 | + implements View.OnClickListener | |
24 | +{ | |
25 | + | |
26 | + private static final String LOG_TAG = "intent-lab"; | |
27 | + private static final int POSITION_NAME = 0; | |
28 | + private static final int POSITION_ACTION = 1; | |
29 | + private static final int POSITION_COMPONENT = 2; | |
30 | + private static final int POSITION_DATA_URI = 3; | |
31 | + private static final int POSITION_DATA_TYPE = 4; | |
32 | + // data | |
33 | + private Uri targetUri; | |
34 | + private String targetName; | |
35 | + private Intent targetIntent; | |
36 | + private IntentDetailListAdapter intentDetailListAdapter; | |
37 | + | |
38 | + public void onClick(View view) | |
39 | + { | |
40 | + int id = view.getId(); | |
41 | + switch (id) | |
42 | + { | |
43 | + case R.id.home_button: | |
44 | + finish(); | |
45 | + break; | |
46 | + } | |
47 | + } | |
48 | + | |
49 | + @Override | |
50 | + protected void onCreate(Bundle savedInstanceState) | |
51 | + { | |
52 | + Log.v(LOG_TAG, "Hello"); | |
53 | + | |
54 | + super.onCreate(savedInstanceState); | |
55 | + setContentView(R.layout.intent_detail_activity2); | |
56 | + | |
57 | + ImageButton homeButton = (ImageButton) findViewById(R.id.home_button); | |
58 | + homeButton.setOnClickListener(this); | |
59 | + | |
60 | + // init | |
61 | + targetUri = getIntent().getData(); | |
62 | + if (targetUri != null) | |
63 | + { | |
64 | + | |
65 | + ContentResolver cr = getContentResolver(); | |
66 | + targetName = loadName(cr); | |
67 | + targetIntent = IntentStore.fetchIntent(cr, targetUri); | |
68 | + } | |
69 | + | |
70 | + // init list adapter | |
71 | + if (targetIntent == null) | |
72 | + { | |
73 | + Toast.makeText(this, "No such intent exist.", Toast.LENGTH_SHORT).show(); | |
74 | + finish(); | |
75 | + } | |
76 | + else | |
77 | + { | |
78 | + intentDetailListAdapter = new IntentDetailListAdapter(); | |
79 | + setListAdapter(intentDetailListAdapter); | |
80 | + } | |
81 | + | |
82 | + Log.v(LOG_TAG, "Bye"); | |
83 | + } | |
84 | + | |
85 | + private String loadName(ContentResolver cr) | |
86 | + { | |
87 | + String title = null; | |
88 | + | |
89 | + // load title | |
90 | + if (targetUri != null) | |
91 | + { | |
92 | + Cursor cursor = cr.query(targetUri, null, null, null, null); | |
93 | + if (cursor != null) | |
94 | + { | |
95 | + try | |
96 | + { | |
97 | + if (cursor.moveToFirst()) | |
98 | + { | |
99 | + int titleColumnIndex = cursor.getColumnIndex(IntentStore.Intents.Columns.NAME); | |
100 | + title = cursor.getString(titleColumnIndex); | |
101 | + } | |
102 | + } | |
103 | + finally | |
104 | + { | |
105 | + cursor.close(); | |
106 | + } | |
107 | + } | |
108 | + } | |
109 | + | |
110 | + return title; | |
111 | + } | |
112 | + | |
113 | + /* | |
114 | + | |
115 | + private void initializeCategories(Intent targetIntent) | |
116 | + { | |
117 | + Log.v(LOG_TAG, "Hello"); | |
118 | + | |
119 | + Set<String> categories = targetIntent.getCategories(); | |
120 | + Log.d(LOG_TAG, "categories => " + categories); | |
121 | + if (categories != null) | |
122 | + { | |
123 | + ViewGroup categoriesViewGroup = (ViewGroup) findViewById(R.id.categories_section); | |
124 | + categoriesViewGroup.removeAllViews(); | |
125 | + | |
126 | + LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); | |
127 | + for (String category : categories) | |
128 | + { | |
129 | + View categoryItem = inflater.inflate(R.layout.category_list_item, categoriesViewGroup, true); | |
130 | + TextView categoryTextView = (TextView) categoryItem.findViewById(R.id.category_textview); | |
131 | + categoryTextView.setText(category); | |
132 | + } | |
133 | + } | |
134 | + | |
135 | + Log.v(LOG_TAG, "Bye"); | |
136 | + } | |
137 | + | |
138 | + private void initializeExtras(Intent targetIntent) | |
139 | + { | |
140 | + Log.v(LOG_TAG, "Hello"); | |
141 | + | |
142 | + Bundle extras = targetIntent.getExtras(); | |
143 | + Log.d(LOG_TAG, "extras => " + extras); | |
144 | + if (extras != null) | |
145 | + { | |
146 | + ViewGroup extrasViewGroup = (ViewGroup) findViewById(R.id.extras_section); | |
147 | + extrasViewGroup.removeAllViews(); | |
148 | + | |
149 | + LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); | |
150 | + for (String key : extras.keySet()) | |
151 | + { | |
152 | + Object value = extras.get(key); | |
153 | + String type = value.getClass().getSimpleName(); | |
154 | + Log.d(LOG_TAG, "extra key => " + key); | |
155 | + Log.d(LOG_TAG, "extra value => " + value); | |
156 | + | |
157 | + View extraItem = inflater.inflate(R.layout.extra_list_item, extrasViewGroup, true); | |
158 | + TextView keyTextView = (TextView) extraItem.findViewById(R.id.extra_key_textview); | |
159 | + TextView typeTextView = (TextView) extraItem.findViewById(R.id.extra_type_textview); | |
160 | + TextView valueTextView = (TextView) extraItem.findViewById(R.id.extra_value_textview); | |
161 | + | |
162 | + keyTextView.setText(key); | |
163 | + typeTextView.setText(type); | |
164 | + valueTextView.setText(value.toString()); | |
165 | + } | |
166 | + } | |
167 | + Log.v(LOG_TAG, "Bye"); | |
168 | + } | |
169 | + | |
170 | + private void initializeFlags(Intent targetIntent) | |
171 | + { | |
172 | + Log.v(LOG_TAG, "Hello"); | |
173 | + | |
174 | + int flags = targetIntent.getFlags(); | |
175 | + Log.d(LOG_TAG, "flags => " + flags); | |
176 | + if (flags != 0) | |
177 | + { | |
178 | + ViewGroup flagsViewGroup = (ViewGroup) findViewById(R.id.flags_section); | |
179 | + flagsViewGroup.removeAllViews(); | |
180 | + | |
181 | + LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); | |
182 | + for (int i = 0; i < IntentFlags.FLAG_VALUES.length; i++) | |
183 | + { | |
184 | + int flagValue = IntentFlags.FLAG_VALUES[i]; | |
185 | + String flagName = IntentFlags.FLAG_NAMES[i]; | |
186 | + if ((flags & flagValue) != 0) | |
187 | + { | |
188 | + Log.d(LOG_TAG, "flag name => " + flagName); | |
189 | + View flagItem = inflater.inflate(R.layout.flag_list_item, flagsViewGroup, true); | |
190 | + TextView flagNameTextView = (TextView) flagItem.findViewById(R.id.flag_name_textview); | |
191 | + flagNameTextView.setText(flagName); | |
192 | + } | |
193 | + } | |
194 | + } | |
195 | + | |
196 | + Log.v(LOG_TAG, "Bye"); | |
197 | + } | |
198 | + */ | |
199 | + class IntentDetailListAdapter extends BaseAdapter | |
200 | + { | |
201 | + | |
202 | + private LayoutInflater inflater; | |
203 | + | |
204 | + public IntentDetailListAdapter() | |
205 | + { | |
206 | + inflater = (LayoutInflater) getSystemService(Activity.LAYOUT_INFLATER_SERVICE); | |
207 | + } | |
208 | + | |
209 | + public int getCount() | |
210 | + { | |
211 | + return 5; | |
212 | + } | |
213 | + | |
214 | + public Object getItem(int position) | |
215 | + { | |
216 | + Object result = null; | |
217 | + switch (position) | |
218 | + { | |
219 | + case POSITION_NAME: | |
220 | + result = targetName; | |
221 | + break; | |
222 | + case POSITION_ACTION: | |
223 | + result = targetIntent.getAction(); | |
224 | + break; | |
225 | + case POSITION_COMPONENT: | |
226 | + result = targetIntent.getComponent(); | |
227 | + break; | |
228 | + case POSITION_DATA_URI: | |
229 | + result = targetIntent.getData(); | |
230 | + break; | |
231 | + case POSITION_DATA_TYPE: | |
232 | + result = targetIntent.getType(); | |
233 | + break; | |
234 | + } | |
235 | + return result; | |
236 | + } | |
237 | + | |
238 | + public long getItemId(int position) | |
239 | + { | |
240 | + return position; | |
241 | + } | |
242 | + | |
243 | + public View getView(int position, View convertView, ViewGroup parent) | |
244 | + { | |
245 | + View itemView; | |
246 | + Log.d(LOG_TAG, "Hello"); | |
247 | + | |
248 | + if (convertView == null) | |
249 | + { | |
250 | + itemView = inflater.inflate(R.layout.intent_detail_item, null); | |
251 | + } | |
252 | + else | |
253 | + { | |
254 | + itemView = convertView; | |
255 | + } | |
256 | + View nameView = itemView.findViewById(R.id.intent_detail_item_name); | |
257 | + View actionView = itemView.findViewById(R.id.intent_detail_item_action); | |
258 | + View componentView = itemView.findViewById(R.id.intent_detail_item_component); | |
259 | + View dataUriView = itemView.findViewById(R.id.intent_detail_item_data_uri); | |
260 | + View dataTypeView = itemView.findViewById(R.id.intent_detail_item_data_type); | |
261 | + | |
262 | + nameView.setVisibility(View.GONE); | |
263 | + actionView.setVisibility(View.GONE); | |
264 | + componentView.setVisibility(View.GONE); | |
265 | + dataUriView.setVisibility(View.GONE); | |
266 | + dataTypeView.setVisibility(View.GONE); | |
267 | + | |
268 | + Object item = getItem(position); | |
269 | + switch (position) | |
270 | + { | |
271 | + case POSITION_NAME: | |
272 | + String nameText = null; | |
273 | + if (item instanceof String) | |
274 | + { | |
275 | + nameText = (String) item; | |
276 | + } | |
277 | + TextView nameTextView = (TextView) nameView.findViewById(R.id.name_textview); | |
278 | + nameTextView.setText(nameText); | |
279 | + nameView.setVisibility(View.VISIBLE); | |
280 | + break; | |
281 | + case POSITION_ACTION: | |
282 | + String actionText = null; | |
283 | + if (item instanceof String) | |
284 | + { | |
285 | + actionText = (String) item; | |
286 | + } | |
287 | + TextView titleTextView = (TextView) actionView.findViewById(R.id.action_textview); | |
288 | + titleTextView.setText(actionText); | |
289 | + actionView.setVisibility(View.VISIBLE); | |
290 | + break; | |
291 | + case POSITION_COMPONENT: | |
292 | + String componentPackageText = null; | |
293 | + String componentClassText = null; | |
294 | + ComponentName componentName = (ComponentName) item; | |
295 | + if (componentName != null) | |
296 | + { | |
297 | + componentPackageText = componentName.getPackageName(); | |
298 | + componentClassText = componentName.getClassName(); | |
299 | + } | |
300 | + TextView componentPackageTextView = (TextView) componentView.findViewById(R.id.component_package_textview); | |
301 | + TextView componentClassTextView = (TextView) componentView.findViewById(R.id.component_class_textview); | |
302 | + componentPackageTextView.setText(componentPackageText); | |
303 | + componentClassTextView.setText(componentClassText); | |
304 | + componentView.setVisibility(View.VISIBLE); | |
305 | + break; | |
306 | + case POSITION_DATA_URI: | |
307 | + String dataUriText = null; | |
308 | + if (item instanceof Uri) | |
309 | + { | |
310 | + dataUriText = item.toString(); | |
311 | + } | |
312 | + TextView dataUriTextView = (TextView) dataUriView.findViewById(R.id.data_uri_textview); | |
313 | + dataUriTextView.setText(dataUriText); | |
314 | + dataUriView.setVisibility(View.VISIBLE); | |
315 | + break; | |
316 | + case POSITION_DATA_TYPE: | |
317 | + String dataTypeText = null; | |
318 | + if (item instanceof String) | |
319 | + { | |
320 | + dataTypeText = (String) item; | |
321 | + } | |
322 | + TextView dataTypeTextView = (TextView) dataTypeView.findViewById(R.id.data_type_textview); | |
323 | + dataTypeTextView.setText(dataTypeText); | |
324 | + dataTypeView.setVisibility(View.VISIBLE); | |
325 | + break; | |
326 | + } | |
327 | + | |
328 | + Log.d(LOG_TAG, "Bye"); | |
329 | + return itemView; | |
330 | + } | |
331 | + } | |
332 | +} |
@@ -33,7 +33,7 @@ public class IntentListActivity extends ListActivity | ||
33 | 33 | // init ListAdapter |
34 | 34 | private static final String[] MAPPING_FROM = |
35 | 35 | { |
36 | - IntentStore.Intents.Columns.TITLE, | |
36 | + IntentStore.Intents.Columns.NAME, | |
37 | 37 | IntentStore.Intents.Columns.ACTION, |
38 | 38 | }; |
39 | 39 | private static final int[] MAPPING_TO = |
@@ -45,23 +45,23 @@ interface IntentDBConstants | ||
45 | 45 | String DATA = "_data"; |
46 | 46 | String CREATED = "created"; |
47 | 47 | String MODIFIED = "modified"; |
48 | - String TITLE = "title"; | |
48 | + String NAME = "name"; | |
49 | 49 | String ACTION = "action"; // Intent.getAction() |
50 | 50 | String DATA_URI = "data_uri"; // Intent.getData() |
51 | 51 | } |
52 | 52 | // CREATE SQL |
53 | 53 | static final String CREATE_TABLE_SQL = "CREATE TABLE " + TABLE_NAME + "(" |
54 | 54 | + " " + Columns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT" |
55 | + + ", " + Columns.NAME + " TEXT" | |
55 | 56 | + ", " + Columns.DATA + " TEXT" |
56 | - + ", " + Columns.TITLE + " TEXT" | |
57 | - + ", " + Columns.CREATED + " INTEGER" | |
58 | - + ", " + Columns.MODIFIED + " INTEGER" | |
57 | + + ", " + Columns.CREATED + " INTEGER NOT NULL" | |
58 | + + ", " + Columns.MODIFIED + " INTEGER NOT NULL" | |
59 | 59 | + ", " + Columns.ACTION + " TEXT" |
60 | 60 | + ", " + Columns.DATA_URI + " TEXT" |
61 | 61 | + ");"; |
62 | 62 | String CREATE_TITLE_INDEX_SQL = "CREATE INDEX " |
63 | - + TABLE_NAME + "_" + Columns.TITLE + "_index " | |
64 | - + "ON " + TABLE_NAME + "(" + Columns.TITLE + ");"; | |
63 | + + TABLE_NAME + "_" + Columns.NAME + "_index " | |
64 | + + "ON " + TABLE_NAME + "(" + Columns.NAME + ");"; | |
65 | 65 | String CREATE_CREATED_INDEX_SQL = "CREATE INDEX " |
66 | 66 | + TABLE_NAME + "_" + Columns.CREATED + "_index " |
67 | 67 | + "ON " + TABLE_NAME + "(" + Columns.CREATED + ");"; |
@@ -59,7 +59,7 @@ public class IntentStore | ||
59 | 59 | String DATA = IntentDBConstants.Intents.Columns.DATA; |
60 | 60 | String CREATED = IntentDBConstants.Intents.Columns.CREATED; |
61 | 61 | String MODIFIED = IntentDBConstants.Intents.Columns.MODIFIED; |
62 | - String TITLE = IntentDBConstants.Intents.Columns.TITLE; | |
62 | + String NAME = IntentDBConstants.Intents.Columns.NAME; | |
63 | 63 | String ACTION = IntentDBConstants.Intents.Columns.ACTION; |
64 | 64 | String DATA_URI = IntentDBConstants.Intents.Columns.DATA_URI; |
65 | 65 | } |
@@ -111,7 +111,7 @@ public class IntentStore | ||
111 | 111 | String dataUri = intent.getDataString(); |
112 | 112 | long now = new Date().getTime(); |
113 | 113 | ContentValues initialValues = new ContentValues(); |
114 | - initialValues.put(Intents.Columns.TITLE, title); | |
114 | + initialValues.put(Intents.Columns.NAME, title); | |
115 | 115 | initialValues.put(Intents.Columns.ACTION, action); |
116 | 116 | initialValues.put(Intents.Columns.DATA_URI, dataUri); |
117 | 117 | initialValues.put(Intents.Columns.CREATED, now); |