Merge branch 'develop' into preference-support

This commit is contained in:
Mariotaku Lee 2016-03-13 10:46:25 +08:00
commit d10f794ad3
9 changed files with 11 additions and 12 deletions

View File

@ -1502,7 +1502,7 @@ public class ComposeActivity extends ThemedFragmentActivity implements OnMenuIte
@Override
public long getItemId(int position) {
return System.identityHashCode(mAccounts[position]);
return mAccounts[position].hashCode();
}
@NonNull
@ -1797,7 +1797,7 @@ public class ComposeActivity extends ThemedFragmentActivity implements OnMenuIte
@Override
public long getItemId(int position) {
return System.identityHashCode(getItem(position));
return getItem(position).hashCode();
}
@Override

View File

@ -64,7 +64,7 @@ public class AccountsSpinnerAdapter extends ArrayAdapter<ParcelableCredentials>
@Override
public long getItemId(int position) {
return System.identityHashCode(getItem(position));
return getItem(position).hashCode();
}
@Override

View File

@ -118,7 +118,7 @@ public class ParcelableActivitiesAdapter extends LoadMoreSupportAdapter<Recycler
final long minPosition = cursor.getLong(indices.min_position);
return ParcelableActivity.calculateHashCode(accountKey, timestamp, maxPosition, minPosition);
}
return System.identityHashCode(mData.get(dataPosition));
return mData.get(dataPosition).hashCode();
}
@Nullable

View File

@ -136,7 +136,7 @@ public abstract class ParcelableStatusesAdapter extends LoadMoreSupportAdapter<R
final String id = cursor.getString(indices.id);
return ParcelableStatus.calculateHashCode(accountKey, id);
}
return System.identityHashCode(mData.get(dataPosition));
return mData.get(dataPosition).hashCode();
}
@Nullable

View File

@ -50,7 +50,7 @@ public class SimpleParcelableUsersAdapter extends BaseArrayAdapter<ParcelableUse
public long getItemId(final int position) {
final ParcelableUser item = getItem(position);
if (item != null) {
return System.identityHashCode(item);
return item.hashCode();
} else {
return -1;
}

View File

@ -862,7 +862,7 @@ public class AccountsDashboardFragment extends BaseSupportFragment implements Lo
@Override
public long getItemId(int position) {
return System.identityHashCode(getAdapterAccount(position));
return getAdapterAccount(position).hashCode();
}
@Override

View File

@ -2159,7 +2159,7 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
@Override
public long getItemId(int position) {
final ParcelableStatus status = getStatus(position);
if (status != null) return System.identityHashCode(status);
if (status != null) return status.hashCode();
return getItemType(position);
}

View File

@ -322,11 +322,10 @@ public class AsyncTwitterWrapper extends TwitterWrapper {
TaskStarter.execute(task);
}
public int getSavedSearchesAsync(UserKey[] accountKeys) {
public void getSavedSearchesAsync(UserKey[] accountKeys) {
final GetSavedSearchesTask task = new GetSavedSearchesTask(mContext);
task.setParams(accountKeys);
TaskStarter.execute(task);
return System.identityHashCode(task);
}
@NonNull

View File

@ -95,7 +95,7 @@ public class InternalTwitterContentUtils {
return false;
final StringBuilder builder = new StringBuilder();
final List<String> selectionArgs = new ArrayList<>();
builder.append("SELECT NULL WHERE");
builder.append("SELECT ");
if (textPlain != null) {
selectionArgs.add(textPlain);
builder.append("(SELECT 1 IN (SELECT ? LIKE '%'||" + Filters.Keywords.TABLE_NAME + "." + Filters.VALUE
@ -142,7 +142,7 @@ public class InternalTwitterContentUtils {
selectionArgs.toArray(new String[selectionArgs.size()]));
if (cur == null) return false;
try {
return cur.getCount() > 0;
return cur.moveToFirst() && cur.getInt(0) != 0;
} finally {
cur.close();
}