Home | History | Annotate | Download | only in app

Lines Matching refs:ids

587          * Include only the downloads with the given IDs.
590 public Query setFilterById(long... ids) {
591 mIds = ids;
760 * @param ids the IDs of the downloads to be marked 'deleted'
764 public int markRowDeleted(long... ids) {
765 if (ids == null || ids.length == 0) {
767 throw new IllegalArgumentException("input param 'ids' can't be null");
771 return mResolver.update(mBaseUri, values, getWhereClauseForIds(ids),
772 getWhereArgsForIds(ids));
780 * @param ids the IDs of the downloads to remove
783 public int remove(long... ids) {
784 if (ids == null || ids.length == 0) {
786 throw new IllegalArgumentException("input param 'ids' can't be null");
788 return mResolver.delete(mBaseUri, getWhereClauseForIds(ids), getWhereArgsForIds(ids));
818 * @param ids the IDs of the downloads
821 public void restartDownload(long... ids) {
822 Cursor cursor = query(new Query().setFilterById(ids));
840 mResolver.update(mBaseUri, values, getWhereClauseForIds(ids), getWhereArgsForIds(ids));
851 * Get a parameterized SQL WHERE clause to select a bunch of IDs.
853 static String getWhereClauseForIds(long[] ids) {
856 for (int i = 0; i < ids.length; i++) {
870 static String[] getWhereArgsForIds(long[] ids) {
871 String[] whereArgs = new String[ids.length];
872 for (int i = 0; i < ids.length; i++) {
873 whereArgs[i] = Long.toString(ids[i]);