Projects >> quran_android >>a02445a5cc1eebc57ffd48282cf124bb47675105

Chunk
Conflicting content
	protected void addActions(){
		if(actionBar != null){
			//actionBar.setTitle("QuranAndroid");
<<<<<<< HEAD
			actionBarActions.put("ACTION_PLAY",
					getIntentAction("ACTION_PLAY", android.R.drawable.ic_media_play));
			actionBarActions.put("ACTION_PAUSE", 
					getIntentAction("ACTION_PAUSE", android.R.drawable.ic_media_pause));
			actionBarActions.put("ACTION_NEXT",
					getIntentAction("ACTION_NEXT", 
							android.R.drawable.ic_media_next));
			actionBarActions.put("ACTION_STOP", 
					getIntentAction("ACTION_STOP", R.drawable.stop));
			actionBarActions.put("ACTION_BOOTMARK",
					getIntentAction("ACTION_BOOTMARK", R.drawable.bookmarks));
			
			actionBar.addAction(actionBarActions.get("ACTION_BOOTMARK"), 
					ACTION_BAR_ACTION_BOOTMARK);
			actionBar.addAction(actionBarActions.get("ACTION_PLAY"), 
					ACTION_BAR_ACTION_PLAY);
			actionBar.addAction(actionBarActions.get("ACTION_PAUSE"), 
					ACTION_BAR_ACTION_PAUSE);
			actionBar.addAction(actionBarActions.get("ACTION_STOP"),
					ACTION_BAR_ACTION_STOP);
			actionBar.addAction(actionBarActions.get("ACTION_NEXT"),
					ACTION_BAR_ACTION_NEXT);	
=======
	        Intent i = new Intent(this, QuranViewActivity.class);
	        i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
	        i.setAction(ACTION_PLAY);
	        Action action = new IntentAction(this, i, android.R.drawable.ic_media_play);	        
	        actionBar.addAction(action);
	        
	        // add pause
	        i =  new Intent(this, QuranViewActivity.class); 
	        i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
	        i.setAction(ACTION_PAUSE);
	        action = new IntentAction(this, i, android.R.drawable.ic_media_pause);
	        actionBar.addAction(action);
	        
	        // add next ayah
	        i =  new Intent(this, QuranViewActivity.class); 
	        i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
	        i.setAction(ACTION_NEXT);
	        action = new IntentAction(this, i, android.R.drawable.ic_media_next);
	        actionBar.addAction(action);
>>>>>>> f92f30969a1889ef83811a621d74afbb04351658
		}
		super.addActions();
	}
Solution content
	protected void addActions(){
		super.addActions();
		if(actionBar != null){
			//actionBar.setTitle("QuranAndroid");
			actionBarActions.put("ACTION_PLAY",
					getIntentAction("ACTION_PLAY", android.R.drawable.ic_media_play));
			actionBarActions.put("ACTION_PAUSE", 
					getIntentAction("ACTION_PAUSE", android.R.drawable.ic_media_pause));
			actionBarActions.put("ACTION_NEXT",
					getIntentAction("ACTION_NEXT", 
							android.R.drawable.ic_media_next));
			actionBarActions.put("ACTION_STOP", 
					getIntentAction("ACTION_STOP", R.drawable.stop));
			actionBarActions.put("ACTION_BOOTMARK",
					getIntentAction("ACTION_BOOTMARK", R.drawable.bookmarks));
			
			actionBar.addAction(actionBarActions.get("ACTION_BOOTMARK"), 
					ACTION_BAR_ACTION_BOOTMARK);
			actionBar.addAction(actionBarActions.get("ACTION_PLAY"), 
					ACTION_BAR_ACTION_PLAY);
			actionBar.addAction(actionBarActions.get("ACTION_PAUSE"), 
					ACTION_BAR_ACTION_PAUSE);
			actionBar.addAction(actionBarActions.get("ACTION_STOP"),
					ACTION_BAR_ACTION_STOP);
			actionBar.addAction(actionBarActions.get("ACTION_NEXT"),
					ACTION_BAR_ACTION_NEXT);	
		}		
	}
File
QuranViewActivity.java
Developer's decision
Manual
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
		super.onNewIntent(intent);
		if(quranAudioPlayer != null){
			String action = intent.getAction();
<<<<<<< HEAD
			if(action.equalsIgnoreCase("ACTION_PLAY")){
				if(quranAudioPlayer.isPaused())
					quranAudioPlayer.resume();
				else{
					Integer[] pageBounds = QuranInfo.getPageBounds(quranPageFeeder.getCurrentPagePosition());
					AyahItem i = QuranAudioLibrary.getAyahItem(getApplicationContext(), pageBounds[0], pageBounds[1], 2);
					quranAudioPlayer.enableRemotePlay(true);
					quranAudioPlayer.play(i);
				}				
			}else if(action.equalsIgnoreCase("ACTION_PAUSE")){
				quranAudioPlayer.pause();
			}else if(action.equalsIgnoreCase("ACTION_BOOTMAR")){

			}else if(action.equalsIgnoreCase("ACTION_NEXT")){
				AyahItem ayah = QuranAudioLibrary.getNextAyahAudioItem(this,
						quranAudioPlayer.getCurrentAyah());
=======
			if(action.equalsIgnoreCase(ACTION_PLAY)){
				Integer[] pageBounds = QuranInfo.getPageBounds(quranPageFeeder.getCurrentPagePosition());
				AyahItem i = QuranAudioLibrary.getAyahItem(getApplicationContext(), pageBounds[0], pageBounds[1], 2);
				quranAudioPlayer.enableRemotePlay(true);
				quranAudioPlayer.play(i);
			}else if(action.equalsIgnoreCase(ACTION_PAUSE)){
				quranAudioPlayer.pause();
			}else if(action.equalsIgnoreCase(ACTION_NEXT)){
				AyahItem ayah = QuranAudioLibrary.getNextAyahAudioItem(this, quranAudioPlayer.getCurrentAyah());
>>>>>>> f92f30969a1889ef83811a621d74afbb04351658
				quranAudioPlayer.play(ayah);
			}else if (action.equalsIgnoreCase("ACTION_STOP")){
				quranAudioPlayer.stop();
Solution content
		super.onNewIntent(intent);
		if(quranAudioPlayer != null){
			String action = intent.getAction();
			if(action.equalsIgnoreCase("ACTION_PLAY")){
				if(quranAudioPlayer.isPaused())
					quranAudioPlayer.resume();
				else{
					Integer[] pageBounds = QuranInfo.getPageBounds(quranPageFeeder.getCurrentPagePosition());
					AyahItem i = QuranAudioLibrary.getAyahItem(getApplicationContext(), pageBounds[0], pageBounds[1], 2);
					quranAudioPlayer.enableRemotePlay(true);
					quranAudioPlayer.play(i);
				}				
			}else if(action.equalsIgnoreCase("ACTION_PAUSE")){
				quranAudioPlayer.pause();
			}else if(action.equalsIgnoreCase("ACTION_BOOTMAR")){

			}else if(action.equalsIgnoreCase("ACTION_NEXT")){
				AyahItem ayah = QuranAudioLibrary.getNextAyahAudioItem(this,
						quranAudioPlayer.getCurrentAyah());
				quranAudioPlayer.play(ayah);
			}else if (action.equalsIgnoreCase("ACTION_STOP")){
				quranAudioPlayer.stop();
File
QuranViewActivity.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable