Fix for crashing in creating FLA context menu's, moved target to 8

pull/14/head
Tim Su 14 years ago
parent 176c170628
commit a3b33a38f6

@ -161,6 +161,9 @@ public class AndroidUtilities {
*/
@SuppressWarnings("nls")
public static ContentValues contentValuesFromString(String string) {
if(string == null)
return null;
String[] pairs = string.split(",");
ContentValues result = new ContentValues();
for(String item : pairs) {

@ -10,5 +10,5 @@
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-4
target=Google Inc.:Google APIs:8
apk-configurations=

@ -287,7 +287,10 @@ public class FilterListActivity extends ExpandableListActivity {
shortcutIntent.setAction(Intent.ACTION_VIEW);
shortcutIntent.putExtra(TaskListActivity.TOKEN_FILTER_TITLE, filter.title);
shortcutIntent.putExtra(TaskListActivity.TOKEN_FILTER_SQL, filter.sqlQuery);
shortcutIntent.putExtra(TaskListActivity.TOKEN_FILTER_VALUES, filter.valuesForNewTasks.toString());
if(filter.valuesForNewTasks != null) {
shortcutIntent.putExtra(TaskListActivity.TOKEN_FILTER_VALUES,
filter.valuesForNewTasks.toString());
}
menuItem.setIntent(shortcutIntent);
}

@ -171,7 +171,9 @@ public class TaskListActivity extends ListActivity implements OnScrollListener {
// launched from desktop shortcut, must create a fake filter
String title = extras.getString(TOKEN_FILTER_TITLE);
String sql = extras.getString(TOKEN_FILTER_SQL);
ContentValues values = AndroidUtilities.contentValuesFromString(extras.getString(TOKEN_FILTER_VALUES));
ContentValues values = null;
if(extras.containsKey(TOKEN_FILTER_VALUES))
values = AndroidUtilities.contentValuesFromString(extras.getString(TOKEN_FILTER_VALUES));
filter = new Filter("", "", title, new QueryTemplate(), values); //$NON-NLS-1$ //$NON-NLS-2$
filter.sqlQuery = sql;

Loading…
Cancel
Save