mediarouter: Fix indexing error resulting in NPE.

Bug: 9469471
Change-Id: Idf6f4345eecf03f5f64e2b09c0dda88344a7d67f
diff --git a/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java b/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java
index 3d04fb0..0bcfd0b 100644
--- a/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java
+++ b/v7/mediarouter/src/android/support/v7/media/RegisteredMediaRouteProvider.java
@@ -428,7 +428,7 @@
         private void failPendingCallbacks() {
             int count = 0;
             for (int i = 0; i < mPendingCallbacks.size(); i++) {
-                mPendingCallbacks.get(i).onError(null, null);
+                mPendingCallbacks.valueAt(i).onError(null, null);
             }
             mPendingCallbacks.clear();
         }