Android OpenSlDemo: remove some usages of deprecated APIs that is breaking the bots.

TBR=fischman@webrtc.org

BUG=N/A

Review URL: https://webrtc-codereview.appspot.com/2395004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4956 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrike@webrtc.org 2013-10-14 16:25:11 +00:00
parent 19f27e6a24
commit 05773e5a70

View File

@ -15,8 +15,6 @@ import android.content.Context;
import android.content.pm.ActivityInfo;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@ -27,8 +25,6 @@ public class OpenSlDemo extends Activity implements View.OnClickListener {
private Button btStartStopCall;
private boolean isRunning = false;
private WakeLock wakeLock;
private OpenSlRunner runner;
// Called when activity is created.
@ -36,12 +32,6 @@ public class OpenSlDemo extends Activity implements View.OnClickListener {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PowerManager pm = (PowerManager)this.getSystemService(
Context.POWER_SERVICE);
wakeLock = pm.newWakeLock(
PowerManager.SCREEN_DIM_WAKE_LOCK, TAG);
wakeLock.acquire(); // Keep screen on until app terminates.
setContentView(R.layout.open_sl_demo);
// Direct hardware volume controls to affect the voice call audio stream.
@ -61,7 +51,6 @@ public class OpenSlDemo extends Activity implements View.OnClickListener {
@Override
public void onDestroy() {
Log.d(TAG, "onDestroy");
wakeLock.release();
super.onDestroy();
}