Manual cp of ag/9958222

Grant focus to list view in Rington selection Activity

This allows the RSB to work properly in this activity.

Test: unable to test because salmon has no RSB and speaker
Change-Id: I7cd8470f9cfc0b2441b1de09f4c52ecc85efd84e
diff --git a/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java b/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java
index 504e18a..56b940c 100644
--- a/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java
+++ b/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java
@@ -256,6 +256,14 @@
         }
 
         setupAlert();
+
+        ListView listView = mAlert.getListView();
+        if (listView != null) {
+            // List view needs to gain focus in order for RSB to work.
+            if (!listView.requestFocus()) {
+                Log.e(TAG, "Unable to gain focus! RSB may not work properly.");
+            }
+        }
     }
     @Override
     public void onSaveInstanceState(Bundle outState) {