Skip to content

Commit

Permalink
v1.5.438
Browse files Browse the repository at this point in the history
- bump gradle
- fix compat with android < 5.0
- fix crash in videooverlayfragment
  • Loading branch information
sreichholf committed Jan 8, 2020
1 parent 2f55f97 commit 3affa3f
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 29 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
apply plugin: 'com.android.application'
Expand Down Expand Up @@ -43,7 +43,7 @@ dependencies {
implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.18'
implementation 'com.github.StephenVinouze:MaterialNumberPicker:1.0.5'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:4.2.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.7'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.wdullaer:materialdatetimepicker:4.2.3'
implementation 'commons-net:commons-net:3.6'
Expand All @@ -67,8 +67,8 @@ android {
buildToolsVersion project.BUILD_TOOLS_VERSION

defaultConfig {
versionCode 437
versionName="1.5.437"
versionCode 438
versionName="1.5.438"
minSdkVersion 17
targetSdkVersion 29
multiDexEnabled true
Expand Down
4 changes: 4 additions & 0 deletions app/res/raw-de/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.5.438
* FIX: Kompatibilität mit Android < 5.0 wiederhergestellt
* FIX: Absturz beim Streamen behoben

## 1.5.437
* DEL: Auto-Theme-Wahl und mit ihr die Berechtigung für die grobe Position
* DEL: Die Funktion "Spenden" wurde ersatzlos gestrichen (~75% einer Spende wurden durch Google/Steuern aufgefressen)
Expand Down
4 changes: 4 additions & 0 deletions app/res/raw/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.5.438
* FIX: restore compatibility with Android < 5.0
* FIX: crash when streaming

## 1.5.437
* DEL: Auto-Theme selection and with that the coarse location permission have been dropped
* DEL: Donations have been removed with no intention for any replacement (~70% of any donation got eaten up by google and local taxes)
Expand Down
52 changes: 29 additions & 23 deletions app/src/net/reichholf/dreamdroid/fragment/VideoOverlayFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,25 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowManager;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageButton;
import androidx.core.view.GestureDetectorCompat;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.leanback.widget.HorizontalGridView;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import net.reichholf.dreamdroid.DreamDroid;
import net.reichholf.dreamdroid.R;
import net.reichholf.dreamdroid.activities.VideoActivity;
Expand Down Expand Up @@ -56,18 +68,6 @@

import java.util.ArrayList;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageButton;
import androidx.core.view.GestureDetectorCompat;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.leanback.widget.HorizontalGridView;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down Expand Up @@ -170,6 +170,20 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.video_player_overlay, container, false);
ButterKnife.bind(this, view);
mButtonAudioTrack.setOnClickListener(v -> onSelectAudioTrack());
mButtonInfo.setOnClickListener(v -> onInfo());
mButtonList.setOnClickListener(v -> onList());
mButtonSubtitleTrack.setOnClickListener(v -> onSelectSubtitleTrack());
mButtonRewind.setOnTouchListener(new OnRepeatListener(v -> onRewind()));
mButtonPlay.setOnClickListener(v -> onPlay());
mButtonForward.setOnTouchListener(new OnRepeatListener(v -> onForward()));

return view;
}

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (mServicesView != null) {
if (DreamDroid.isTV(getContext())) {
HorizontalGridView gridView = (HorizontalGridView) mServicesView;
Expand Down Expand Up @@ -240,15 +254,6 @@ public boolean onSingleTapUp(MotionEvent e) {
mGestureDector.onTouchEvent(event);
return true;
});
mButtonAudioTrack.setOnClickListener(v -> onSelectAudioTrack());
mButtonInfo.setOnClickListener(v -> onInfo());
mButtonList.setOnClickListener(v -> onList());
mButtonSubtitleTrack.setOnClickListener(v -> onSelectSubtitleTrack());
mButtonRewind.setOnTouchListener(new OnRepeatListener(v -> onRewind()));
mButtonPlay.setOnClickListener(v -> onPlay());
mButtonForward.setOnTouchListener(new OnRepeatListener(v -> onForward()));

return view;
}

protected void onRewind() {
Expand Down Expand Up @@ -548,6 +553,7 @@ private boolean isRecording() {

private void updateViews() {
View view = getView();

TextView title = view.findViewById(R.id.title);
title.setText(mTitle);

Expand Down Expand Up @@ -598,7 +604,7 @@ private void updateViews() {
mButtonInfo.setVisibility(View.GONE);
}
updateProgress();
if (mServicesView != null)
if (mServicesView != null && mServicesView.getAdapter() != null)
mServicesView.getAdapter().notifyDataSetChanged();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import org.apache.commons.io.IOUtils;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

Expand Down Expand Up @@ -41,7 +42,13 @@ public void onStart() {
String changelog = "";
InputStream is = getResources().openRawResource(R.raw.changelog);
try {
changelog = IOUtils.toString(is);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length;
while ((length = is.read(buffer)) != -1) {
baos.write(buffer, 0, length);
}
changelog = baos.toString("UTF-8");
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.android.tools.build:gradle:3.5.3'
}
}

0 comments on commit 3affa3f

Please sign in to comment.