[Android] rename startPrefs to restart + use it only where it is needed
Sébastien Toque
git at videolan.org
Mon Dec 17 06:56:48 CET 2012
vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Mon Dec 17 06:52:58 2012 +0100| [315ed178af655ae5595011b99c2370d219a0e0c6] | committer: Sébastien Toque
rename startPrefs to restart + use it only where it is needed
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=315ed178af655ae5595011b99c2370d219a0e0c6
---
vlc-android/src/org/videolan/vlc/AudioService.java | 1 -
vlc-android/src/org/videolan/vlc/LibVLC.java | 2 +-
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 3 ---
vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java | 2 +-
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 1 -
5 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/AudioService.java b/vlc-android/src/org/videolan/vlc/AudioService.java
index 6563303..28af067 100644
--- a/vlc-android/src/org/videolan/vlc/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/AudioService.java
@@ -116,7 +116,6 @@ public class AudioService extends Service {
// Get libVLC instance
try {
- LibVLC.startPrefs(this);
mLibVLC = LibVLC.getInstance();
} catch (LibVlcException e) {
e.printStackTrace();
diff --git a/vlc-android/src/org/videolan/vlc/LibVLC.java b/vlc-android/src/org/videolan/vlc/LibVLC.java
index f836200..0845372 100644
--- a/vlc-android/src/org/videolan/vlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/vlc/LibVLC.java
@@ -141,7 +141,7 @@ public class LibVLC {
*/
public native void setSurface(Surface f);
- public static synchronized void startPrefs(Context context) {
+ public static synchronized void restart() {
if (sInstance != null) {
try {
sInstance.destroy();
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 617366c..e52d642 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -140,9 +140,6 @@ public class MainActivity extends SherlockFragmentActivity {
editor.commit();
}
- /* Start VLC prefs */
- LibVLC.startPrefs(this);
-
try {
// Start LibVLC
LibVLC.getInstance();
diff --git a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
index 15fb381..7caf348 100644
--- a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
@@ -208,7 +208,7 @@ public class PreferencesActivity extends PreferenceActivity implements OnSharedP
key.equalsIgnoreCase("subtitles_text_encoding") ||
key.equalsIgnoreCase("aout") ||
key.equalsIgnoreCase("enable_time_stretching_audio")) {
- LibVLC.startPrefs(this);
+ LibVLC.restart();
}
}
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 36f4fb4..17748db 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -269,7 +269,6 @@ public class VideoPlayerActivity extends Activity {
registerReceiver(mBatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
try {
- LibVLC.startPrefs(this);
mLibVLC = LibVLC.getInstance();
} catch (LibVlcException e) {
Log.d(TAG, "LibVLC initialisation failed");
More information about the Android
mailing list