|
|
@ -72,14 +72,19 @@ public class PeopleFilterExposer extends BroadcastReceiver {
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("nls")
|
|
|
|
@SuppressWarnings("nls")
|
|
|
|
private static FilterWithCustomIntent filterFromUserData(User user) {
|
|
|
|
private static FilterWithCustomIntent filterFromUserData(User user) {
|
|
|
|
String email = user.getValue(User.EMAIL);
|
|
|
|
String title = user.getDisplayName();
|
|
|
|
if (TextUtils.isEmpty(email) || email.equals("null"))
|
|
|
|
if (TextUtils.isEmpty(title) || "null".equals(title))
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
String title = user.getDisplayName();
|
|
|
|
String email = user.getValue(User.EMAIL);
|
|
|
|
QueryTemplate userTemplate = new QueryTemplate().where(
|
|
|
|
Criterion criterion;
|
|
|
|
Criterion.or(Task.USER.like("%" + email + "%"),
|
|
|
|
if (TextUtils.isEmpty(email) || "null".equals(email))
|
|
|
|
Task.USER_ID.eq(user.getValue(User.REMOTE_ID))));
|
|
|
|
criterion = Task.USER_ID.eq(user.getValue(User.REMOTE_ID));
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
criterion = Criterion.or(Task.USER.like("%" + email + "%"),
|
|
|
|
|
|
|
|
Task.USER_ID.eq(user.getValue(User.REMOTE_ID)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryTemplate userTemplate = new QueryTemplate().where(criterion);
|
|
|
|
|
|
|
|
|
|
|
|
FilterWithUpdate filter = new FilterWithUpdate(title, title, userTemplate, null);
|
|
|
|
FilterWithUpdate filter = new FilterWithUpdate(title, title, userTemplate, null);
|
|
|
|
|
|
|
|
|
|
|
|