[Android] Fix popup mode for Android 2.x
Geoffrey Métais
git at videolan.org
Mon Apr 18 18:05:56 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Apr 18 18:05:37 2016 +0200| [40e961194e513fb921f1110aec5e049ebc65ded6] | committer: Geoffrey Métais
Fix popup mode for Android 2.x
> https://code.videolan.org/videolan/vlc-android/commit/40e961194e513fb921f1110aec5e049ebc65ded6
---
vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
index ce94a34..c299629 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
@@ -277,9 +277,9 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
private void setViewSize(int width, int height) {
Point size = new Point();
WindowManager.LayoutParams lp = null;
+ lp = (WindowManager.LayoutParams) mRootView.getLayoutParams();
if (AndroidUtil.isHoneycombOrLater()) {
mWindowManager.getDefaultDisplay().getSize(size);
- lp = (WindowManager.LayoutParams) mRootView.getLayoutParams();
if (width > size.x) {
height = height * size.x / width;
width = size.x;
@@ -412,11 +412,7 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
builder.addAction(R.drawable.ic_popup_expand_w, mService.getString(R.string.popup_expand), piExpand);
Notification notification = builder.build();
- if (!AndroidUtil.isLolliPopOrLater() || mService.isPlaying())
- mService.startForeground(42, notification);
- else {
- NotificationManagerCompat.from(mService).notify(42, notification);
- }
+ NotificationManagerCompat.from(mService).notify(42, notification);
}
private void hideNotification() {
More information about the Android
mailing list