mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 04:55:29 +03:00
Fix a cursor crash for real
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
93643269a8
commit
8057430eca
1 changed files with 2 additions and 6 deletions
|
@ -80,8 +80,6 @@ public class RingtoneSelectionController extends BaseController implements Flexi
|
|||
private MediaPlayer mediaPlayer;
|
||||
private Handler cancelMediaPlayerHandler;
|
||||
|
||||
private Cursor cursor;
|
||||
|
||||
public RingtoneSelectionController(Bundle args) {
|
||||
super(args);
|
||||
setHasOptionsMenu(true);
|
||||
|
@ -182,7 +180,7 @@ public class RingtoneSelectionController extends BaseController implements Flexi
|
|||
manager.setType(RingtoneManager.TYPE_NOTIFICATION);
|
||||
}
|
||||
|
||||
cursor = manager.getCursor();
|
||||
Cursor cursor = manager.getCursor();
|
||||
|
||||
NotificationSoundItem notificationSoundItem;
|
||||
|
||||
|
@ -214,6 +212,7 @@ public class RingtoneSelectionController extends BaseController implements Flexi
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
adapter.updateDataSet(abstractFlexibleItemList, true);
|
||||
|
@ -299,9 +298,6 @@ public class RingtoneSelectionController extends BaseController implements Flexi
|
|||
@Override
|
||||
public void onDestroy() {
|
||||
endMediaPlayer();
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue