Skip to content

Commit

Permalink
[APP-677] add privacy policy
Browse files Browse the repository at this point in the history
  • Loading branch information
soaryong-c committed Jan 16, 2023
1 parent 877eab5 commit 8e2ff2b
Show file tree
Hide file tree
Showing 6 changed files with 303 additions and 281 deletions.
517 changes: 259 additions & 258 deletions app/src/main/java/wannabit/io/cosmostaion/base/BaseConstant.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import static wannabit.io.cosmostaion.base.BaseConstant.COSMOSTATION_HOMEPAGE;
import static wannabit.io.cosmostaion.base.BaseConstant.COSMOSTATION_TELEGRAM;
import static wannabit.io.cosmostaion.base.BaseConstant.COSMOSTATION_TERM_EN;
import static wannabit.io.cosmostaion.base.BaseConstant.COSMOSTATION_TERM_KR;
import static wannabit.io.cosmostaion.base.BaseConstant.EXPLORER_NOTICE_MINTSCAN;

import android.Manifest;
Expand Down Expand Up @@ -71,7 +70,7 @@

public class MainSettingFragment extends BaseFragment implements View.OnClickListener {

private FrameLayout mBtnWallet, mBtnMnemonic, mBtnImportKey, mBtnWatchAddress, mBtnTheme, mBtnLanguage, mBtnAutoPass, mBtnCurrency, mBtnPriceColorChange, mBtnExplore, mBtnNotice, mBtnHomepage, mBtnBlog, mBtnTelegram, mBtnStarnameWc, mBtnTerm, mBtnGithub, mBtnVersion, mBtnWalletConnect;
private FrameLayout mBtnWallet, mBtnMnemonic, mBtnImportKey, mBtnWatchAddress, mBtnTheme, mBtnLanguage, mBtnAutoPass, mBtnCurrency, mBtnPriceColorChange, mBtnExplore, mBtnNotice, mBtnHomepage, mBtnBlog, mBtnTelegram, mBtnStarnameWc, mBtnTerm, mBtnGithub, mBtnVersion, mBtnWalletConnect, mBtnPrivacy;

private TextView mTvBio, mTvAutoPassTime, mTvCurrency, mTvVersion, mTvTheme, mTvLanguage;

Expand Down Expand Up @@ -114,6 +113,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
mBtnGithub = rootView.findViewById(R.id.card_github);
mBtnVersion = rootView.findViewById(R.id.card_version);
mBtnWalletConnect = rootView.findViewById(R.id.card_wallet_connect);
mBtnPrivacy = rootView.findViewById(R.id.card_privacy);
mTvCurrency = rootView.findViewById(R.id.currency_text);
mTvVersion = rootView.findViewById(R.id.version_text);
mTvTheme = rootView.findViewById(R.id.theme_text);
Expand Down Expand Up @@ -142,6 +142,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
mBtnWalletConnect.setOnClickListener(this);
mBtnHomepage.setOnClickListener(this);
mBtnBlog.setOnClickListener(this);
mBtnPrivacy.setOnClickListener(this);
mBtnTelegram.setOnClickListener(this);
mBtnStarnameWc.setOnClickListener(this);
mBtnTerm.setOnClickListener(this);
Expand Down Expand Up @@ -256,17 +257,10 @@ public void onClick(View v) {
startActivity(new Intent(getBaseActivity(), WatchingWalletAddActivity.class));

} else if (v.equals(mBtnTheme)) {
FilledVerticalButtonAlertDialog.showTripleButton(getBaseActivity(), null, null,
getString(R.string.str_theme_system), view -> setTheme(getBaseActivity(), ThemeUtil.DEFAULT_MODE), null,
getString(R.string.str_theme_light), view -> setTheme(getBaseActivity(), ThemeUtil.LIGHT_MODE), null,
getString(R.string.str_theme_dark), view -> setTheme(getBaseActivity(), ThemeUtil.DARK_MODE), null);
FilledVerticalButtonAlertDialog.showTripleButton(getBaseActivity(), null, null, getString(R.string.str_theme_system), view -> setTheme(getBaseActivity(), ThemeUtil.DEFAULT_MODE), null, getString(R.string.str_theme_light), view -> setTheme(getBaseActivity(), ThemeUtil.LIGHT_MODE), null, getString(R.string.str_theme_dark), view -> setTheme(getBaseActivity(), ThemeUtil.DARK_MODE), null);

} else if (v.equals(mBtnLanguage)) {
FilledVerticalButtonAlertDialog.showQuadrupleButton(getBaseActivity(), null, null,
getString(R.string.str_language_system), view -> setLanguage(getBaseActivity(), LanguageUtil.SYSTEM_MODE), null,
getString(R.string.str_language_english), view -> setLanguage(getBaseActivity(), LanguageUtil.LANGUAGE_ENGLISH), null,
getString(R.string.str_language_korean), view -> setLanguage(getBaseActivity(), LanguageUtil.LANGUAGE_KOREAN), null,
getString(R.string.str_language_japanese), view -> setLanguage(getBaseActivity(), LanguageUtil.LANGUAGE_JAPANESE), null);
FilledVerticalButtonAlertDialog.showQuadrupleButton(getBaseActivity(), null, null, getString(R.string.str_language_system), view -> setLanguage(getBaseActivity(), LanguageUtil.SYSTEM_MODE), null, getString(R.string.str_language_english), view -> setLanguage(getBaseActivity(), LanguageUtil.LANGUAGE_ENGLISH), null, getString(R.string.str_language_korean), view -> setLanguage(getBaseActivity(), LanguageUtil.LANGUAGE_KOREAN), null, getString(R.string.str_language_japanese), view -> setLanguage(getBaseActivity(), LanguageUtil.LANGUAGE_JAPANESE), null);

} else if (v.equals(mSwitchUsingAppLock)) {
onClickAppLock();
Expand Down Expand Up @@ -302,6 +296,10 @@ public void onClick(View v) {
} else if (v.equals(mBtnWalletConnect)) {
startActivity(new Intent(getContext(), ManageWalletConnectActivity.class));

} else if (v.equals(mBtnPrivacy)) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(BaseConstant.COSMOSTATION_PRIVACY_EN));
startActivity(intent);

} else if (v.equals(mBtnNotice)) {
String url = EXPLORER_NOTICE_MINTSCAN + ChainFactory.getChain(getMainActivity().mBaseChain).chainName();
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
Expand All @@ -320,13 +318,8 @@ public void onClick(View v) {
startActivity(telegram);

} else if (v.equals(mBtnTerm)) {
if (Locale.getDefault().getLanguage().equalsIgnoreCase("ko")) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(COSMOSTATION_TERM_KR));
startActivity(intent);
} else {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(COSMOSTATION_TERM_EN));
startActivity(intent);
}
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(COSMOSTATION_TERM_EN));
startActivity(intent);

} else if (v.equals(mBtnGithub)) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(COSMOSTATION_GITHUB));
Expand Down Expand Up @@ -413,11 +406,7 @@ private void onClickAutoPass() {
}

private void onShowAutoPassDialog() {
FilledVerticalButtonAlertDialog.showQuadrupleButton(getBaseActivity(), null, getString(R.string.str_app_auto_pass_msg),
getString(R.string.str_app_auto_pass_5m), view -> onSetAutoPass(1), null,
getString(R.string.str_app_auto_pass_10m), view -> onSetAutoPass(2), null,
getString(R.string.str_app_auto_pass_30m), view -> onSetAutoPass(3), null,
getString(R.string.str_app_auto_pass_never), view -> onSetAutoPass(0), null);
FilledVerticalButtonAlertDialog.showQuadrupleButton(getBaseActivity(), null, getString(R.string.str_app_auto_pass_msg), getString(R.string.str_app_auto_pass_5m), view -> onSetAutoPass(1), null, getString(R.string.str_app_auto_pass_10m), view -> onSetAutoPass(2), null, getString(R.string.str_app_auto_pass_30m), view -> onSetAutoPass(3), null, getString(R.string.str_app_auto_pass_never), view -> onSetAutoPass(0), null);
}

private void onSetAutoPass(int value) {
Expand Down
29 changes: 29 additions & 0 deletions app/src/main/res/layout/fragment_main_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,35 @@
</RelativeLayout>
</FrameLayout>

<FrameLayout
android:id="@+id/card_privacy"
android:layout_width="match_parent"
android:layout_height="@dimen/space_44"
android:layout_marginTop="@dimen/space_6"
android:background="@drawable/box_trans_round"
android:clickable="true">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
style="@style/font_rr_12_black_daynight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/space_6"
android:text="@string/str_privacy" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/arrow_next_gr" />
</RelativeLayout>
</FrameLayout>

<FrameLayout
android:id="@+id/card_github"
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
<string name="str_starname_wallet_connect">スターネームウォレット コネクト</string>
<string name="str_app_info">アプリ情報</string>
<string name="str_term">利用規約</string>
<string name="str_privacy">個人情報処理方針</string>
<string name="str_github">オープンソース (GitHub)</string>
<string name="str_version">バージョン</string>
<string name="str_with_mnemonic">転送可能ウォーレット(ニーモニック)</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
<string name="str_starname_wallet_connect">스타네임 Wallet Connect</string>
<string name="str_app_info">앱 정보</string>
<string name="str_term">약관</string>
<string name="str_privacy">개인정보처리방침</string>
<string name="str_github">오픈소스 (GitHub)</string>
<string name="str_version">버전</string>
<string name="str_with_mnemonic">전송가능 지갑(니모닉)</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
<string name="str_starname_wallet_connect">Starname Wallet Connect</string>
<string name="str_app_info">App Info</string>
<string name="str_term">Term and Policy</string>
<string name="str_privacy">Privacy Policy</string>
<string name="str_github">Open Source (GitHub)</string>
<string name="str_version">Version</string>
<string name="str_with_mnemonic">With Mnemonics</string>
Expand Down

0 comments on commit 8e2ff2b

Please sign in to comment.