From b11c07e3d1ec2f9b7762c3e84dadd3ec3c56f6d5 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 28 Aug 2020 10:00:57 +0100 Subject: [PATCH 1/4] fix comment redirect from device notifications --- app/src/main/java/io/lbry/browser/MainActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 5027b7d5..a0789f3c 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -2730,9 +2730,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener try { LbryUri uri = LbryUri.parse(url); if (uri.isChannel()) { - openChannelUrl(uri.toString()); + openChannelUrl(url); } else { - openFileUrl(uri.toString()); + openFileUrl(url); } } catch (LbryUriException ex) { // pass From 0620582a4eda0313ddb958234feb8fc6434f3bcb Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 28 Aug 2020 10:04:10 +0100 Subject: [PATCH 2/4] fix in-app notification read background in dark mode --- .../java/io/lbry/browser/adapter/NotificationListAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java b/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java index a948a7ee..cfdba94c 100644 --- a/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java +++ b/app/src/main/java/io/lbry/browser/adapter/NotificationListAdapter.java @@ -159,7 +159,8 @@ public class NotificationListAdapter extends RecyclerView.Adapter Date: Fri, 28 Aug 2020 11:06:41 +0200 Subject: [PATCH 3/4] Add setting to enable sending buffering events (#993) * Add setting to enable sending buffering events * Use true as default value --- app/src/main/java/io/lbry/browser/MainActivity.java | 1 + .../lbry/browser/ui/findcontent/FileViewFragment.java | 10 +++++++++- app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/settings.xml | 6 ++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index a0789f3c..1e2dde9d 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -311,6 +311,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener public static final String PREFERENCE_KEY_NOTIFICATION_CREATOR = "io.lbry.browser.preference.notifications.Creator"; public static final String PREFERENCE_KEY_KEEP_SDK_BACKGROUND = "io.lbry.browser.preference.other.KeepSdkInBackground"; public static final String PREFERENCE_KEY_PARTICIPATE_DATA_NETWORK = "io.lbry.browser.preference.other.ParticipateInDataNetwork"; + public static final String PREFERENCE_KEY_SEND_BUFFERING_EVENTS = "io.lbry.browser.preference.other.SendBufferingEvents"; // Internal flags / setting preferences public static final String PREFERENCE_KEY_INTERNAL_SKIP_WALLET_ACCOUNT = "io.lbry.browser.preference.internal.WalletSkipAccount"; diff --git a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java index d78c9e39..3dc97711 100644 --- a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java @@ -298,7 +298,15 @@ public class FileViewFragment extends BaseFragment implements loadingNewClaim = false; } } else if (playbackState == Player.STATE_BUFFERING) { - if (MainActivity.appPlayer != null && MainActivity.appPlayer.getCurrentPosition() > 0) { + Context ctx = getContext(); + boolean sendBufferingEvents = true; + + if (ctx != null) { + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(ctx); + sendBufferingEvents = sp.getBoolean(MainActivity.PREFERENCE_KEY_SEND_BUFFERING_EVENTS, true); + } + + if (MainActivity.appPlayer != null && MainActivity.appPlayer.getCurrentPosition() > 0 && sendBufferingEvents) { // we only want to log a buffer event after the media has already started playing String mediaSourceUrl = getStreamingUrl(); long duration = MainActivity.appPlayer.getDuration(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 92016e96..4f45dd59 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -245,6 +245,7 @@ Keep the LBRY service running in the background for improved wallet and network performance Participate in the data network (requires app and background service restart) + Send buffering events to LBRY servers %1$s - Search diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index 8e9647bf..25af5cb7 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -64,5 +64,11 @@ app:title="@string/participate_in_data_network" app:iconSpaceReserved="false" app:singleLineTitle="false" /> + \ No newline at end of file From 08c38c172333fb5889478e5b1dbf409a6e64095e Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 28 Aug 2020 10:07:20 +0100 Subject: [PATCH 4/4] bumpversion 0.16.0 --> 0.16.1 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1c2f39da..56c348ec 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,8 +16,8 @@ android { applicationId "io.lbry.browser" minSdkVersion 21 targetSdkVersion 29 - versionCode 1600 - versionName "0.16.0" + versionCode 1601 + versionName "0.16.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" }