Java Code Examples for android.support.v4.util.SimpleArrayMap#put()
The following examples show how to use
android.support.v4.util.SimpleArrayMap#put() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GooglePlayReceiver.java From firebase-jobdispatcher-android with Apache License 2.0 | 6 votes |
@Nullable JobInvocation prepareJob(JobCallback callback, Bundle bundle) { JobInvocation job = prefixedCoder.decodeIntentBundle(bundle); if (job == null) { Log.e(TAG, "unable to decode job"); sendResultSafely(callback, JobService.RESULT_FAIL_NORETRY); return null; } synchronized (callbacks) { SimpleArrayMap<String, JobCallback> map = callbacks.get(job.getService()); if (map == null) { map = new SimpleArrayMap<>(1); callbacks.put(job.getService(), map); } map.put(job.getTag(), callback); } return job; }
Example 2
Source File: HomeFragment.java From gcm with Apache License 2.0 | 5 votes |
private void doExecuteSelectedTest() { QuickTest test = mQuickTests.get(getValue(R.id.home_quick_test)); SimpleArrayMap<Integer, String> params = new SimpleArrayMap<>(); for (Integer paramsId : test.getRequiredParameters()) { params.put(paramsId, getValue(paramsId)); } test.execute(mLogger, getActivity(), params); }