光环助手V4.1.0-安装游戏支持解压xapk文件(20200710补充) https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/896

This commit is contained in:
kehaoyuan
2020-07-13 11:16:31 +08:00
parent 49b0b982f5
commit f83f719283
17 changed files with 223 additions and 39 deletions

View File

@ -45,6 +45,7 @@ import com.gh.common.view.LimitHeightLinearLayout;
import com.gh.common.view.MaxHeightNestedScrollView;
import com.gh.gamecenter.AboutActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.SuggestionActivity;
import com.gh.gamecenter.WebActivity;
import com.gh.gamecenter.adapter.viewholder.PrivacyPolicyItemViewHolder;
import com.gh.gamecenter.databinding.ImprintContentItemBinding;
@ -54,9 +55,11 @@ import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.PrivacyPolicyEntity;
import com.gh.gamecenter.entity.SettingsEntity;
import com.gh.gamecenter.entity.TrackableEntity;
import com.gh.gamecenter.suggest.SuggestType;
import com.halo.assistant.HaloApp;
import com.halo.assistant.fragment.SettingsFragment;
import com.lightgame.adapter.BaseRecyclerAdapter;
import com.lightgame.download.DownloadEntity;
import com.lightgame.utils.AppManager;
import com.lightgame.utils.Utils;
@ -1368,16 +1371,16 @@ public class DialogUtils {
dialog.show();
}
public static void showUnzipFailureDialog(Context context, ConfirmListener confirmListener) {
context = checkDialogContext(context);
public static void showUnzipFailureDialog(Context context, DownloadEntity downloadEntity) {
final Context activityContext = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.GhAlertDialog);
final Dialog dialog = new Dialog(activityContext, R.style.GhAlertDialog);
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawableResource(android.R.color.transparent);
}
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_unzip_failure, null);
View contentView = LayoutInflater.from(activityContext).inflate(R.layout.dialog_unzip_failure, null);
View cancelBtn = contentView.findViewById(R.id.cancel);
View confirmBtn = contentView.findViewById(R.id.confirm);
@ -1389,7 +1392,8 @@ public class DialogUtils {
confirmBtn.setOnClickListener(v -> {
dialog.dismiss();
confirmListener.onConfirm();
String hint = "" + downloadEntity.getName() + "》游戏安装包解压失败,问题反馈:";
SuggestionActivity.startSuggestionActivity(activityContext, SuggestType.normal, null, hint);
});
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);