[Android] Clear data app directly from Android app info view for TV
Alexandre Perraud
git at videolan.org
Fri Feb 10 17:08:59 CET 2017
vlc-android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Fri Feb 10 17:00:54 2017 +0100| [c716515806d7e79c92e3960541308bfcb924972f] | committer: Alexandre Perraud
Clear data app directly from Android app info view for TV
> https://code.videolan.org/videolan/vlc-android/commit/c716515806d7e79c92e3960541308bfcb924972f
---
.../vlc/gui/tv/preferences/PreferencesAdvanced.java | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
index 059a594..0c58537 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
@@ -30,21 +30,18 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
+import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.preference.EditTextPreference;
import android.support.v7.preference.Preference;
import android.text.TextUtils;
-import android.widget.Toast;
import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.vlc.BuildConfig;
-import org.videolan.vlc.MediaParsingService;
import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.gui.DebugLogActivity;
-import org.videolan.vlc.gui.helpers.AudioUtil;
-import org.videolan.vlc.gui.helpers.BitmapCache;
import org.videolan.vlc.gui.helpers.UiTools;
import org.videolan.vlc.util.VLCInstance;
@@ -108,10 +105,10 @@ public class PreferencesAdvanced extends BasePreferenceFragment implements Share
.setNegativeButton(android.R.string.cancel, null).show();
return true;
case "clear_media_db":
- getActivity().startService(new Intent(MediaParsingService.ACTION_RELOAD, null, getActivity(), MediaParsingService.class));
- BitmapCache.getInstance().clear();
- AudioUtil.clearCacheFolders();
- Toast.makeText(VLCApplication.getAppContext(), R.string.media_db_cleared, Toast.LENGTH_SHORT).show();
+ Intent i = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+ i.addCategory(Intent.CATEGORY_DEFAULT);
+ i.setData(Uri.parse("package:" + VLCApplication.getAppContext().getPackageName()));
+ startActivity(i);
return true;
case "quit_app":
android.os.Process.killProcess(android.os.Process.myPid());
More information about the Android
mailing list