99import android .media .AudioManager ;
1010import android .media .MediaPlayer ;
1111import android .opengl .GLSurfaceView ;
12- //import android.support.v7.app.ActionBarActivity;
1312import android .os .Bundle ;
1413import android .preference .PreferenceManager ;
1514import android .util .Log ;
2120import android .widget .Button ;
2221import android .widget .CheckBox ;
2322import android .widget .CompoundButton ;
24- import android .widget .LinearLayout ;
2523import android .widget .RelativeLayout ;
24+ import java .util .HashMap ;
2625
2726import org .mobicents .restcomm .android .client .sdk .RCClient ;
2827import org .mobicents .restcomm .android .client .sdk .RCConnection ;
2928import org .mobicents .restcomm .android .client .sdk .RCConnectionListener ;
3029import org .mobicents .restcomm .android .client .sdk .RCDevice ;
31- import org .mobicents .restcomm .android .client .sdk .RCDeviceListener ;
32- import org .mobicents .restcomm .android .client .sdk .RCPresenceEvent ;
33-
34- import java .util .HashMap ;
35-
3630
3731public class CallActivity extends Activity implements RCConnectionListener , View .OnClickListener ,
3832 CompoundButton .OnCheckedChangeListener , AudioManager .OnAudioFocusChangeListener {
@@ -58,7 +52,6 @@ public class CallActivity extends Activity implements RCConnectionListener, View
5852 @ Override
5953 protected void onCreate (Bundle savedInstanceState ) {
6054 super .onCreate (savedInstanceState );
61- // #webrtc
6255 // Set window styles for fullscreen-window size. Needs to be done before
6356 // adding content.
6457 requestWindowFeature (Window .FEATURE_NO_TITLE );
@@ -86,11 +79,13 @@ protected void onCreate(Bundle savedInstanceState) {
8679 cbMuted = (CheckBox )findViewById (R .id .checkbox_muted );
8780 cbMuted .setOnCheckedChangeListener (this );
8881 parentLayout = (RelativeLayout ) findViewById (R .id .layout_video_call );
89- //videoView = (GLSurfaceView) findViewById(R.id.glview_call);
9082
9183 audioManager = (AudioManager )getSystemService (Context .AUDIO_SERVICE );
9284 // volume control should be by default 'music' which will control the ringing sounds and 'voice call' when within a call
9385 setVolumeControlStream (AudioManager .STREAM_MUSIC );
86+ // Setup Media (notice that I'm not preparing the media as create does that implicitly plus
87+ // I'm not ever stopping a player -instead I'm pausing so no additional preparation is needed
88+ // there either. We might need to revisit this at some point though
9489 ringingPlayer = MediaPlayer .create (getApplicationContext (), R .raw .ringing );
9590 ringingPlayer .setAudioStreamType (AudioManager .STREAM_MUSIC );
9691 ringingPlayer .setLooping (true );
@@ -199,13 +194,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
199194 @ Override
200195 public void onResume () {
201196 super .onResume ();
202- //videoView.onResume();
203- /*
204- activityRunning = true;
205- if (peerConnectionClient != null) {
206- peerConnectionClient.startVideoSource();
207- }
208- */
209197 }
210198
211199 // RCConnection Listeners
0 commit comments