File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
core/java/com/android/internal/app Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,9 @@ public final class RingtonePickerActivity extends AlertActivity implements
4747 private static final String TAG = "RingtonePickerActivity" ;
4848
4949 private static final int DELAY_MS_SELECTION_PLAYED = 300 ;
50-
50+
51+ private static final String SAVE_CLICKED_POS = "clicked_pos" ;
52+
5153 private RingtoneManager mRingtoneManager ;
5254
5355 private Cursor mCursor ;
@@ -120,7 +122,10 @@ protected void onCreate(Bundle savedInstanceState) {
120122 if (mUriForDefaultItem == null ) {
121123 mUriForDefaultItem = Settings .System .DEFAULT_RINGTONE_URI ;
122124 }
123-
125+
126+ if (savedInstanceState != null ) {
127+ mClickedPos = savedInstanceState .getInt (SAVE_CLICKED_POS , -1 );
128+ }
124129 // Get whether to show the 'Silent' item
125130 mHasSilentItem = intent .getBooleanExtra (RingtoneManager .EXTRA_RINGTONE_SHOW_SILENT , true );
126131
@@ -167,6 +172,12 @@ protected void onCreate(Bundle savedInstanceState) {
167172 setupAlert ();
168173 }
169174
175+ @ Override
176+ public void onSaveInstanceState (Bundle outState ) {
177+ super .onSaveInstanceState (outState );
178+ outState .putInt (SAVE_CLICKED_POS , mClickedPos );
179+ }
180+
170181 public void onPrepareListView (ListView listView ) {
171182
172183 if (mHasDefaultItem ) {
You can’t perform that action at this time.
0 commit comments