Merge remote branch 'stingeraj/dev' into dev

pull/14/head
Tim Su 14 years ago
commit ea10f25814

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.timsu.astrid" package="com.timsu.astrid"
android:versionName="3.1.0" android:versionCode="146" android:versionName="3.1.0" android:versionCode="146">
android:installLocation="internalOnly"> <!-- android:installLocation="internalOnly"> -->
<!-- widgets, alarms, and services will break if Astrid is installed on SD card --> <!-- widgets, alarms, and services will break if Astrid is installed on SD card -->
@ -53,7 +53,7 @@
<supports-screens /> <supports-screens />
<application android:icon="@drawable/icon" <application android:icon="@drawable/icon"
android:label="@string/app_name"> android:label="@string/app_name" android:debuggable="true">
<!-- ====================================================== Activities = --> <!-- ====================================================== Activities = -->

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

@ -0,0 +1,156 @@
package com.todoroo.astrid.producteev;
import java.util.ArrayList;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.AdapterView.OnItemSelectedListener;
import com.timsu.astrid.R;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.service.ExceptionService;
import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet;
import com.todoroo.astrid.model.Metadata;
import com.todoroo.astrid.model.StoreObject;
import com.todoroo.astrid.model.Task;
import com.todoroo.astrid.producteev.sync.ProducteevDashboard;
import com.todoroo.astrid.producteev.sync.ProducteevDataService;
import com.todoroo.astrid.producteev.sync.ProducteevTask;
import com.todoroo.astrid.producteev.sync.ProducteevUser;
/**
* Control Set for managing task/dashboard assignments in Producteev
*
* @author Arne Jans <arne.jans@gmail.com>
*
*/
public class ProducteevControlSet implements TaskEditControlSet {
// --- instance variables
@Autowired
private ExceptionService exceptionService;
private final Activity activity;
private Task myTask;
private final Spinner responsibleSelector;
private final Spinner dashboardSelector;
private ArrayList<ProducteevUser> users = null;
private ArrayList<ProducteevDashboard> dashboards = null;
public ProducteevControlSet(final Activity activity, ViewGroup parent) {
DependencyInjectionService.getInstance().inject(this);
this.activity = activity;
LayoutInflater.from(activity).inflate(R.layout.producteev_control, parent, true);
this.responsibleSelector = (Spinner) activity.findViewById(R.id.producteev_TEA_task_assign);
this.responsibleSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view,
int position, long id) {
// TODO tim, please set a flag here somewhere, so that producteevinvoker knows
// it has to invoke tasks/set_responsible, or otherwise do it your way...
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
// TODO Auto-generated method stub
}
});
this.dashboardSelector = (Spinner) activity.findViewById(R.id.producteev_TEA_dashboard_assign);
this.dashboardSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view,
int position, long id) {
// TODO tim, please set a flag here somewhere, so that producteevinvoker knows
// it has to invoke tasks/set_dashboard, or otherwise do it your way...
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
// TODO Auto-generated method stub
}
});
}
@Override
public void readFromTask(Task task) {
this.myTask = task;
Metadata metadata = ProducteevDataService.getInstance().getTaskMetadata(myTask.getId());
if (metadata != null) {
// Fill the dashboard-spinner and set the current dashboard
long dashboardId = metadata.getValue(ProducteevTask.DASHBOARD_ID);
StoreObject[] dashboardsData = ProducteevDataService.getInstance().getDashboards();
dashboards = new ArrayList(dashboardsData.length);
ProducteevDashboard ownerDashboard = null;
int dashboardSpinnerIndex = 0;
//dashboard to not sync as first spinner-entry
dashboards.add(new ProducteevDashboard(ProducteevUtilities.DASHBOARD_NO_SYNC, activity.getString(R.string.producteev_no_dashboard),null));
for (int i=1;i<dashboardsData.length+1;i++) {
ProducteevDashboard dashboard = new ProducteevDashboard(dashboardsData[i-1]);
dashboards.add(dashboard);
if(dashboard.getId() == dashboardId) {
ownerDashboard = dashboard;
dashboardSpinnerIndex = i;
}
}
ArrayAdapter<String> dashAdapter = new ArrayAdapter(activity,
android.R.layout.simple_spinner_item, dashboards);
dashAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
dashboardSelector.setAdapter(dashAdapter);
dashboardSelector.setSelection(dashboardSpinnerIndex);
if (ownerDashboard == null || ownerDashboard.getId() == ProducteevUtilities.DASHBOARD_NO_SYNC) {
responsibleSelector.setEnabled(false);
TextView emptyView = new TextView(activity);
emptyView.setText(activity.getText(R.string.producteev_no_dashboard));
responsibleSelector.setEmptyView(emptyView);
return;
}
// Fill the responsible-spinner and set the current responsible
users = ownerDashboard.getUsers();
long responsibleId = metadata.getValue(ProducteevTask.RESPONSIBLE_ID);
int userSpinnerIndex = 0;
for (ProducteevUser user : users) {
if (user.getId() == responsibleId) {
break;
}
userSpinnerIndex++;
}
ArrayAdapter<String> usersAdapter = new ArrayAdapter(activity,
android.R.layout.simple_spinner_item, users);
responsibleSelector.setAdapter(usersAdapter);
responsibleSelector.setSelection(userSpinnerIndex);
}
}
@SuppressWarnings("nls")
@Override
public void writeToModel(Task task) {
Metadata metadata = ProducteevDataService.getInstance().getTaskMetadata(task.getId());
if (metadata != null) {
ProducteevDashboard dashboard = (ProducteevDashboard) dashboardSelector.getSelectedItem();
metadata.setValue(ProducteevTask.DASHBOARD_ID, dashboard.getId());
ProducteevUser responsibleUser = (ProducteevUser) responsibleSelector.getSelectedItem();
metadata.setValue(ProducteevTask.RESPONSIBLE_ID, responsibleUser.getId());
}
}
}

@ -299,6 +299,35 @@ public class ProducteevInvoker {
"id_label", idLabel); "id_label", idLabel);
} }
/**
* change responsible of a task
*
* @param idTask
* @param idResponsible
*
* @return array: tasks/view
*/
public JSONObject tasksSetResponsible(long idTask, long idResponsible) throws ApiServiceException, IOException {
return callAuthenticated("tasks/set_responsible.json",
"token", token,
"id_task", idTask,
"id_responsible", idResponsible);
}
/**
* change responsible of a task
*
* @param idTask
* @param idResponsible
*
* @return array: tasks/view
*/
public JSONObject tasksUnsetResponsible(long idTask) throws ApiServiceException, IOException {
return callAuthenticated("tasks/unset_responsible.json",
"token", token,
"id_task", idTask);
}
/** /**
* create a note attached to a task * create a note attached to a task
* *
@ -361,6 +390,19 @@ public class ProducteevInvoker {
"id_colleague", idColleague); "id_colleague", idColleague);
} }
/**
* return the list of users who can access a specific dashboard
*
* @param idDashboard
* @param dashboard array-information about the dashboard, if this ...
*/
public JSONArray dashboardsAccess(long idDashboard, String dashboard) throws ApiServiceException, IOException {
return getResponse(callAuthenticated("dashboards/access",
"token", token,
"id_dashboard", idDashboard,
"dashboard", dashboard),"dashboard");
}
// --- invocation // --- invocation
private final ProducteevRestClient restClient = new ProducteevRestClient(); private final ProducteevRestClient restClient = new ProducteevRestClient();

@ -1,5 +1,8 @@
package com.todoroo.astrid.producteev.sync; package com.todoroo.astrid.producteev.sync;
import java.util.ArrayList;
import java.util.StringTokenizer;
import com.todoroo.andlib.data.Property.LongProperty; import com.todoroo.andlib.data.Property.LongProperty;
import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Property.StringProperty;
import com.todoroo.astrid.model.StoreObject; import com.todoroo.astrid.model.StoreObject;
@ -27,4 +30,75 @@ public class ProducteevDashboard {
public static final StringProperty USERS = new StringProperty(StoreObject.TABLE, public static final StringProperty USERS = new StringProperty(StoreObject.TABLE,
StoreObject.VALUE2.name); StoreObject.VALUE2.name);
// data class-part
private final long id;
private final String name;
private ArrayList<ProducteevUser> users = null;
public ProducteevDashboard (StoreObject dashboardData) {
this(dashboardData.getValue(REMOTE_ID),dashboardData.getValue(NAME),dashboardData.getValue(USERS));
}
/**
* Constructor for a dashboard.
*
* @param id id of the remote dashboard
* @param name name of the remote dashboard
* @param usercsv csv-userstring as returned by a StoreObject-dashboard with property ProducteevDashboard.USERS
*/
public ProducteevDashboard(long id, String name, String usercsv) {
this.id = id;
this.name = name;
if (usercsv == null)
return;
StringTokenizer tokenizer = new StringTokenizer(usercsv, ";");
int usercount = tokenizer.countTokens();
while (tokenizer.hasMoreTokens()) {
String userdata = tokenizer.nextToken();
int delim_index = userdata.indexOf(",");
String userid = userdata.substring(0, delim_index);
String username = userdata.substring(delim_index+1);
int name_gap = username.indexOf(" ");
String firstname = (name_gap == -1 ? username : username.substring(0,name_gap));
String lastname = (name_gap == -1 ? null : username.substring(name_gap+1));
if (users == null) {
users = new ArrayList<ProducteevUser>(usercount);
}
users.add(new ProducteevUser(Long.parseLong(userid),null,firstname,lastname));
}
}
/**
* @return the id
*/
public long getId() {
return id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* return the name of this dashboard
*/
@Override
public String toString() {
return name;
}
/**
* @return the users
*/
public ArrayList<ProducteevUser> getUsers() {
return users;
}
} }

@ -209,6 +209,8 @@ public final class ProducteevDataService {
private StoreObject[] dashboards = null; private StoreObject[] dashboards = null;
private ArrayList colleagues;
/** /**
* Reads dashboards * Reads dashboards
*/ */

@ -644,6 +644,4 @@ public class ProducteevSyncProvider extends SyncProvider<ProducteevTaskContainer
((_-83)%27+97):_);return TextUtils.htmlEncode(____==31?___: ((_-83)%27+97):_);return TextUtils.htmlEncode(____==31?___:
stripslashes(____+1,__.substring(1),___+((char)_))); stripslashes(____+1,__.substring(1),___+((char)_)));
} }
} }

@ -0,0 +1,84 @@
package com.todoroo.astrid.producteev.sync;
import org.json.JSONException;
import org.json.JSONObject;
/**
*
* @author Arne Jans <arne.jans@gmail.com>
*/
@SuppressWarnings("nls")
public class ProducteevUser {
private final long id;
private final String email;
private final String firstname;
private final String lastname;
public ProducteevUser(long id, String email, String firstname, String lastname) {
this.id = id;
this.email = email;
this.firstname = firstname;
this.lastname = lastname;
}
public ProducteevUser(JSONObject elt) throws JSONException {
this.id = elt.getLong("id");
this.email = elt.getString("email");
this.firstname = elt.getString("firstname");
this.lastname = elt.getString("lastname");
}
/**
* @return the email
*/
public String getEmail() {
return email;
}
/**
* @return the firstname
*/
public String getFirstname() {
return firstname;
}
/**
* @return the lastname
*/
public String getLastname() {
return lastname;
}
/**
* @return the id
*/
public long getId() {
return id;
}
@Override
public String toString() {
String displayString = "";
boolean hasFirstname = false;
boolean hasLastname = false;
if (firstname != null && firstname.length() > 0) {
displayString += firstname;
hasFirstname = true;
}
if (lastname != null && lastname.length() > 0)
hasLastname = true;
if (hasFirstname && hasLastname)
displayString += " ";
if (hasLastname)
displayString += lastname;
if (!hasFirstname && !hasLastname && email != null && email.length() > 0)
displayString += email;
return displayString;
}
}

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<!-- producteev task assignment controlset -->
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/producteev_TEA_task_assign_label"
style="@style/TextAppearance.GEN_EditLabel" />
<Spinner
android:id="@+id/producteev_TEA_task_assign"
android:prompt="@string/producteev_TEA_task_assign_label"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/producteev_TEA_dashboard_assign_label"
style="@style/TextAppearance.GEN_EditLabel" />
<Spinner
android:id="@+id/producteev_TEA_dashboard_assign"
android:prompt="@string/producteev_TEA_dashboard_assign_label"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:padding="5dip"
android:background="@android:drawable/divider_horizontal_dark" />
</merge>

@ -100,5 +100,4 @@
android:linksClickable="true" android:linksClickable="true"
android:text="@string/producteev_PLA_terms" /> android:text="@string/producteev_PLA_terms" />
</LinearLayout> </LinearLayout>

@ -86,5 +86,18 @@
<!-- Prod Login password not specified--> <!-- Prod Login password not specified-->
<string name="producteev_MLA_password_empty">Password was not specified!</string> <string name="producteev_MLA_password_empty">Password was not specified!</string>
</resources> <!-- ================================================ labels for layout-elements == -->
<!-- label for task-assignment spinner on taskeditactivity -->
<string name="producteev_TEA_task_assign_label">Assign this task to this person:</string>
<!-- Spinner-item for unassigned tasks on taskeditactivity -->
<string name="producteev_TEA_task_unassigned">&lt;Unassigned&gt;</string>
<!-- label for dashboard-assignment spinner on taskeditactivity -->
<string name="producteev_TEA_dashboard_assign_label">Assign this task to this workspace:</string>
<!-- Spinner-item for default dashboard on taskeditactivity -->
<string name="producteev_TEA_dashboard_default">&lt;Default&gt;</string>
</resources>

@ -27,14 +27,14 @@ import java.util.List;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.DatePickerDialog; import android.app.DatePickerDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.app.TabActivity; import android.app.TabActivity;
import android.app.DatePickerDialog.OnDateSetListener;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.DialogInterface.OnCancelListener;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Bundle; import android.os.Bundle;
import android.text.format.DateUtils; import android.text.format.DateUtils;
@ -44,7 +44,6 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup.LayoutParams; import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
@ -59,6 +58,7 @@ import android.widget.TabHost;
import android.widget.TimePicker; import android.widget.TimePicker;
import android.widget.Toast; import android.widget.Toast;
import android.widget.ToggleButton; import android.widget.ToggleButton;
import android.widget.AdapterView.OnItemSelectedListener;
import com.flurry.android.FlurryAgent; import com.flurry.android.FlurryAgent;
import com.timsu.astrid.R; import com.timsu.astrid.R;
@ -72,7 +72,9 @@ import com.todoroo.astrid.alarms.AlarmControlSet;
import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.dao.Database; import com.todoroo.astrid.dao.Database;
import com.todoroo.astrid.gcal.GCalControlSet; import com.todoroo.astrid.gcal.GCalControlSet;
import com.todoroo.astrid.model.AddOn;
import com.todoroo.astrid.model.Task; import com.todoroo.astrid.model.Task;
import com.todoroo.astrid.producteev.ProducteevControlSet;
import com.todoroo.astrid.producteev.ProducteevUtilities; import com.todoroo.astrid.producteev.ProducteevUtilities;
import com.todoroo.astrid.repeats.RepeatControlSet; import com.todoroo.astrid.repeats.RepeatControlSet;
import com.todoroo.astrid.service.AddOnService; import com.todoroo.astrid.service.AddOnService;
@ -217,6 +219,10 @@ public final class TaskEditActivity extends TabActivity {
controls.add(new RepeatControlSet(this, extrasAddons)); controls.add(new RepeatControlSet(this, extrasAddons));
LinearLayout addonsAddons = (LinearLayout) findViewById(R.id.tab_addons_addons); LinearLayout addonsAddons = (LinearLayout) findViewById(R.id.tab_addons_addons);
AddOn producteevAddon = addOnService.getAddOn(AddOnService.PRODUCTEEV_PACKAGE, "Producteev");
if (addOnService.isInstalled(producteevAddon) && ProducteevUtilities.INSTANCE.isLoggedIn()) {
controls.add(new ProducteevControlSet(this, addonsAddons));
}
if(addOnService.hasPowerPack()) { if(addOnService.hasPowerPack()) {
controls.add(new GCalControlSet(this, addonsAddons)); controls.add(new GCalControlSet(this, addonsAddons));
controls.add(new TimerControlSet(this, addonsAddons)); controls.add(new TimerControlSet(this, addonsAddons));

@ -42,6 +42,9 @@ public class AddOnService {
/** Astrid Locale package */ /** Astrid Locale package */
public static final String LOCALE_PACKAGE = "com.todoroo.astrid.locale"; public static final String LOCALE_PACKAGE = "com.todoroo.astrid.locale";
/** Astrid Producteev package */
public static final String PRODUCTEEV_PACKAGE = "com.todoroo.astrid.producteev";
/** Astrid Power Pack label */ /** Astrid Power Pack label */
public static final String POWER_PACK_LABEL = "Astrid Power Pack"; public static final String POWER_PACK_LABEL = "Astrid Power Pack";
@ -152,6 +155,9 @@ public class AddOnService {
* @return * @return
*/ */
public boolean isInstalled(AddOn addOn) { public boolean isInstalled(AddOn addOn) {
// it isnt installed if it is null...
if (addOn == null)
return false;
return isInstalled(addOn.getPackageName(), addOn.isInternal()); return isInstalled(addOn.getPackageName(), addOn.isInternal());
} }
@ -165,6 +171,8 @@ public class AddOnService {
return true; return true;
if(LOCALE_PACKAGE.equals(packageName)) if(LOCALE_PACKAGE.equals(packageName))
return true; return true;
if(PRODUCTEEV_PACKAGE.equals(packageName))
return true;
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();
PackageInfo packageInfo; PackageInfo packageInfo;
@ -183,6 +191,27 @@ public class AddOnService {
return "30820265308201cea00302010202044954bd9c300d06092a864886f70d01010505003076310b3009060355040613025553310b3009060355040813024341311230100603550407130950616c6f20416c746f31183016060355040a130f6173747269642e6c7632352e636f6d311b3019060355040b131241737472696420446576656c6f706d656e74310f300d0603550403130654696d2053753020170d3038313232363131313835325a180f32303633303932393131313835325a3076310b3009060355040613025553310b3009060355040813024341311230100603550407130950616c6f20416c746f31183016060355040a130f6173747269642e6c7632352e636f6d311b3019060355040b131241737472696420446576656c6f706d656e74310f300d0603550403130654696d20537530819f300d06092a864886f70d010101050003818d00308189028181008b8f39e02a50e5f50723bb71208e99bd72dd3cb6266054809cce0dc33a38ebf79c2a1ab74264cc6c88d44a5092e34f45fc28c53188ebe5b7511f0e14862598a82e1a84b0c99e62b0603737c09501b92f723d9e561a0eedbc16ab494e93a513d170135e0e55af6bb40a9af1186df4cfe53ec3a6144336f9f8a338341656c5a3bd0203010001300d06092a864886f70d01010505000381810016352860629e5e17d2d747943170ddb8c01f014932cb4462f52295c2f764970e93fa461c73b44a678ecf8ab8480702fb746221a98ade8ab7562cae151be78973dfa47144d70b8d0b73220dd741755f62cc9230264f570ec21a4ab1f11b0528d799d3662d06354b56d0d7d28d05c260876a98151fb4e89b6ce2a5010c52b3e365".equals(packageInfo.signatures[0].toCharsString()); return "30820265308201cea00302010202044954bd9c300d06092a864886f70d01010505003076310b3009060355040613025553310b3009060355040813024341311230100603550407130950616c6f20416c746f31183016060355040a130f6173747269642e6c7632352e636f6d311b3019060355040b131241737472696420446576656c6f706d656e74310f300d0603550403130654696d2053753020170d3038313232363131313835325a180f32303633303932393131313835325a3076310b3009060355040613025553310b3009060355040813024341311230100603550407130950616c6f20416c746f31183016060355040a130f6173747269642e6c7632352e636f6d311b3019060355040b131241737472696420446576656c6f706d656e74310f300d0603550403130654696d20537530819f300d06092a864886f70d010101050003818d00308189028181008b8f39e02a50e5f50723bb71208e99bd72dd3cb6266054809cce0dc33a38ebf79c2a1ab74264cc6c88d44a5092e34f45fc28c53188ebe5b7511f0e14862598a82e1a84b0c99e62b0603737c09501b92f723d9e561a0eedbc16ab494e93a513d170135e0e55af6bb40a9af1186df4cfe53ec3a6144336f9f8a338341656c5a3bd0203010001300d06092a864886f70d01010505000381810016352860629e5e17d2d747943170ddb8c01f014932cb4462f52295c2f764970e93fa461c73b44a678ecf8ab8480702fb746221a98ade8ab7562cae151be78973dfa47144d70b8d0b73220dd741755f62cc9230264f570ec21a4ab1f11b0528d799d3662d06354b56d0d7d28d05c260876a98151fb4e89b6ce2a5010c52b3e365".equals(packageInfo.signatures[0].toCharsString());
} }
/**
* Get one AddOn-descriptor by packageName and title.
*
* @param packageName could be Constants.PACKAGE or one of AddOnService-constants
* @param title the descriptive title, as in "Producteev" or "Astrid Power Pack"
* @return the addon-descriptor, if it is available (registered here in getAddOns), otherwise null
*/
public AddOn getAddOn(String packageName, String title) {
if (title == null || packageName == null)
return null;
AddOn addon = null;
AddOn[] addons = getAddOns();
for (int i = 0; i < addons.length ; i++) {
if (packageName.equals(addons[i].getPackageName()) && title.equals(addons[i].getTitle())) {
addon = addons[i];
}
}
return addon;
}
/** /**
* Get a list of add-ons * Get a list of add-ons
* *
@ -210,7 +239,7 @@ public class AddOnService {
list[3] = new AddOn(true, true, "Producteev", null, list[3] = new AddOn(true, true, "Producteev", null,
"Synchronize with Producteev service. Also changes Astrid's importance levels to stars.", "Synchronize with Producteev service. Also changes Astrid's importance levels to stars.",
Constants.PACKAGE, "http://www.producteev.com", PRODUCTEEV_PACKAGE, "http://www.producteev.com",
((BitmapDrawable)r.getDrawable(R.drawable.icon_producteev)).getBitmap()); ((BitmapDrawable)r.getDrawable(R.drawable.icon_producteev)).getBitmap());
return list; return list;

Loading…
Cancel
Save