Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 770b884e authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊 Committed by Nishith Khanna
Browse files

SetupWizard: Add docs link in Parental Control page

parent e9990dda
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ android_app {
        "setupdesign",
        "SystemUISharedLib",
        "org.lineageos.platform.internal",
        "androidx.browser_browser",
    ],

    libs: ["telephony-common"],
+10 −0
Original line number Diff line number Diff line
@@ -48,6 +48,16 @@
                        android:textColor="?android:attr/textColorPrimary"
                        android:text="@string/parental_control_setup_summary" />

                    <TextView
                        android:id="@+id/more_info_textview"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textSize="16sp"
                        android:textColor="?android:colorAccent"
                        android:text="@string/more_info_text"
                        android:clickable="true"
                        android:focusable="true" />

                    <Button
                        android:id="@+id/activate_parental_control"
                        android:layout_width="match_parent"
+2 −1
Original line number Diff line number Diff line
@@ -25,5 +25,6 @@
    <string name="update_recovery_setting_e">Update Recovery alongside the OS</string>
    <string name="activate_parental_control">Activate Parental Control</string>
    <string name="parental_control_setup_title">Set up Parental Control</string>
    <string name="parental_control_setup_summary">This app offers protection against inappropriate content for your children and teenagers. You can activate this feature when lending your phone to your kid or if this is their device.</string>
     <string name="parental_control_setup_summary">This app offers protection against inappropriate content for your children and teenagers. You can activate this feature when lending your phone to your kid or if this is their device. To know more about it please go to</string>
    <string name="more_info_text" translatable="false">https://doc.e.foundation/support-topics/parental-control</string>
</resources>
 No newline at end of file
+16 −0
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@ import androidx.activity.result.ActivityResult;

import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.os.Bundle;
import androidx.browser.customtabs.CustomTabsIntent;

public class ParentalControlActivity extends SubBaseActivity {

@@ -40,6 +42,20 @@ public class ParentalControlActivity extends SubBaseActivity {
                launchParentalControl();
            }
        });
        findViewById(R.id.more_info_textview).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String docUrl = getString(R.string.more_info_text);
                try {
                    CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder().setShowTitle(true).build();
                    customTabsIntent.launchUrl(getApplicationContext(), Uri.parse(docUrl));
                } catch (Exception e) {
                    // Fallback to default browser
                    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(docUrl));
                    startActivity(intent);
                }
            }
        });
    }

    @Override