Browse Source

添加隐私协议

liuzhenxing1118 1 năm trước cách đây
mục cha
commit
e6a22f8604

+ 1 - 0
.idea/misc.xml

@@ -46,6 +46,7 @@
         <entry key="app/src/main/res/layout/item_icon_title_right.xml" value="0.1" />
         <entry key="app/src/main/res/layout/item_icon_title_subtitle.xml" value="0.1" />
         <entry key="app/src/main/res/layout/item_icon_title_subtitle_marquee.xml" value="0.1828774062816616" />
+        <entry key="app/src/main/res/layout/item_privacy_policy.xml" value="0.38632246376811596" />
         <entry key="app/src/main/res/layout/item_progress_title.xml" value="0.17307692307692307" />
         <entry key="app/src/main/res/layout/item_progress_title_subtitle.xml" value="0.1331521739130435" />
         <entry key="app/src/main/res/layout/item_refresh.xml" value="0.1" />

+ 46 - 18
app/src/main/java/com/xplora/xpsettings/Activity/PrivacyPolicyActivity.java

@@ -1,12 +1,18 @@
 package com.xplora.xpsettings.Activity;
 
 import android.annotation.SuppressLint;
+import android.graphics.Typeface;
 import android.os.Bundle;
 import android.text.Spannable;
 import android.text.SpannableStringBuilder;
+import android.text.style.AbsoluteSizeSpan;
+import android.text.style.ForegroundColorSpan;
+import android.text.style.StyleSpan;
+import android.view.View;
 import android.widget.TextView;
 
 import com.xplora.xpsettings.R;
+import com.xplora.xpsettings.Utils.ResUtils;
 
 public class PrivacyPolicyActivity extends BaseActivity{
     @Override
@@ -16,24 +22,46 @@ public class PrivacyPolicyActivity extends BaseActivity{
         initView();
     }
 
-    @SuppressLint("SetTextI18n")
+    @SuppressLint({"SetTextI18n", "ResourceAsColor"})
     private void initView() {
-        TextView textView_0 = findViewById(R.id.cpp_text_0);
-        TextView textView_0_content = findViewById(R.id.cpp_text_0_content);
-        textView_0.setText(R.string.children_privacy_policy_0);
-        textView_0_content.setText(R.string.children_privacy_policy_0_content);
-
-        TextView textView_1 = findViewById(R.id.cpp_text_1);
-        TextView textView_1_content = findViewById(R.id.cpp_text_1_content);
-        textView_1.setText(R.string.children_privacy_policy_1);
-        textView_1_content.setText(R.string.children_privacy_policy_1_content);
-
-        TextView textView_1_0 = findViewById(R.id.cpp_text_1_0);
-        TextView textView_1_0_content = findViewById(R.id.cpp_text_1_0_content);
-        textView_1_0.setText(R.string.children_privacy_policy_1_0_content);
-        textView_1_0_content.setText(R.string.children_privacy_policy_1_0_content);
-
-//        Spannable textSpan = new SpannableStringBuilder(text1);
-//        textView.setText(textSpan);
+        String a = getString(R.string.cpp_title_2);
+        for (int i = 0; i <= 26; i++) {
+            int layoutId = ResUtils.getWidgetId("cpp_layout_", i);
+            View view = findViewById(layoutId);
+
+            TextView itemTitle =  view.findViewById(R.id.cpp_title);
+            TextView itemContent =  view.findViewById(R.id.cpp_content);
+
+            int titleId = ResUtils.getStringId("cpp_title_", i);
+            int contentId = ResUtils.getStringId("cpp_content_", i);
+
+            String title = titleId > 0 ? getString(titleId) : "";
+            String content = contentId > 0 ? getString(contentId) : "";
+            String email = "support@xplora.com";
+
+            int index = content.indexOf(email);
+            if (index > 0) {
+                String text = title + content;
+                Spannable textSpan = new SpannableStringBuilder(text);
+                textSpan.setSpan(new ForegroundColorSpan(getColor(R.color.blue)), index, index + email.length(),
+                        Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+                itemTitle.setVisibility(View.GONE);
+                itemContent.setText(textSpan);
+            } else {
+                if ((i >= 2 && i <= 10) || (i >= 12 && i <= 19) || (i >= 22 && i <= 25) || i == 26) {
+                    String text = title + content;
+                    Spannable textSpan = new SpannableStringBuilder(text);
+                    textSpan.setSpan(new AbsoluteSizeSpan(10, true), 0, title.length(),
+                            Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+                    textSpan.setSpan(new StyleSpan(Typeface.BOLD), 0, title.length(),
+                            Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+                    itemTitle.setVisibility(View.GONE);
+                    itemContent.setText(textSpan);
+                } else {
+                    itemTitle.setText(title);
+                    itemContent.setText(content);
+                }
+            }
+        }
     }
 }

+ 2 - 2
app/src/main/java/com/xplora/xpsettings/Utils/Macros.java

@@ -3,9 +3,9 @@ package com.xplora.xpsettings.Utils;
 public class Macros {
 
     //TODO:测试使用,正式版本需要关闭false
-    public static boolean DEBUG = false;
+    public static boolean DEBUG = true;
 
-    public static boolean DEBUG_FULLSCREEN = false; //模拟器显示全屏
+    public static boolean DEBUG_FULLSCREEN = true; //模拟器显示全屏
 
     public static boolean DEBUG_RESTART = false; //以后会改成广播通知carlos server,处理关机
 

+ 89 - 48
app/src/main/res/layout/activity_privacy_policy.xml

@@ -18,67 +18,108 @@
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:orientation="vertical"
             >
-            <TextView
-                android:id="@+id/cpp_text_0"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAlignment="textStart"
-                android:textSize="10sp"
-                android:textStyle="bold"
-                android:textColor="#FFFFFFFF"
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_0"
                 />
-
-            <TextView
-                android:id="@+id/cpp_text_0_content"
+            <Space
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAlignment="textStart"
-                android:textSize="9sp"
-                android:textColor="#FFFFFFFF"
+                android:layout_height="10dp"/>
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_1"
                 />
             <Space
                 android:layout_width="match_parent"
-                android:layout_height="10dp"/>
-
-            <TextView
-                android:id="@+id/cpp_text_1"
+                android:layout_height="5dp"/>
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_2"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_3"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_4"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_5"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_6"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_7"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_8"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_9"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_10"
+                />
+            <Space
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAlignment="textStart"
-                android:textSize="10sp"
-                android:textStyle="bold"
-                android:textColor="#FFFFFFFF"
-                />
-            <TextView
-                android:id="@+id/cpp_text_1_content"
+                android:layout_height="20dp"/>
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_11"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_12"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_13"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_14"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_15"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_16"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_17"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_18"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_19"
+                />
+            <Space
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAlignment="textStart"
-                android:textSize="9sp"
-                android:textColor="#FFFFFFFF"
+                android:layout_height="10dp"/>
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_20"
                 />
-
-            <TextView
-                android:id="@+id/cpp_text_1_0"
+            <Space
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAlignment="textStart"
-                android:textSize="10sp"
-                android:textStyle="bold"
-                android:textColor="#FFFFFFFF"
-                />
-            <TextView
-                android:id="@+id/cpp_text_1_0_content"
+                android:layout_height="10dp"/>
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_21"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_22"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_23"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_24"
+                />
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_25"
+                />
+            <Space
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:textAlignment="textStart"
-                android:textSize="9sp"
-                android:textColor="#FFFFFFFF"
+                android:layout_height="10dp"/>
+            <include layout="@layout/item_privacy_policy"
+                android:id="@+id/cpp_layout_26"
                 />
-            
         </LinearLayout>
 
     </ScrollView>

+ 25 - 0
app/src/main/res/layout/item_privacy_policy.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    >
+    <TextView
+        android:id="@+id/cpp_title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textAlignment="textStart"
+        android:textSize="10sp"
+        android:textStyle="bold"
+        android:textColor="#FFFFFFFF"
+        />
+
+    <TextView
+        android:id="@+id/cpp_content"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textAlignment="textStart"
+        android:textSize="9sp"
+        android:textColor="#FFFFFFFF"
+        />
+</LinearLayout>

+ 42 - 42
app/src/main/res/values/strings.xml

@@ -73,46 +73,46 @@
     <string name="ensure_guardian_summary">To ensure you are the guardian, please input the code from Xplora</string>
     <string name="next">Next</string>
 
-
-
-    <string name="children_privacy_policy_0">CHILDREN PRIVACY POLICY</string>
-    <string name="children_privacy_policy_0_content">We know it’s important to treat data you tell us is from children under 18 carefully. This Notice explains what we do (and don’t do) when it comes to children’s data.</string>
-
-    <string name="children_privacy_policy_1">What Children’s Data We Collect</string>
-    <string name="children_privacy_policy_1_content">We don’t knowingly collect data from or about children without the permission of their parent or guardian. When we do collect that data, we might do it directly, like when you sign up for a service. We might also collect it automatically if your child uses the products or services we offer. We collect the following data:</string>
-
-    <string name="children_privacy_policy_1_0">Geolocation Data</string>
-    <string name="children_privacy_policy_1_0_content">– we collect data that tells us the location of your child’s smart device.</string>
-
-    <string name="children_privacy_policy_1_1">Unique Identifiers</string>
-    <string name="children_privacy_policy_1_1_content">– we collect device and network identifiers - basically, ways for us to tell which smart device on our network is your child’s.</string>
-
-    <string name="children_privacy_policy_1_2">Customer Proprietary Network Information (“CPNI”)</string>
-    <string name="children_privacy_policy_1_2_content">generated by your child’s use of our wireless voice communications services. Information from your child’s use of our products, services, and network (and other carriers’ networks when roaming domestically or internationally) like usage of connecting carriers and Internet service providers, the Internet Protocol (“IP”) address, text messages, and data use history, content interactions (e.g., how long you use an app), language settings, and other network and device analytics and Wi-Fi connection and usage data.</string>
-
-    <string name="children_privacy_policy_1_3">Device and service performance and diagnostic information</string>
-    <string name="children_privacy_policy_1_3_content">– this includes reports from your child’s device about signal strength, speeds, app and service performance, dropped calls, call and data failures, geolocation information, and device data.</string>
-
-    <string name="children_privacy_policy_1_4">Back-up information</string>
-    <string name="children_privacy_policy_1_4_content">including data stored in back-ups and cloud services if your child’s device uploads information to XPLORA Mobile AS / XPLORA TECHNOLOGIES AS.</string>
-
-    <string name="children_privacy_policy_1_5">Audio information</string>
-    <string name="children_privacy_policy_1_5_content">including voice commands your child provides to our app (for example, for accessibility or hands-free use).</string>
-
-    <string name="children_privacy_policy_1_6">Child’s username</string>
-    <string name="children_privacy_policy_1_6_content">– For joining child friendly activity-based platform Xplora Goplay.</string>
-
-    <string name="children_privacy_policy_1_7">Data Usage</string>
-    <string name="children_privacy_policy_1_7_content">– this tells us the amount of data the hotspot uses, and IP addresses associated with websites visited.</string>
-
-    <string name="children_privacy_policy_1_8">Unique Identifiers</string>
-    <string name="children_privacy_policy_1_8_content">– we collect device and network identifiers - basically, ways for us to tell which hotspot on our network is your child’s.</string>
-
-
-    <string name="children_privacy_policy_2">How We Use Children’s Data</string>
-    <string name="children_privacy_policy_2_content">The main reason we collect children’s data is to provide the product or service that collected the data. But we may also use children’s data to do things like:</string>
-
-    <string name="children_privacy_policy_2_0">Create and administer accounts, complete transactions, payments, billing, and requests related to our products and services and third-party products and services charged to your accounts.</string>
-    <string name="children_privacy_policy_2_0_content"></string>
-
+    <string name="cpp_title_0">CHILDREN PRIVACY POLICY</string>
+    <string name="cpp_content_0">We know it’s important to treat data you tell us is from children under 18 carefully. This Notice explains what we do (and don’t do) when it comes to children’s data.</string>
+    <string name="cpp_title_1">What Children’s Data We Collect</string>
+    <string name="cpp_content_1">We don’t knowingly collect data from or about children without the permission of their parent or guardian. When we do collect that data, we might do it directly, like when you sign up for a service. We might also collect it automatically if your child uses the products or services we offer. We collect the following data:</string>
+    <string name="cpp_title_2">\t⦁\tGeolocation Data</string>
+    <string name="cpp_content_2"> – we collect data that tells us the location of your child’s smart device.</string>
+    <string name="cpp_title_3">\t⦁\tUnique Identifiers</string>
+    <string name="cpp_content_3"> – we collect device and network identifiers - basically, ways for us to tell which smart device on our network is your child’s.</string>
+    <string name="cpp_title_4">\t⦁\tCustomer Proprietary Network Information (“CPNI”)</string>
+    <string name="cpp_content_4"> – generated by your child’s use of our wireless voice communications services. Information from your child’s use of our products, services, and network (and other carriers’ networks when roaming domestically or internationally) like usage of connecting carriers and Internet service providers, the Internet Protocol (“IP”) address, text messages, and data use history, content interactions (e.g., how long you use an app), language settings, and other network and device analytics and Wi-Fi connection and usage data.</string>
+    <string name="cpp_title_5">\t⦁\tDevice and service performance and diagnostic information</string>
+    <string name="cpp_content_5"> – this includes reports from your child’s device about signal strength, speeds, app and service performance, dropped calls, call and data failures, geolocation information, and device data.</string>
+    <string name="cpp_title_6">\t⦁\tBack-up information</string>
+    <string name="cpp_content_6"> – including data stored in back-ups and cloud services if your child’s device uploads information to XPLORA Mobile AS / XPLORA TECHNOLOGIES AS.</string>
+    <string name="cpp_title_7">\t⦁\tAudio information</string>
+    <string name="cpp_content_7"> – including voice commands your child provides to our app (for example, for accessibility or hands-free use).</string>
+    <string name="cpp_title_8">\t⦁\tChild’s username</string>
+    <string name="cpp_content_8"> – For joining child friendly activity-based platform Xplora Goplay.</string>
+    <string name="cpp_title_9">\t⦁\tData Usage</string>
+    <string name="cpp_content_9"> – this tells us the amount of data the hotspot uses, and IP addresses associated with websites visited.</string>
+    <string name="cpp_title_10">\t⦁\tUnique Identifiers</string>
+    <string name="cpp_content_10"> – we collect device and network identifiers - basically, ways for us to tell which hotspot on our network is your child’s.</string>
+    <string name="cpp_title_11">How We Use Children’s Data</string>
+    <string name="cpp_content_11">\t⦁\tThe main reason we collect children’s data is to provide the product or service that collected the data. But we may also use children’s data to do things like:</string>
+    <string name="cpp_content_12">\t⦁\tCreate and administer accounts, complete transactions, payments, billing, and requests related to our products and services and third-party products and services charged to your accounts.</string>
+    <string name="cpp_content_13">\t⦁\tCheck eligibility for a particular product or service.</string>
+    <string name="cpp_content_14">\t⦁\tHelp stop fraudulent, malicious, deceptive, abusive, or unlawful activities.</string>
+    <string name="cpp_content_15">\t⦁\tFix errors and ensure the quality, security, and safety of our products and services and network</string>
+    <string name="cpp_content_16">\t⦁\tCooperate with law enforcement and protect the rights, safety, or property of our customers, XPLORA Mobile AS / XPLORA TECHNOLOGIES AS and others.</string>
+    <string name="cpp_content_17">\t⦁\tComply with and enforce legal and regulatory obligations and respond to government requests.</string>
+    <string name="cpp_content_18">\t⦁\tEnforce our policies, terms and conditions, or other agreements.</string>
+    <string name="cpp_content_19">\t⦁\tDefend against or pursue claims, disputes, or litigation.</string>
+    <string name="cpp_title_20">When We Share Children’s Data</string>
+    <string name="cpp_content_20">Sometimes we hire others to help us provide a product or service, and these service providers may need access to children’s data. They are required to keep children’s data we provide them confidential and to use it only to provide the services we requested. We may also share children’s data with third parties, including the government, for legal processes or to protect life and safety where we believe that access, use, preservation, or disclosure of the data is reasonably necessary.</string>
+    <string name="cpp_title_21">Your Rights as a Parent or Guardian</string>
+    <string name="cpp_content_21">Parents and guardians have rights when it comes to their children’s data:</string>
+    <string name="cpp_content_22">\t⦁\tTo change their mind and withdraw consent to the collection of their child(ren)’s personal data.</string>
+    <string name="cpp_content_23">\t⦁\tTo see the personal data XPLORA Mobile AS / XPLORA TECHNOLOGIES AS has collected about their child(ren).</string>
+    <string name="cpp_content_24">\t⦁\tTo ask us to delete personal data XPLORA Mobile AS / XPLORA TECHNOLOGIES AS has collected about their child(ren).</string>
+    <string name="cpp_content_25">\t⦁\tYou can take any of these steps by writing email to support@xplora.com. We may need to collect some data from you to confirm you’re the parent or guardian.</string>
+    <string name="cpp_title_26">Important:</string>
+    <string name="cpp_content_26">We need to collect your child’s data (as described above) to provide the relevant products or services. If you change your mind about giving consent or ask us to delete your child’s data, the product or service may no longer work.</string>
 </resources>