Code example for SparseArray

Methods: get, remove

0
 
	protected ResultReceiver receiver = new ResultReceiver(handler) {
		@Override 
		protected void onReceiveResult(int resultCode, Bundle resultData) { 
			Integer requestId = resultData.getInt("requestId"); 
			if (pendingOperations.get(requestId) != null) { 
				pendingOperations.get(requestId).perform(resultCode == 0); 
				pendingOperations.remove(requestId); 
			} else { 
				Log.e(getTAG(), "Missing operation requestId=!" + requestId); 
			} 
 
		} 
	}; 
 
	protected static interface PendingOperation { 
		public void perform(boolean emptyResultSet);
	} 
 
	protected MySQLiteHelper databaseHelper;