|
|
@@ -1,12 +1,15 @@
|
|
|
package com.sheep.gamegroup.view.activity;
|
|
|
|
|
|
-import android.app.Activity;
|
|
|
-import android.os.Bundle;
|
|
|
+import android.graphics.Color;
|
|
|
import android.os.Handler;
|
|
|
+import android.support.annotation.NonNull;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.util.Log;
|
|
|
+import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
+import android.view.ViewGroup;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.TextView;
|
|
|
import android.widget.Toast;
|
|
|
@@ -16,18 +19,14 @@ import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
|
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
|
import com.sheep.gamegroup.greendao.DDProviderHelper;
|
|
|
import com.sheep.gamegroup.greendao.download.SdkLoginUser;
|
|
|
-import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.util.CertificationUtil;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
-import com.sheep.gamegroup.util.DataUtil;
|
|
|
import com.sheep.gamegroup.util.GlideImageLoader;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
-import com.sheep.gamegroup.view.customview.TextProgressBar;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
-import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
|
|
|
import org.json.JSONException;
|
|
|
@@ -36,6 +35,7 @@ import org.json.JSONObject;
|
|
|
import java.util.List;
|
|
|
|
|
|
import butterknife.BindView;
|
|
|
+import butterknife.ButterKnife;
|
|
|
import butterknife.OnClick;
|
|
|
import rx.functions.Action1;
|
|
|
|
|
|
@@ -46,37 +46,20 @@ import rx.functions.Action1;
|
|
|
|
|
|
public class GameCertificationActivity extends BaseActivity {
|
|
|
|
|
|
- @BindView(R.id.sdk_arrow)
|
|
|
- ImageView sdk_arrow;
|
|
|
@BindView(R.id.icon_iv)
|
|
|
ImageView icon_iv;
|
|
|
@BindView(R.id.app_name_tv)
|
|
|
TextView app_name_tv;
|
|
|
- @BindView(R.id.sdk_user_name)
|
|
|
- TextView sdk_user_name;
|
|
|
- @BindView(R.id.sdk_login_name)
|
|
|
- TextView sdk_login_name;
|
|
|
- @BindView(R.id.sdk_user_code)
|
|
|
- TextView sdk_user_code;
|
|
|
- @BindView(R.id.sdk_user_iv)
|
|
|
- ImageView sdk_user_iv;
|
|
|
- @BindView(R.id.sdk_change_user_list)
|
|
|
- RecyclerView sdk_change_user_list;
|
|
|
@BindView(R.id.loading_view_img)
|
|
|
View loading_view_img;
|
|
|
@BindView(R.id.change_account_tv)
|
|
|
TextView change_account_tv;
|
|
|
- @BindView(R.id.change_commit)
|
|
|
- TextView change_commit;
|
|
|
-
|
|
|
- private Activity activity;
|
|
|
- private Bundle extras;
|
|
|
- private UserEntity userEntity;
|
|
|
+ @BindView(R.id.sdk_change_user_list)
|
|
|
+ RecyclerView listView;
|
|
|
+ SdkUserAdapter listAdapter;
|
|
|
+ private List<SdkLoginUser> userList = ListUtil.emptyList();
|
|
|
private String packageName;
|
|
|
- private TextProgressBar textProgressBar;
|
|
|
- private boolean isChangeAccount;
|
|
|
private String gameToken;
|
|
|
- private String currentToken;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayoutId() {
|
|
|
@@ -85,78 +68,43 @@ public class GameCertificationActivity extends BaseActivity {
|
|
|
|
|
|
@Override
|
|
|
public void initView() {
|
|
|
- currentToken = SpUtils.getToken(this);
|
|
|
- activity = this;
|
|
|
- textProgressBar = new TextProgressBar(activity);
|
|
|
- textProgressBar.setVisibility(View.VISIBLE);
|
|
|
TitleBarUtils.getInstance()
|
|
|
-// .setShowOrHide(this, true)
|
|
|
- .setTitle(activity, "授权登录")
|
|
|
- .setTitleListen(activity, 0, null);
|
|
|
- sdk_change_user_list.setVisibility(View.GONE);
|
|
|
- }
|
|
|
-
|
|
|
- private List<SdkLoginUser> userList = ListUtil.emptyList();
|
|
|
-
|
|
|
- @Override
|
|
|
- public void initListener() {
|
|
|
- sdk_change_user_list.setLayoutManager(new LinearLayoutManager(this));
|
|
|
- sdk_change_user_list.setHasFixedSize(true);
|
|
|
- sdk_change_user_list.setNestedScrollingEnabled(false);
|
|
|
- sdk_change_user_list.setAdapter(new RecyclerViewAdapter<SdkLoginUser>(this, R.layout.include_item_sdk_user, userList) {
|
|
|
+ .setTitle(this, "授权登录")
|
|
|
+ .setTitleListen(this, 0, null);
|
|
|
+ listView.setLayoutManager(new LinearLayoutManager(this));
|
|
|
+ listAdapter = new SdkUserAdapter();
|
|
|
+ listView.setAdapter(listAdapter);
|
|
|
+ listView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
|
|
@Override
|
|
|
- public void convert(ViewHolder viewHolder, final SdkLoginUser item, final int position) {
|
|
|
- ImageView item_sdk_arrow = viewHolder.itemView.findViewById(R.id.item_sdk_arrow);
|
|
|
- ImageView item_sdk_user_iv = viewHolder.itemView.findViewById(R.id.item_sdk_user_iv);
|
|
|
- TextView item_sdk_user_name = viewHolder.itemView.findViewById(R.id.item_sdk_user_name);
|
|
|
- TextView item_sdk_user_code = viewHolder.itemView.findViewById(R.id.item_sdk_user_code);
|
|
|
- View item_sdk_user_line = viewHolder.itemView.findViewById(R.id.item_sdk_user_line);
|
|
|
- ViewUtil.setVisibility2(item_sdk_user_line, position != 0);
|
|
|
- ViewUtil.setText(item_sdk_user_name, item.getNickname());
|
|
|
- ViewUtil.setText(item_sdk_user_code, item.getInvitation_code());
|
|
|
- GlideImageLoader.setAvatar(item_sdk_user_iv, item.getAvatar());
|
|
|
- item_sdk_arrow.setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
- DDProviderHelper.getInstance().deleteSdkLoginUser(item);
|
|
|
- try {
|
|
|
- userList.remove(position);
|
|
|
- sdk_change_user_list.getAdapter().notifyDataSetChanged();
|
|
|
- ViewUtil.setVisibility(sdk_change_user_list, !userList.isEmpty() && isUserListOpen);
|
|
|
- ViewUtil.setVisibility2(sdk_arrow, !userList.isEmpty());
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
- CertificationUtil.newInstance().authCertificationCode(activity, item.getToken());
|
|
|
- }
|
|
|
- });
|
|
|
+ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
|
|
+ int offset = recyclerView.computeVerticalScrollOffset();
|
|
|
+ int distance = getResources().getDimensionPixelSize(R.dimen.game_certification_scroll);
|
|
|
+ if (offset > distance) {
|
|
|
+ icon_iv.setAlpha(0f);
|
|
|
+ app_name_tv.setAlpha(0f);
|
|
|
+ } else {
|
|
|
+ icon_iv.setAlpha((float) (distance - offset) / (float) distance);
|
|
|
+ app_name_tv.setAlpha((float) (distance - offset) / (float) distance);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
public void initData() {
|
|
|
- extras = getIntent().getExtras();
|
|
|
- if (extras.containsKey(getString(R.string.kfzs_duanduan_datashare_package_extras))) {
|
|
|
- String extraJson = extras.getString(getString(R.string.kfzs_duanduan_datashare_package_extras));
|
|
|
- try {
|
|
|
- JSONObject jsonObject = new JSONObject(extraJson);
|
|
|
- if (jsonObject.has("user_behavior") && "validate_token".equals(jsonObject.getString("user_behavior"))) {
|
|
|
- gameToken = jsonObject.getString("game_token");
|
|
|
+ if (getIntent().getExtras() != null) {
|
|
|
+ if (getIntent().hasExtra(getString(R.string.kfzs_duanduan_datashare_package_extras))) {
|
|
|
+ String extraJson = getIntent().getStringExtra(getString(R.string.kfzs_duanduan_datashare_package_extras));
|
|
|
+ try {
|
|
|
+ JSONObject jsonObject = new JSONObject(extraJson);
|
|
|
+ if (jsonObject.has("user_behavior") && "validate_token".equals(jsonObject.getString("user_behavior"))) {
|
|
|
+ gameToken = jsonObject.getString("game_token");
|
|
|
+ }
|
|
|
+ } catch (JSONException e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- } catch (JSONException e) {
|
|
|
- e.printStackTrace();
|
|
|
}
|
|
|
- }
|
|
|
- userEntity = DataUtil.getInstance().getUserEntity();
|
|
|
- if (extras != null) {
|
|
|
- SheepApp.getInstance().setGameCode(extras.getString(getString(R.string.kfzs_duanduan_datashare_game_code), ""));
|
|
|
- packageName = extras.getString(getString(R.string.kfzs_duanduan_datashare_package_name), "");
|
|
|
+ SheepApp.getInstance().setGameCode(getIntent().getStringExtra(getString(R.string.kfzs_duanduan_datashare_game_code)));
|
|
|
+ packageName = getIntent().getStringExtra(getString(R.string.kfzs_duanduan_datashare_package_name));
|
|
|
SheepApp.getInstance().setGamePackgeName(packageName);
|
|
|
if (TextUtils.isEmpty(SheepApp.getInstance().getGameCode()) || TextUtils.isEmpty(packageName)) {
|
|
|
CertificationUtil.newInstance().showCertificationErrorAndExitApp(this, "", 2000);
|
|
|
@@ -167,23 +115,22 @@ public class GameCertificationActivity extends BaseActivity {
|
|
|
}
|
|
|
//获取登录过的用户列表
|
|
|
userList.addAll(DDProviderHelper.getInstance().getSdkLoginUserList(SheepApp.getInstance().getConnectAddress().name()));
|
|
|
- sdk_change_user_list.getAdapter().notifyDataSetChanged();
|
|
|
- ViewUtil.setVisibility2(sdk_arrow, !userList.isEmpty());
|
|
|
+ listView.getAdapter().notifyDataSetChanged();
|
|
|
if (!TextUtils.isEmpty(gameToken) && !userList.isEmpty()) {
|
|
|
- for (SdkLoginUser temp : userList) {
|
|
|
- if (temp.getToken().startsWith(gameToken)) {
|
|
|
- CommonUtil.getInstance().checkAuth(gameToken, new Action1<Boolean>() {
|
|
|
- @Override
|
|
|
- public void call(Boolean ret) {
|
|
|
- if (ret) {
|
|
|
- CertificationUtil.newInstance().doCertification(GameCertificationActivity.this, gameToken, packageName, "validate");
|
|
|
- } else {
|
|
|
- hasToken();
|
|
|
- }
|
|
|
+ SdkLoginUser gameUser = DDProviderHelper.getInstance().getSdkLoginUser(gameToken);
|
|
|
+ if (gameUser != null) {
|
|
|
+ gameToken = gameUser.getToken();
|
|
|
+ CommonUtil.getInstance().checkAuth(gameToken, new Action1<Boolean>() {
|
|
|
+ @Override
|
|
|
+ public void call(Boolean ret) {
|
|
|
+ if (ret) {
|
|
|
+ CertificationUtil.newInstance().doCertification(GameCertificationActivity.this, gameToken, packageName, "validate");
|
|
|
+ } else {
|
|
|
+ hasToken();
|
|
|
}
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
hasToken();
|
|
|
@@ -197,98 +144,31 @@ public class GameCertificationActivity extends BaseActivity {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //是否展开登录用户列表
|
|
|
- private boolean isUserListOpen = false;
|
|
|
-
|
|
|
- @OnClick({R.id.icon_iv, R.id.change_account_tv, R.id.change_commit, R.id.sdk_arrow})
|
|
|
- public void onViewClicked(View view) {
|
|
|
- switch (view.getId()) {
|
|
|
- case R.id.sdk_arrow:
|
|
|
- if (isUserListOpen) {//展开
|
|
|
- sdk_arrow.setRotation(0);
|
|
|
- } else {
|
|
|
- sdk_arrow.setRotation(180);
|
|
|
- }
|
|
|
- isUserListOpen = !isUserListOpen;
|
|
|
- ViewUtil.setVisibility(sdk_change_user_list, isUserListOpen);
|
|
|
- break;
|
|
|
- case R.id.icon_iv:
|
|
|
- textProgressBar.setVisibility(View.GONE);
|
|
|
- break;
|
|
|
- case R.id.change_account_tv:
|
|
|
- isChangeAccount = true;
|
|
|
- Jump2View.getInstance().goLoginViewWithoutFinish(activity, SheepApp.getInstance().getGameCode());
|
|
|
- break;
|
|
|
- case R.id.change_commit:
|
|
|
- commitChange();
|
|
|
- break;
|
|
|
- }
|
|
|
+ @OnClick({R.id.change_account_tv})
|
|
|
+ public void onChangeAccount(View view) {
|
|
|
+ Jump2View.getInstance().goLoginViewWithoutFinish(this, SheepApp.getInstance().getGameCode());
|
|
|
}
|
|
|
|
|
|
private void commitChange() {
|
|
|
- if (userEntity == null) return;
|
|
|
- CommonUtil.getInstance().checkAuth(currentToken, (ret) -> {
|
|
|
+ //todo
|
|
|
+ CommonUtil.getInstance().checkAuth("", (ret) -> {
|
|
|
if (ret) {
|
|
|
loading_view_img.setVisibility(View.VISIBLE);
|
|
|
- change_commit.setText(R.string.change_login_ing);
|
|
|
- change_commit.setEnabled(false);
|
|
|
new Handler().postDelayed(() -> {
|
|
|
- if (!isChangeAccount) {
|
|
|
- CertificationUtil.newInstance().authCertificationCode(activity, currentToken);
|
|
|
- }
|
|
|
+ //todo
|
|
|
+ CertificationUtil.newInstance().authCertificationCode(this, "");
|
|
|
}, 2000);
|
|
|
} else {
|
|
|
Toast.makeText(this, "授权有效期已过,需要重新登录", Toast.LENGTH_SHORT).show();
|
|
|
- Jump2View.getInstance().goLoginViewWithoutFinish(activity, SheepApp.getInstance().getGameCode());
|
|
|
+ Jump2View.getInstance().goLoginViewWithoutFinish(this, SheepApp.getInstance().getGameCode());
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 是否登录
|
|
|
- * 请求授权
|
|
|
- */
|
|
|
private void hasToken() {
|
|
|
- if (TextUtils.isEmpty(SpUtils.getToken(SheepApp.getInstance()))) {
|
|
|
- if (userList.isEmpty()) {
|
|
|
- Jump2View.getInstance().goLoginViewWithoutFinish(activity, SheepApp.getInstance().getGameCode());
|
|
|
- } else {
|
|
|
- SdkLoginUser user = userList.get(0);
|
|
|
- currentToken = user.getToken();
|
|
|
- userEntity = new UserEntity();
|
|
|
- userEntity.setNickname(user.getNickname());
|
|
|
- userEntity.setInvitation_code(user.getInvitation_code());
|
|
|
- userEntity.setAvatar(user.getAvatar());
|
|
|
- userEntity.setLast_login_time("" + (TextUtils.isEmpty(user.getLastLoginTime()) ? System.currentTimeMillis() : user.getLastLoginTime()));
|
|
|
- initWidget();
|
|
|
- }
|
|
|
- } else {
|
|
|
- showProgress();
|
|
|
- CommonUtil.getInstance().updateUserInfo(result -> {
|
|
|
- hideProgress();
|
|
|
- if (result == null) {
|
|
|
- if (userList.isEmpty()) {
|
|
|
- Jump2View.getInstance().goLoginView(activity, SheepApp.getInstance().getGameCode());
|
|
|
- }
|
|
|
- } else {
|
|
|
- userEntity = result;
|
|
|
- initWidget();
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 赋值
|
|
|
- */
|
|
|
- private void initWidget() {
|
|
|
- ViewUtil.setText(sdk_user_name, userEntity.getNickname());
|
|
|
- if (!TextUtils.isEmpty(userEntity.getUser_name())) {
|
|
|
- ViewUtil.setText(sdk_user_name, userEntity.getNickname());
|
|
|
+ if (userList.isEmpty()) {
|
|
|
+ Jump2View.getInstance().goLoginViewWithoutFinish(this, SheepApp.getInstance().getGameCode());
|
|
|
}
|
|
|
- ViewUtil.setText(sdk_user_code, userEntity.getInvitation_code());
|
|
|
- GlideImageLoader.setAvatar(sdk_user_iv, userEntity.getAvatar());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -298,4 +178,105 @@ public class GameCertificationActivity extends BaseActivity {
|
|
|
SheepApp.getInstance().setGameFlag(true);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private class SdkUserAdapter extends RecyclerView.Adapter<SdkUserHolder> {
|
|
|
+
|
|
|
+ @NonNull
|
|
|
+ @Override
|
|
|
+ public SdkUserHolder onCreateViewHolder(ViewGroup viewGroup, int type) {
|
|
|
+ View contentView = LayoutInflater.from(GameCertificationActivity.this).inflate(R.layout.include_item_sdk_user, viewGroup, false);
|
|
|
+ if (type == 0) {
|
|
|
+ RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) contentView.getLayoutParams();
|
|
|
+ layoutParams.topMargin = getResources().getDimensionPixelSize(R.dimen.game_certification_top_margin);
|
|
|
+ layoutParams.bottomMargin = getResources().getDimensionPixelSize(R.dimen.game_certification_bottom_margin);
|
|
|
+ contentView.setBackgroundResource(R.drawable.shape_white_solid_rectangle_5);
|
|
|
+ } else if (type == 1) {
|
|
|
+ contentView.setBackgroundResource(R.drawable.shape_white_solid_rectangle_5);
|
|
|
+ } else if (type == 2) {
|
|
|
+ contentView.setBackgroundResource(R.drawable.shape_white_solid_rectangle_top_5);
|
|
|
+ } else if (type == 3) {
|
|
|
+ contentView.setBackgroundResource(R.drawable.shape_white_solid_rectangle_bottom_5);
|
|
|
+ } else if (type == 4) {
|
|
|
+ contentView.setBackgroundColor(Color.WHITE);
|
|
|
+ }
|
|
|
+ return new SdkUserHolder(contentView);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onBindViewHolder(SdkUserHolder holder, int position) {
|
|
|
+ holder.bind(position, userList.get(position));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int getItemCount() {
|
|
|
+ return userList.size();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int getItemViewType(int position) {
|
|
|
+ if (position == 0) {
|
|
|
+ return 0; // last login account
|
|
|
+ }
|
|
|
+ if (userList.size() == 2) {
|
|
|
+ return 1; // 4 round
|
|
|
+ } else {
|
|
|
+ if (position == 1) {
|
|
|
+ return 2; // top round
|
|
|
+ } else if (position == userList.size() - 1) {
|
|
|
+ return 4; // bottom round
|
|
|
+ } else {
|
|
|
+ return 3; // rect
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public class SdkUserHolder extends RecyclerView.ViewHolder {
|
|
|
+
|
|
|
+ @BindView(R.id.item_sdk_nick_name)
|
|
|
+ TextView nicknameView;
|
|
|
+ @BindView(R.id.item_sdk_user_name)
|
|
|
+ TextView usernameView;
|
|
|
+ @BindView(R.id.item_sdk_user_code)
|
|
|
+ TextView sheepcodeView;
|
|
|
+ @BindView(R.id.last_login_flag)
|
|
|
+ View lastLoginFlag;
|
|
|
+ @BindView(R.id.item_sdk_user_line)
|
|
|
+ View seperator;
|
|
|
+ @BindView(R.id.item_sdk_user_iv)
|
|
|
+ ImageView iconView;
|
|
|
+
|
|
|
+ private SdkLoginUser user;
|
|
|
+
|
|
|
+ public SdkUserHolder(@NonNull View itemView) {
|
|
|
+ super(itemView);
|
|
|
+ ButterKnife.bind(this, itemView);
|
|
|
+ itemView.setOnClickListener(v -> {
|
|
|
+ user.setLastLoginTime((System.currentTimeMillis() / 1000) + "");
|
|
|
+ DDProviderHelper.getInstance().addOrUpdateSdkLoginUser(user, null);
|
|
|
+ CertificationUtil.newInstance().authCertificationCode(GameCertificationActivity.this, user.getToken());
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ public void bind(int position, SdkLoginUser user) {
|
|
|
+ this.user = user;
|
|
|
+ ViewUtil.setText(nicknameView, user.getNickname());
|
|
|
+ ViewUtil.setText(usernameView, TextUtils.isEmpty(user.getLoginname()) ? "" : "(" + user.getLoginname() + ")");
|
|
|
+ ViewUtil.setText(sheepcodeView, user.getInvitation_code());
|
|
|
+ GlideImageLoader.setAvatar(iconView, user.getAvatar());
|
|
|
+ ViewUtil.setVisibility(lastLoginFlag, position == 0);
|
|
|
+ ViewUtil.setVisibility(seperator, position > 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ @OnClick(R.id.item_sdk_del_iv)
|
|
|
+ public void onItemDel(View v) {
|
|
|
+ DDProviderHelper.getInstance().deleteSdkLoginUser(user);
|
|
|
+ try {
|
|
|
+ userList.remove(user);
|
|
|
+ listView.getAdapter().notifyDataSetChanged();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|