Merge branch 'master' of https://github.com/lbryio/lbry-android
This commit is contained in:
commit
49971d1453
6 changed files with 23 additions and 6 deletions
|
@ -14,8 +14,8 @@ android {
|
||||||
applicationId "io.lbry.browser"
|
applicationId "io.lbry.browser"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 1600
|
versionCode 1601
|
||||||
versionName "0.16.0"
|
versionName "0.16.1"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,6 +292,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_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_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_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
|
// Internal flags / setting preferences
|
||||||
public static final String PREFERENCE_KEY_INTERNAL_SKIP_WALLET_ACCOUNT = "io.lbry.browser.preference.internal.WalletSkipAccount";
|
public static final String PREFERENCE_KEY_INTERNAL_SKIP_WALLET_ACCOUNT = "io.lbry.browser.preference.internal.WalletSkipAccount";
|
||||||
|
@ -2648,9 +2649,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
try {
|
try {
|
||||||
LbryUri uri = LbryUri.parse(url);
|
LbryUri uri = LbryUri.parse(url);
|
||||||
if (uri.isChannel()) {
|
if (uri.isChannel()) {
|
||||||
openChannelUrl(uri.toString());
|
openChannelUrl(url);
|
||||||
} else {
|
} else {
|
||||||
openFileUrl(uri.toString());
|
openFileUrl(url);
|
||||||
}
|
}
|
||||||
} catch (LbryUriException ex) {
|
} catch (LbryUriException ex) {
|
||||||
// pass
|
// pass
|
||||||
|
|
|
@ -159,7 +159,8 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
||||||
public void onBindViewHolder(NotificationListAdapter.ViewHolder vh, int position) {
|
public void onBindViewHolder(NotificationListAdapter.ViewHolder vh, int position) {
|
||||||
LbryNotification notification = items.get(position);
|
LbryNotification notification = items.get(position);
|
||||||
|
|
||||||
vh.layoutView.setBackgroundColor(ContextCompat.getColor(context, notification.isSeen() ? R.color.white : R.color.nextLbryGreenSemiTransparent));
|
|
||||||
|
vh.layoutView.setBackgroundColor(ContextCompat.getColor(context, notification.isSeen() ? android.R.color.transparent : R.color.nextLbryGreenSemiTransparent));
|
||||||
|
|
||||||
vh.titleView.setVisibility(!Helper.isNullOrEmpty(notification.getTitle()) ? View.VISIBLE : View.GONE);
|
vh.titleView.setVisibility(!Helper.isNullOrEmpty(notification.getTitle()) ? View.VISIBLE : View.GONE);
|
||||||
vh.titleView.setText(notification.getTitle());
|
vh.titleView.setText(notification.getTitle());
|
||||||
|
|
|
@ -298,7 +298,15 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
loadingNewClaim = false;
|
loadingNewClaim = false;
|
||||||
}
|
}
|
||||||
} else if (playbackState == Player.STATE_BUFFERING) {
|
} 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
|
// we only want to log a buffer event after the media has already started playing
|
||||||
String mediaSourceUrl = getStreamingUrl();
|
String mediaSourceUrl = getStreamingUrl();
|
||||||
long duration = MainActivity.appPlayer.getDuration();
|
long duration = MainActivity.appPlayer.getDuration();
|
||||||
|
|
|
@ -245,6 +245,7 @@
|
||||||
|
|
||||||
<string name="keep_sdk_in_background">Keep the LBRY service running in the background for improved wallet and network performance</string>
|
<string name="keep_sdk_in_background">Keep the LBRY service running in the background for improved wallet and network performance</string>
|
||||||
<string name="participate_in_data_network">Participate in the data network (requires app and background service restart)</string>
|
<string name="participate_in_data_network">Participate in the data network (requires app and background service restart)</string>
|
||||||
|
<string name="send_buffering_events">Send buffering events to LBRY servers</string>
|
||||||
|
|
||||||
<!-- URL suggestions -->
|
<!-- URL suggestions -->
|
||||||
<string name="search_url_title">%1$s - Search</string>
|
<string name="search_url_title">%1$s - Search</string>
|
||||||
|
|
|
@ -64,5 +64,11 @@
|
||||||
app:title="@string/participate_in_data_network"
|
app:title="@string/participate_in_data_network"
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
app:singleLineTitle="false" />
|
app:singleLineTitle="false" />
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
app:key="io.lbry.browser.preference.other.SendBufferingEvents"
|
||||||
|
app:title="@string/send_buffering_events"
|
||||||
|
app:defaultValue="true"
|
||||||
|
app:iconSpaceReserved="false"
|
||||||
|
app:singleLineTitle="false" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Reference in a new issue