forked from organicmaps/organicmaps
[android] error processing
This commit is contained in:
parent
cb76413b39
commit
3c56b11eaa
2 changed files with 17 additions and 4 deletions
|
@ -70,14 +70,16 @@
|
|||
</FrameLayout>
|
||||
<TextView
|
||||
android:id="@+id/cancel_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/height_block_base"
|
||||
android:layout_marginLeft="@dimen/margin_base"
|
||||
android:layout_marginRight="@dimen/margin_base"
|
||||
android:layout_marginBottom="@dimen/margin_base"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body1.Secondary"
|
||||
android:textColor="?buttonDialogTextColor"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:background="?clickableBackground"
|
||||
tools:text="Manually update later"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.mapswithme.maps.base.BaseMwmDialogFragment;
|
|||
import com.mapswithme.util.Constants;
|
||||
import com.mapswithme.util.StringUtils;
|
||||
import com.mapswithme.util.UiUtils;
|
||||
import com.mapswithme.util.Utils;
|
||||
import com.mapswithme.util.statistics.Statistics;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -80,8 +81,18 @@ public class UpdaterDialogFragment extends BaseMwmDialogFragment
|
|||
text = String.valueOf(item.errorCode);
|
||||
}
|
||||
Statistics.INSTANCE.trackDownloaderDialogError(mTotalSizeMb, text);
|
||||
MapManager.showError(getActivity(), item, null);
|
||||
dismiss();
|
||||
MapManager.showError(getActivity(), item, new Utils.Proc<Boolean>()
|
||||
{
|
||||
@Override
|
||||
public void invoke(@NonNull Boolean param)
|
||||
{
|
||||
if (param)
|
||||
MapManager.nativeUpdate(CountryItem.getRootId());
|
||||
else
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue