Skip to content

Commit

Permalink
Fixed some exception issue on some phones.
Browse files Browse the repository at this point in the history
Signed-off-by: Zhou Chang <[email protected]>
  • Loading branch information
Teaonly committed Nov 3, 2012
1 parent 0095ca9 commit e53f7c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="teaonly.droideye"
android:versionCode="4"
android:versionName="1.3">
android:versionCode="5"
android:versionName="1.4">
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:name="MainActivity"
android:label="@string/app_name"
Expand Down
2 changes: 1 addition & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<string name="msg_access_local">Open at local: </string>
<string name="msg_access_internet">Open at internet: </string>
<string name="msg_access_query">Detecting internet ... </string>
<string name="msg_access_query_error">Can not be opened at internet</string>
<string name="msg_access_query_error">Setup router manually to open at internet</string>
<string name="msg_error">Error: Please enable wifi</string>
</resources>
8 changes: 6 additions & 2 deletions src/teaonly/droideye/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void onPause(){
cameraView_.StopPreview();
//cameraView_.Release();
audioLoop.ReleaseLoop();
audioCapture.release();

//System.exit(0);
finish();
Expand Down Expand Up @@ -181,8 +182,11 @@ private void initAudio() {
minTargetSize);
}

if ( audioLoop == null)
audioLoop = new StreamingLoop("teaonly.droideye");
if ( audioLoop == null) {
Random rnd = new Random();
String etag = Integer.toHexString( rnd.nextInt() );
audioLoop = new StreamingLoop("teaonly.droideye" + etag );
}

}

Expand Down

0 comments on commit e53f7c0

Please sign in to comment.