Fix issue #1780
This commit is contained in:
parent
37aefe99c2
commit
52ce34fae9
4 changed files with 14 additions and 12 deletions
|
@ -445,9 +445,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
audioNotesLayer = new AudioNotesLayer(activity, this);
|
audioNotesLayer = new AudioNotesLayer(activity, this);
|
||||||
activity.getMapView().addLayer(audioNotesLayer, 3.5f);
|
activity.getMapView().addLayer(audioNotesLayer, 3.5f);
|
||||||
if (recordControl == null) {
|
registerWidget(activity);
|
||||||
registerWidget(activity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerMediaListener(AudioManager am) {
|
private void registerMediaListener(AudioManager am) {
|
||||||
|
|
|
@ -296,22 +296,25 @@ public class DownloadActivity extends BaseDownloadActivity {
|
||||||
|| application.getSettings().SHOULD_SHOW_FREE_VERSION_BANNER.get();
|
|| application.getSettings().SHOULD_SHOW_FREE_VERSION_BANNER.get();
|
||||||
|
|
||||||
initFreeVersionBanner();
|
initFreeVersionBanner();
|
||||||
updateFreeVersionBanner();
|
|
||||||
updateBannerInProgress();
|
updateBannerInProgress();
|
||||||
|
|
||||||
if (ctx.getCurrentTab() != UPDATES_TAB_NUMBER) {
|
if (ctx.getCurrentTab() != UPDATES_TAB_NUMBER) {
|
||||||
downloadProgressLayout.setVisibility(View.VISIBLE);
|
downloadProgressLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateBannerInProgress() {
|
public void updateBannerInProgress() {
|
||||||
|
updateBannerInProgress(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateBannerInProgress(boolean showSpace) {
|
||||||
BasicProgressAsyncTask<?, ?, ?, ?> basicProgressAsyncTask = ctx.getDownloadThread().getCurrentRunningTask();
|
BasicProgressAsyncTask<?, ?, ?, ?> basicProgressAsyncTask = ctx.getDownloadThread().getCurrentRunningTask();
|
||||||
final boolean isFinished = basicProgressAsyncTask == null
|
final boolean isFinished = basicProgressAsyncTask == null
|
||||||
|| basicProgressAsyncTask.getStatus() == AsyncTask.Status.FINISHED;
|
|| basicProgressAsyncTask.getStatus() == AsyncTask.Status.FINISHED;
|
||||||
if (isFinished) {
|
if (isFinished) {
|
||||||
downloadProgressLayout.setOnClickListener(null);
|
downloadProgressLayout.setOnClickListener(null);
|
||||||
updateDescriptionTextWithSize(ctx, downloadProgressLayout);
|
updateDescriptionTextWithSize(ctx, downloadProgressLayout);
|
||||||
if (ctx.getCurrentTab() == UPDATES_TAB_NUMBER) {
|
if (ctx.getCurrentTab() == UPDATES_TAB_NUMBER || !showSpace) {
|
||||||
downloadProgressLayout.setVisibility(View.GONE);
|
downloadProgressLayout.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
updateFreeVersionBanner();
|
updateFreeVersionBanner();
|
||||||
|
@ -373,6 +376,7 @@ public class DownloadActivity extends BaseDownloadActivity {
|
||||||
});
|
});
|
||||||
laterButton.setOnClickListener(new ToggleCollapseFreeVersionBanner(freeVersionDescriptionTextView,
|
laterButton.setOnClickListener(new ToggleCollapseFreeVersionBanner(freeVersionDescriptionTextView,
|
||||||
buttonsLinearLayout, freeVersionBannerTitle, application.getSettings()));
|
buttonsLinearLayout, freeVersionBannerTitle, application.getSettings()));
|
||||||
|
updateFreeVersionBanner();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFreeVersionBanner() {
|
private void updateFreeVersionBanner() {
|
||||||
|
|
|
@ -153,7 +153,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
||||||
@Override
|
@Override
|
||||||
public void newDownloadIndexes() {
|
public void newDownloadIndexes() {
|
||||||
if(banner != null) {
|
if(banner != null) {
|
||||||
banner.updateBannerInProgress();
|
banner.updateBannerInProgress(false);
|
||||||
}
|
}
|
||||||
reloadData();
|
reloadData();
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
||||||
@Override
|
@Override
|
||||||
public void downloadHasFinished() {
|
public void downloadHasFinished() {
|
||||||
if(banner != null) {
|
if(banner != null) {
|
||||||
banner.updateBannerInProgress();
|
banner.updateBannerInProgress(false);
|
||||||
}
|
}
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
||||||
@Override
|
@Override
|
||||||
public void downloadInProgress() {
|
public void downloadInProgress() {
|
||||||
if(banner != null) {
|
if(banner != null) {
|
||||||
banner.updateBannerInProgress();
|
banner.updateBannerInProgress(false);
|
||||||
}
|
}
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
||||||
@Override
|
@Override
|
||||||
public void newDownloadIndexes() {
|
public void newDownloadIndexes() {
|
||||||
if(banner != null) {
|
if(banner != null) {
|
||||||
banner.updateBannerInProgress();
|
banner.updateBannerInProgress(false);
|
||||||
}
|
}
|
||||||
updateSearchText(searchText);
|
updateSearchText(searchText);
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
||||||
@Override
|
@Override
|
||||||
public void downloadHasFinished() {
|
public void downloadHasFinished() {
|
||||||
if(banner != null) {
|
if(banner != null) {
|
||||||
banner.updateBannerInProgress();
|
banner.updateBannerInProgress(false);
|
||||||
}
|
}
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
||||||
@Override
|
@Override
|
||||||
public void downloadInProgress() {
|
public void downloadInProgress() {
|
||||||
if(banner != null) {
|
if(banner != null) {
|
||||||
banner.updateBannerInProgress();
|
banner.updateBannerInProgress(false);
|
||||||
}
|
}
|
||||||
listAdapter.notifyDataSetChanged();
|
listAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue