Merge pull request #487 from FineFindus/fix/uri-crash
fix: check if uri is hierarchical
This commit is contained in:
commit
9c7ae9653b
2 changed files with 2 additions and 2 deletions
|
@ -94,7 +94,7 @@ public class SettingsAboutAppFragment extends BaseSettingsFragment<Void> impleme
|
||||||
copyCrashLogItem=new ListItem<>(getString(R.string.sk_settings_copy_crash_log), lastModified, 0, this::onCopyCrashLog)
|
copyCrashLogItem=new ListItem<>(getString(R.string.sk_settings_copy_crash_log), lastModified, 0, this::onCopyCrashLog)
|
||||||
));
|
));
|
||||||
|
|
||||||
if(GithubSelfUpdater.needSelfUpdating()){
|
if(GithubSelfUpdater.needSelfUpdating() && !BuildConfig.BUILD_TYPE.equals("nightly") ){
|
||||||
items.add(enablePreReleasesItem=new CheckableListItem<>(R.string.sk_updater_enable_pre_releases, 0, CheckableListItem.Style.SWITCH, GlobalUserPreferences.enablePreReleases, i->toggleCheckableItem(enablePreReleasesItem)));
|
items.add(enablePreReleasesItem=new CheckableListItem<>(R.string.sk_updater_enable_pre_releases, 0, CheckableListItem.Style.SWITCH, GlobalUserPreferences.enablePreReleases, i->toggleCheckableItem(enablePreReleasesItem)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class Tracking{
|
||||||
@NonNull
|
@NonNull
|
||||||
public static String removeTrackingParameters(@NonNull String url){
|
public static String removeTrackingParameters(@NonNull String url){
|
||||||
Uri uri=Uri.parse(url);
|
Uri uri=Uri.parse(url);
|
||||||
if(uri==null)
|
if(uri==null || !uri.isHierarchical())
|
||||||
return url;
|
return url;
|
||||||
Uri.Builder uriBuilder=uri.buildUpon().clearQuery();
|
Uri.Builder uriBuilder=uri.buildUpon().clearQuery();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue