Skip to content

Commit

Permalink
【ID868776255】App数据隐私合规整改--设计图文案修改以及bug修复。
Browse files Browse the repository at this point in the history
http://tapd.oa.com/NEW_IOT/prong/stories/view/1020393192868776255?

Change-Id: Iba27a987878997ded62367b5304c8596b913e320
  • Loading branch information
SundoggyNew committed Oct 25, 2021
1 parent 03fa80e commit 954ae98
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,26 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout
tv_confirm = view.findViewById(R.id.tv_confirm)
tv_cancel = view.findViewById(R.id.tv_cancel)
select_tag_layout = view.findViewById(R.id.select_tag_layout)
iv_agreement = view.findViewById(R.id.iv_agreement)
iv_agreement_status = view.findViewById(R.id.iv_agreement_status)

val partStr0 = context.getString(R.string.register_agree_1)
val partStr1 = context.getString(R.string.register_agree_2)
val partStr2 = context.getString(R.string.register_agree_3)
val partStr3 = context.getString(R.string.register_agree_4)
var showStr = partStr1 + partStr2 + partStr3
tip_title?.text = showStr

var agreeStr = partStr0 + showStr
var spannable = SpannableStringBuilder(agreeStr)
spannable.setSpan(IndexClickableSpan(context, 1),
partStr0.length, partStr0.length + partStr1.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
spannable.setSpan(IndexClickableSpan(context, 2),
agreeStr.length - partStr1.length, agreeStr.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
tv_register_tip?.movementMethod = LinkMovementMethod.getInstance()
tv_register_tip?.text = spannable
tip_title?.text = context.getString(R.string.register_agree_2) + context.getString(R.string.rule_title_and) + context.getString(R.string.rule_title_private_protect)

val agreeContentStrPrefix = context.getString(R.string.rule_content_prefix)
val partStr1 = "${context.getString(R.string.register_agree_2)}"
val partStr2 = context.getString(R.string.register_agree_3)
val partStr3 = "${context.getString(R.string.register_agree_4)}"
val agreeContentStrMiddle = context.getString(R.string.rule_content_middle)
val partStr4 = "${context.getString(R.string.rule_content_list)}"
val agreeContentStrSuffix = context.getString(R.string.rule_content_suffix)
var agreeContentStr = agreeContentStrPrefix + showStr + agreeContentStrSuffix
var agreeContentStr = agreeContentStrPrefix + partStr1 + partStr2 + partStr3 + agreeContentStrMiddle + partStr4 + agreeContentStrSuffix
var agreeContentSpannable = SpannableStringBuilder(agreeContentStr)
agreeContentSpannable.setSpan(IndexClickableSpan(context, 1),
agreeContentStrPrefix.length, agreeContentStrPrefix.length + partStr1.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
val start = agreeContentStrPrefix.length + partStr1.length + partStr2.length
val start1 = agreeContentStrPrefix.length + partStr1.length + partStr2.length
agreeContentSpannable.setSpan(IndexClickableSpan(context, 2),
start, start + partStr3.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
start1, start1 + partStr3.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
val start2 = agreeContentStrPrefix.length + partStr1.length + partStr2.length + partStr3.length + agreeContentStrMiddle.length
agreeContentSpannable.setSpan(IndexClickableSpan(context, 3),
start2, start2 + partStr4.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
tv_tip_content?.movementMethod = LinkMovementMethod.getInstance()
tv_tip_content?.text = agreeContentSpannable

Expand All @@ -87,16 +79,15 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout
override fun onClick(v: View?) {
when(v) {
select_tag_layout -> {
readed =! readed
freshReadState()
}

tv_cancel -> {
onDismisListener?.onDismised()
}

tv_confirm -> {
if (!readed) return
readed = true
freshReadState()
onDismisListener?.onOkClicked()
dismiss()
}
Expand All @@ -111,6 +102,7 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout
fun onOkClicked()
fun onOkClickedUserAgreement()
fun onOkClickedPrivacyPolicy()
fun onOkClickedThirdSDKList()
}

fun setOnDismisListener(onDismisListener: OnDismisListener?) {
Expand All @@ -136,6 +128,8 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout
onDismisListener?.onOkClickedUserAgreement()
} else if (index == 2) {
onDismisListener?.onOkClickedPrivacyPolicy()
} else if (index == 3) {
onDismisListener?.onOkClickedThirdSDKList()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class RegisterActivity : PActivity(), RegisterView, View.OnClickListener {
dlg.setOnDismisListener(object : UserAgreeDialog.OnDismisListener {
override fun onDismised() { finish() }
override fun onOkClicked() {
presenter.agreement()
Utils.setXmlStringValue(this@RegisterActivity, CommonField.AGREED_RULE_FLAG, CommonField.AGREED_RULE_FLAG, "1")
if (!checkPermissions(permissions)) {
requestPermission(permissions)
Expand Down Expand Up @@ -180,6 +181,16 @@ class RegisterActivity : PActivity(), RegisterView, View.OnClickListener {
OpensourceLicenseActivity.startWebWithExtra(this@RegisterActivity, getString(R.string.register_agree_4), url)
}
}

override fun onOkClickedThirdSDKList() {
var url = ""
if (Utils.getLang().contains(CommonField.ZH_TAG)) {
url = CommonField.THIRD_SDK_URL_US_ZH
} else {
url = CommonField.THIRD_SDK_URL_US_EN
}
OpensourceLicenseActivity.startWebWithExtra(this@RegisterActivity, getString(R.string.rule_content_list), url)
}
})
}

Expand Down Expand Up @@ -394,7 +405,7 @@ class RegisterActivity : PActivity(), RegisterView, View.OnClickListener {
var agreed = Utils.getStringValueFromXml(this@RegisterActivity, CommonField.AGREED_RULE_FLAG, CommonField.AGREED_RULE_FLAG)
agreed?.let {
if (it == "1") {
presenter.agreement()
// presenter.agreement()
return@unselectedAgreement
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ object CommonField {
const val SERVICE_AGREEMENT_URL_US_ZH = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config7.js"
const val SERVICE_AGREEMENT_URL_US_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config3.js"
const val DELET_ACCOUNT_POLICY_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config6.js"
const val THIRD_SDK_URL_US_ZH = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config12.js"
const val THIRD_SDK_URL_US_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config13.js"

/************返回结果通用字段*************/
const val RESPONSE = "Response"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_register.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@
android:text="@string/get_code"
android:textColor="@color/white"
android:textSize="@dimen/ts_16"
app:layout_constraintTop_toBottomOf="@+id/ll_register_agreement" />
app:layout_constraintTop_toBottomOf="@+id/vp_register" />

</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/popup_permission_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
android:layout_marginTop="18dp"
android:layout_marginRight="20dp"
android:lineSpacingExtra="7dp"
android:text="@string/permission_of_detail"
android:text="@string/permission_of_wifi"
android:textColor="@color/black_888888"
android:textSize="@dimen/ts_14" />

Expand All @@ -87,7 +87,7 @@
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:lineSpacingExtra="7dp"
android:text="@string/permission_of_detail_lips"
android:text="@string/permission_of_wifi_lips"
android:textColor="@color/black"
android:textSize="@dimen/ts_14" />

Expand Down
79 changes: 12 additions & 67 deletions app/src/main/res/layout/popup_user_agree_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,86 +28,31 @@
android:layout_centerHorizontal="true"
android:layout_height="wrap_content"/>

<TextView
android:id="@+id/tv_tip_content"
android:textColor="@color/gray_6C7078"
android:textSize="@dimen/ts_14"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
<ScrollView
android:id="@+id/sv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="212dp"
android:layout_below="@id/tip_title"
android:layout_centerHorizontal="true"
android:lineSpacingMultiplier="1.5"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
/>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_agreement"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="24dp"
android:layout_below="@id/tv_tip_content"
android:layout_marginTop="20dp">

<RelativeLayout
android:id="@+id/select_tag_layout"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="1dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_space"
app:layout_constraintBottom_toBottomOf="@id/tv_space"
app:layout_constraintDimensionRatio="h, 1:1"
>

<ImageView
android:id="@+id/iv_agreement"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:src="@mipmap/dev_mode_sel" />

<ImageView
android:id="@+id/iv_agreement_status"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp"
android:layout_centerInParent="true"
android:src="@mipmap/success" />
</RelativeLayout>


<TextView
android:id="@+id/tv_space"
android:layout_width="9dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:textSize="@dimen/ts_14"
android:visibility="invisible"
android:text="1"
app:layout_constraintStart_toEndOf="@id/select_tag_layout"
/>
android:layout_marginBottom="20dp">

<TextView
android:id="@+id/tv_register_tip"
android:layout_width="0dp"
android:id="@+id/tv_tip_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_space"
app:layout_constraintTop_toTopOf="@id/tv_space"
android:lineSpacingMultiplier="1.0"
android:textColor="@color/gray_6C7078"
android:lineSpacingExtra="5dp"
android:textSize="@dimen/ts_14" />

</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

<View
android:id="@+id/divid_line"
android:layout_width="match_parent"
android:layout_below="@id/ll_agreement"
android:layout_below="@id/sv_content"
android:layout_centerHorizontal="true"
android:background="@color/grey_e5e5e5"
android:layout_marginTop="20dp"
Expand All @@ -125,7 +70,7 @@
<TextView
android:id="@+id/tv_confirm"
android:layout_below="@id/divid_line"
android:text="@string/confirm"
android:text="@string/rule_agree"
android:layout_toRightOf="@id/divid_line_v"
android:layout_width="match_parent"
android:textSize="@dimen/ts_16"
Expand All @@ -138,7 +83,7 @@
<TextView
android:id="@+id/tv_cancel"
android:layout_below="@id/divid_line"
android:text="@string/cancel"
android:text="@string/not_used_temporarily"
android:layout_toLeftOf="@id/divid_line_v"
android:layout_width="match_parent"
android:textSize="@dimen/ts_16"
Expand Down
30 changes: 17 additions & 13 deletions app/src/main/res/values-en-rUS/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -681,19 +681,23 @@
<string name="device_offline_already">The device is offline</string>
<string name="zero_device">0 devices</string>
<string name="dialog_title_name">Popup title</string>
<string name="rule_content_prefix">为了保证您的个人隐私安全,在进行账号注册前,您需要确认您已经阅读腾讯云</string>
<string name="rule_content_suffix">,并同意授权腾讯连连为您注册账号信息(如手机号、昵称、头像)</string>
<string name="controller_of_permission">权限管理</string>
<string name="permission_of_title_tip">请授权腾讯连连以下权限</string>
<string name="permission_of_detail">该步骤将为硬件设备配置WiFi网络实现通信,绑定硬件设备与APP用户之间的关系。因此 腾讯连连 需获取以下权限:</string>
<string name="permission_of_detail_lips">· WiFi名称、WiFi密码\n· 手机IP地址</string>
<string name="country_tip">为了向您提供对应国家/地区的用户协议和隐私政策,请您选择所在的国家及地区</string>
<string name="permission_of_mic_camera">为了使用设备的实时语音/视频通话功能,因此腾讯连连需 获取以下权限:</string>
<string name="permission_of_mic_camera_lips">· 摄像头/麦克风</string>
<string name="permission_of_wifi">该步骤将为硬件设备配置WiFi网络实现通信,绑定硬件设备与APP用户之间的关系。因此 腾讯连连 需获取以下权限:</string>
<string name="permission_of_wifi_lips">· WiFi名称、WiFi密码\n· 手机IP地址</string>
<string name="permission_of_wechat">您将授权以下个人信息与微信账号绑定:</string>
<string name="permission_of_wechat_lips">· 昵称、头像、地区、性别\n· 设备信息</string>
<string name="not_used_temporarily">No</string>
<string name="rule_agree">Yes</string>
<string name="rule_title_and">and</string>
<string name="rule_title_private_protect">Privacy protection</string>
<string name="rule_content_list">Third-party information sharing checklist</string>
<string name="rule_content_prefix">In order to protect your personal rights and interests, before you use our products, please be sure to carefully read Tencent LLink</string>
<string name="rule_content_middle">,to help you understand our collection/storage/use/external provision/protection of your personal information and your rights. \nWe will not actively share or transfer your personal information to a third party. If there are other situations in which your personal information is shared or transferred or you need us to share or transfer that to a third party, we will confirm that the third party obtains your agreement to the above actions. For personal information that needs to be shared with third-party service providers in our products, please refer to</string>
<string name="rule_content_suffix">. \nIf you have any questions about the above agreement, you can send the question to the official email [email protected] of Tencent LLink or to our dedicated department for personal information protection.The mailing address is:Tencent Building, Keji Zhong Road, Nanshan District, Shenzhen, Guangdong, China. Recipient:Legal Department,Data and Privacy Protection Center\n If you agree to the content of the above agreement, please click "Yes" to accept our product service!</string>
<string name="controller_of_permission">Authority management</string>
<string name="permission_of_title_tip">Please authorize Tencent LLink the following permissions</string>
<string name="country_tip">In order to provide you with the user agreement and privacy policy of your country/region, please select your country/region</string>
<string name="permission_of_mic_camera">In order to use the real-time communication of the device, Tencent LLink needs to obtain the following permissions:</string>
<string name="permission_of_mic_camera_lips">· camera/microphone</string>
<string name="permission_of_wifi">This step will configure the WiFi network for the hardware device to achieve communication, and bind the relationship between the hardware device and the APP user. Therefore, Tencent LLink needs to obtain the following permissions:</string>
<string name="permission_of_wifi_lips">· WiFi name、WiFi password\n· the IP of the mobile phone</string>
<string name="permission_of_wechat">You will authorize the following personal information to be bound to your WeChat account:</string>
<string name="permission_of_wechat_lips">· nickname、profile photo、region、gender\n· device information</string>

<!--international end -->
</resources>
Loading

0 comments on commit 954ae98

Please sign in to comment.