if ( intentAction != null && intentAction.length() > 1 ) {
if ( MusicService.FXJ_MUSIC_PLAY.equals( intentAction ) ) {
play();
}
else if ( MusicService.FXJ_MUSIC_PAUSE.equals( intentAction ) ) {
pause();
}
else if ( MusicService.FXJ_MUSIC_NEXT.equals( intentAction ) ) {
next();
}
else if ( MusicService.FXJ_MUSIC_PREV_WEEK.equals( intentAction ) ) {
previous_week();
}
else if ( MusicService.FXJ_MUSIC_PLAY_BY_ID.equals( intentAction ) ) {
int music_id = intent.getIntExtra( FXJ_MUSIC_ID, 0 );
play( music_id );
}
else if ( MusicService.FXJ_MUSIC_PREV.equals( intentAction ) ) {
previous();
}
이렇게 고정된 문자열을 Service에서 비교한다 onStartCommand
이렇게 계속적인 비교 실행시는 더 나은 String.intern()의 사용 것인?
댓글 0