mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
fixed some merge problems
This commit is contained in:
@@ -134,13 +134,11 @@ public class AudioHandler implements OnCompletionListener, OnPreparedListener, O
|
||||
return duration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepared(MediaPlayer mPlayer) {
|
||||
if (isPlaying) {
|
||||
mPlayer.setOnCompletionListener(this);
|
||||
mPlayer.setOnBufferingUpdateListener(new OnBufferingUpdateListener()
|
||||
{
|
||||
@Override
|
||||
public void onBufferingUpdate(MediaPlayer mPlayer, int percent)
|
||||
{
|
||||
/* TODO: call back, e.g. update outer progress bar */
|
||||
@@ -151,7 +149,6 @@ public class AudioHandler implements OnCompletionListener, OnPreparedListener, O
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onError(MediaPlayer mPlayer, int arg1, int arg2) {
|
||||
Log.e("AUDIO onError", "error " + arg1 + " " + arg2);
|
||||
return false;
|
||||
|
||||
@@ -249,80 +249,56 @@ public class PhoneGap{
|
||||
HttpHandler http = new HttpHandler();
|
||||
http.get(url, file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
<<<<<<< HEAD:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
/*
|
||||
* TODO: FIX! These should not be returning arbitrary Strings!
|
||||
*/
|
||||
public String testSaveLocationExists(){
|
||||
=======
|
||||
/**
|
||||
* Check if SD card is ready and already mounted
|
||||
* TODO: JavaScript Call backs for success and error handling
|
||||
*/
|
||||
|
||||
public int testSaveLocationExists(){
|
||||
>>>>>>> 6959002f1187829f33e279633e0446cc750ab6d3:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
if (fileManager.testSaveLocationExists())
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
<<<<<<< HEAD:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
public String testFileExists(String file){
|
||||
|
||||
public int testFileExists(String file){
|
||||
if (fileManager.testFileExists(file))
|
||||
return "File exists";
|
||||
=======
|
||||
|
||||
/**
|
||||
* Check if a specific directory of file exists
|
||||
* TODO: JavaScript Call backs for success and error handling
|
||||
*/
|
||||
public int testDirOrFileExists(String file){
|
||||
if (fileManager.isDirtoryOrFileExists(file))
|
||||
return 0;
|
||||
>>>>>>> 6959002f1187829f33e279633e0446cc750ab6d3:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
<<<<<<< HEAD:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
|
||||
public String deleteDirectory (String dir){
|
||||
if (fileManager.deleteDirectory(dir))
|
||||
return "Completed";
|
||||
=======
|
||||
public int testDirectoryExists(String file){
|
||||
if (fileManager.testFileExists(file))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a specific directory.
|
||||
* Everyting in side the directory would be gone.
|
||||
* TODO: JavaScript Call backs for success and error handling
|
||||
*/
|
||||
public int deleteDirectory (String dir){
|
||||
if (fileManager.deleteDir(dir))
|
||||
if (fileManager.deleteDirectory(dir))
|
||||
return 0;
|
||||
>>>>>>> 6959002f1187829f33e279633e0446cc750ab6d3:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
public String deleteFile (String file){
|
||||
=======
|
||||
|
||||
/**
|
||||
* Delete a specific file.
|
||||
* TODO: JavaScript Call backs for success and error handling
|
||||
*/
|
||||
public int deleteFile (String file){
|
||||
>>>>>>> 6959002f1187829f33e279633e0446cc750ab6d3:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
if (fileManager.deleteFile(file))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
public String createDirectory(String dir){
|
||||
if (fileManager.createDirectory(dir))
|
||||
return "Completed";
|
||||
=======
|
||||
|
||||
/**
|
||||
* Create a new directory.
|
||||
* TODO: JavaScript Call backs for success and error handling
|
||||
@@ -330,11 +306,11 @@ public class PhoneGap{
|
||||
public int createDirectory(String dir){
|
||||
if (fileManager.createDirectory(dir))
|
||||
return 0;
|
||||
>>>>>>> 6959002f1187829f33e279633e0446cc750ab6d3:android/src/com/nitobi/phonegap/PhoneGap.java
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* AUDIO
|
||||
* TODO: Basic functions done but needs more work on error handling and call backs, remove record hack
|
||||
|
||||
Reference in New Issue
Block a user