Merge branch 'dev' into dev
This commit is contained in:
commit
eafceb8a6c
|
@ -35,12 +35,6 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".player.old.PlayVideoActivity"
|
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
|
||||||
android:theme="@style/OldVideoPlayerTheme"
|
|
||||||
tools:ignore="UnusedAttribute"/>
|
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".player.BackgroundPlayer"
|
android:name=".player.BackgroundPlayer"
|
||||||
android:exported="false">
|
android:exported="false">
|
||||||
|
@ -183,6 +177,19 @@
|
||||||
<category android:name="android.intent.category.DEFAULT"/>
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
<category android:name="android.intent.category.BROWSABLE"/>
|
<category android:name="android.intent.category.BROWSABLE"/>
|
||||||
|
|
||||||
|
<data android:scheme="http"/>
|
||||||
|
<data android:scheme="https"/>
|
||||||
|
<data android:host="www.youtube-nocookie.com"/>
|
||||||
|
<data android:pathPrefix="/embed/"/>
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW"/>
|
||||||
|
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
|
||||||
|
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
|
<category android:name="android.intent.category.BROWSABLE"/>
|
||||||
|
|
||||||
<data android:scheme="vnd.youtube"/>
|
<data android:scheme="vnd.youtube"/>
|
||||||
<data android:scheme="vnd.youtube.launch"/>
|
<data android:scheme="vnd.youtube.launch"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.schabi.newpipe.extractor.StreamingService;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||||
import org.schabi.newpipe.extractor.search.SearchExtractor;
|
import org.schabi.newpipe.extractor.search.SearchExtractor;
|
||||||
import org.schabi.newpipe.extractor.search.SearchInfo;
|
import org.schabi.newpipe.extractor.search.SearchInfo;
|
||||||
|
import org.schabi.newpipe.util.FireTvUtils;
|
||||||
import org.schabi.newpipe.fragments.BackPressable;
|
import org.schabi.newpipe.fragments.BackPressable;
|
||||||
import org.schabi.newpipe.fragments.list.BaseListFragment;
|
import org.schabi.newpipe.fragments.list.BaseListFragment;
|
||||||
import org.schabi.newpipe.local.history.HistoryRecordManager;
|
import org.schabi.newpipe.local.history.HistoryRecordManager;
|
||||||
|
@ -454,6 +455,9 @@ public class SearchFragment
|
||||||
if (isSuggestionsEnabled && errorPanelRoot.getVisibility() != View.VISIBLE) {
|
if (isSuggestionsEnabled && errorPanelRoot.getVisibility() != View.VISIBLE) {
|
||||||
showSuggestionsPanel();
|
showSuggestionsPanel();
|
||||||
}
|
}
|
||||||
|
if(FireTvUtils.isFireTv()){
|
||||||
|
showKeyboardSearch();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
searchEditText.setOnFocusChangeListener((View v, boolean hasFocus) -> {
|
searchEditText.setOnFocusChangeListener((View v, boolean hasFocus) -> {
|
||||||
|
@ -504,7 +508,9 @@ public class SearchFragment
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(TAG, "onEditorAction() called with: v = [" + v + "], actionId = [" + actionId + "], event = [" + event + "]");
|
Log.d(TAG, "onEditorAction() called with: v = [" + v + "], actionId = [" + actionId + "], event = [" + event + "]");
|
||||||
}
|
}
|
||||||
if (event != null
|
if(actionId == EditorInfo.IME_ACTION_PREVIOUS){
|
||||||
|
hideKeyboardSearch();
|
||||||
|
} else if (event != null
|
||||||
&& (event.getKeyCode() == KeyEvent.KEYCODE_ENTER
|
&& (event.getKeyCode() == KeyEvent.KEYCODE_ENTER
|
||||||
|| event.getAction() == EditorInfo.IME_ACTION_SEARCH)) {
|
|| event.getAction() == EditorInfo.IME_ACTION_SEARCH)) {
|
||||||
search(searchEditText.getText().toString(), new String[0], "");
|
search(searchEditText.getText().toString(), new String[0], "");
|
||||||
|
@ -546,7 +552,7 @@ public class SearchFragment
|
||||||
if (searchEditText.requestFocus()) {
|
if (searchEditText.requestFocus()) {
|
||||||
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
|
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
|
||||||
Context.INPUT_METHOD_SERVICE);
|
Context.INPUT_METHOD_SERVICE);
|
||||||
imm.showSoftInput(searchEditText, InputMethodManager.SHOW_IMPLICIT);
|
imm.showSoftInput(searchEditText, InputMethodManager.SHOW_FORCED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -556,8 +562,7 @@ public class SearchFragment
|
||||||
|
|
||||||
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
|
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
|
||||||
Context.INPUT_METHOD_SERVICE);
|
Context.INPUT_METHOD_SERVICE);
|
||||||
imm.hideSoftInputFromWindow(searchEditText.getWindowToken(),
|
imm.hideSoftInputFromWindow(searchEditText.getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN);
|
||||||
InputMethodManager.HIDE_NOT_ALWAYS);
|
|
||||||
|
|
||||||
searchEditText.clearFocus();
|
searchEditText.clearFocus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -626,6 +626,7 @@ public final class PopupVideoPlayer extends Service {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
|
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
|
||||||
super.onLoadingComplete(imageUri, view, loadedImage);
|
super.onLoadingComplete(imageUri, view, loadedImage);
|
||||||
|
if (playerImpl == null) return;
|
||||||
// rebuild notification here since remote view does not release bitmaps,
|
// rebuild notification here since remote view does not release bitmaps,
|
||||||
// causing memory leaks
|
// causing memory leaks
|
||||||
resetNotification();
|
resetNotification();
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class AudioReactor implements AudioManager.OnAudioFocusChangeListener,
|
||||||
private void onAudioFocusLossCanDuck() {
|
private void onAudioFocusLossCanDuck() {
|
||||||
Log.d(TAG, "onAudioFocusLossCanDuck() called");
|
Log.d(TAG, "onAudioFocusLossCanDuck() called");
|
||||||
// Set the volume to 1/10 on ducking
|
// Set the volume to 1/10 on ducking
|
||||||
animateAudio(player.getVolume(), DUCK_AUDIO_TO);
|
player.setVolume(DUCK_AUDIO_TO);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animateAudio(final float from, final float to) {
|
private void animateAudio(final float from, final float to) {
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package org.schabi.newpipe.util;
|
||||||
|
|
||||||
|
import org.schabi.newpipe.App;
|
||||||
|
|
||||||
|
public class FireTvUtils {
|
||||||
|
public static boolean isFireTv(){
|
||||||
|
final String AMAZON_FEATURE_FIRE_TV = "amazon.hardware.fire_tv";
|
||||||
|
return App.getApp().getPackageManager().hasSystemFeature(AMAZON_FEATURE_FIRE_TV);
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,7 +30,9 @@
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_gravity="right|center_vertical"
|
android:layout_gravity="right|center_vertical"
|
||||||
tools:ignore="RtlHardcoded">
|
android:focusable="true"
|
||||||
|
tools:ignore="RtlHardcoded"
|
||||||
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="28dp"
|
android:layout_width="28dp"
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue