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

Commit 4885f183 authored by Joseph Vincent's avatar Joseph Vincent Committed by Android (Google) Code Review
Browse files

Merge "Remove temp GAIA education screen from PS setup code" into main

parents 96a1e43d d27f9739
Loading
Loading
Loading
Loading
+0 −111
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2024 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<com.google.android.setupdesign.GlifLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ps_account_intro_screen"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:filterTouchesWhenObscured="true">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:layout_marginRight="24dp"
            android:contentDescription="@null"
            android:src="@drawable/ic_security_privacy_alert_primary"/>
        <TextView
            style="@style/PrivateSpaceSetupTextFontStyle"
            android:fontFamily="google-sans"
            android:text="@string/private_space_gaia_education_title"
            android:layout_margin="24dp"
            android:layout_marginTop="40dp"
            android:gravity="center"
            android:textSize="28sp"/>
        <TextView
            style="@style/PrivateSpaceSetupTextFontStyle"
            android:layout_marginLeft="24dp"
            android:layout_marginRight="24dp"
            android:layout_marginBottom="40dp"
            android:textSize="14sp"
            android:text="@string/private_space_gaia_education_description"/>
        <TextView
            style="@style/PrivateSpaceSetupTextFontStyle"
            android:layout_marginLeft="24dp"
            android:layout_marginRight="24dp"
            android:layout_marginBottom="16dp"
            android:textSize="14sp"
            android:text="@string/private_space_gaia_education_header"/>
        <RelativeLayout
            style="@style/PrivateSpaceSetupBulletPointLayoutStyle"
            android:paddingTop="8dp"
            android:paddingBottom="8dp">
            <ImageView
                android:id="@+id/point1"
                style="@style/PrivateSpaceBulletPointIconStyle"
                android:contentDescription="@null"
                android:src="@drawable/ic_text_dot" />
            <TextView
                style="@style/PrivateSpaceBulletPointTextFontStyle"
                android:layout_toRightOf="@+id/point1"
                android:textSize="14sp"
                android:text="@string/private_space_gaia_education_bullet1"/>
        </RelativeLayout>
        <RelativeLayout
            style="@style/PrivateSpaceSetupBulletPointLayoutStyle">
            <ImageView
                android:id="@+id/point2"
                style="@style/PrivateSpaceBulletPointIconStyle"
                android:contentDescription="@null"
                android:src="@drawable/ic_text_dot" />
            <TextView
                style="@style/PrivateSpaceBulletPointTextFontStyle"
                android:layout_toRightOf="@+id/point2"
                android:textSize="14sp"
                android:text="@string/private_space_gaia_education_bullet2"/>
        </RelativeLayout>
        <RelativeLayout
            style="@style/PrivateSpaceSetupBulletPointLayoutStyle">
            <ImageView
                android:id="@+id/point3"
                style="@style/PrivateSpaceBulletPointIconStyle"
                android:contentDescription="@null"
                android:src="@drawable/ic_text_dot" />
            <TextView
                style="@style/PrivateSpaceBulletPointTextFontStyle"
                android:layout_toRightOf="@+id/point3"
                android:textSize="14sp"
                android:text="@string/private_space_gaia_education_bullet3"/>
        </RelativeLayout>
        <RelativeLayout
            style="@style/PrivateSpaceSetupBulletPointLayoutStyle">
            <ImageView
                android:id="@+id/point4"
                style="@style/PrivateSpaceBulletPointIconStyle"
                android:contentDescription="@null"
                android:src="@drawable/ic_text_dot" />
            <TextView
                style="@style/PrivateSpaceBulletPointTextFontStyle"
                android:layout_toRightOf="@+id/point4"
                android:textSize="14sp"
                android:text="@string/private_space_gaia_education_bullet4"/>
        </RelativeLayout>
    </LinearLayout>
</com.google.android.setupdesign.GlifLayout>
+2 −2
Original line number Diff line number Diff line
@@ -25,5 +25,5 @@
    android:icon="@drawable/ic_private_space_icon"
    app:sudUsePartnerHeavyTheme="true"
    app:sudIllustrationType="default"
    app:sucHeaderText="@string/private_space_pre_finish_title">
    app:sucHeaderText="@string/private_space_wait_screen_title">
</com.google.android.setupdesign.GlifLoadingLayout>
+4 −16
Original line number Diff line number Diff line
@@ -35,9 +35,6 @@
        <action
            android:id="@+id/action_set_lock_fragment"
            app:destination="@id/ps_profile_lock_fragment"/>
        <action
            android:id="@+id/action_account_intro_fragment"
            app:destination="@id/ps_account_intro_fragment"/>
    </fragment>
    <fragment android:id="@+id/ps_profile_error_fragment"
              android:name="com.android.settings.privatespace.PrivateProfileCreationError"
@@ -59,9 +56,6 @@
    <fragment android:id="@+id/ps_account_error_fragment"
              android:name="com.android.settings.privatespace.PrivateSpaceAccountLoginError"
              android:label="fragment_account_error">
        <action
            android:id="@+id/action_advance_login_error"
            app:destination="@id/ps_account_intro_fragment"/>
        <action
            android:id="@+id/action_skip_account_login"
            app:destination="@id/ps_profile_lock_fragment"/>
@@ -73,16 +67,10 @@
            android:id="@+id/action_lock_success_fragment"
            app:destination="@id/ps_pre_finish_delay_fragment"/>
    </fragment>
    <fragment android:id="@+id/ps_account_intro_fragment"
              android:name="com.android.settings.privatespace.PrivateSpaceGaiaEducationFragment"
              android:label="fragment_ps_account_intro">
        <action
            android:id="@+id/action_account_lock_fragment"
            app:destination="@id/ps_profile_lock_fragment"/>
        <action
            android:id="@+id/action_advance_login_error"
            app:destination="@id/ps_account_error_fragment"/>
    </fragment>
    <action android:id="@+id/action_pre_finish_delay_fragment"
            app:destination="@id/ps_pre_finish_delay_fragment"/>
    <action android:id="@+id/action_advance_login_error"
            app:destination="@id/ps_account_error_fragment"/>
    <action android:id="@+id/show_set_lock_fragment"
            app:destination="@id/ps_profile_lock_fragment"/>
</navigation>
+1 −17
Original line number Diff line number Diff line
@@ -1380,7 +1380,7 @@
    <!-- Label for private space lock setup button to choose a new lock. [CHAR LIMIT=50] -->
    <string name="private_space_set_lock_label">Choose new lock</string>
    <!-- Title for private space setup pre completion screen to add a delay. [CHAR LIMIT=30] -->
    <string name="private_space_pre_finish_title">Just a sec\u2026</string>
    <string name="private_space_wait_screen_title">Just a sec\u2026</string>
    <!-- Title for private space setup success screen. [CHAR LIMIT=30] -->
    <string name="private_space_success_title">All set!</string>
    <!-- Summary for the private space setup success screen. [CHAR LIMIT=NONE] -->
@@ -1407,22 +1407,6 @@
    <string name="private_space_choose_your_password_header">Set a password for your private space</string>
    <!-- Header for private space choose your pattern screen [CHAR LIMIT=40] -->
    <string name="private_space_choose_your_pattern_header">Set a pattern for your private space</string>
    <!-- Title for private space GAIA education screen [CHAR LIMIT=90] -->
    <string name="private_space_gaia_education_title">Create a Google Account to help keep your data private</string>
    <!-- Description for private space GAIA education screen [CHAR LIMIT=120] -->
    <string name="private_space_gaia_education_description">On the next screen you can sign in to an account to use with your private space</string>
    <!-- Sub header for private space GAIA education screen [CHAR LIMIT=120] -->
    <string name="private_space_gaia_education_header"><b>Create a dedicated account to help stop data appearing outside private space, such as:</b></string>
    <!-- Text for private space GAIA education screen [CHAR LIMIT=90] -->
    <string name="private_space_gaia_education_bullet1">Synced photos, files, emails, contacts, calendar events, and other data</string>
    <!-- Text for private space GAIA education screen [CHAR LIMIT=60] -->
    <string name="private_space_gaia_education_bullet2">App download history and recommendations</string>
    <!-- Text for private space GAIA education screen [CHAR LIMIT=60] -->
    <string name="private_space_gaia_education_bullet3">Browsing history, bookmarks, and saved passwords</string>
    <!-- Text for private space GAIA education screen [CHAR LIMIT=90] -->
    <string name="private_space_gaia_education_bullet4">Suggested content related to your activity in private space apps</string>
    <!-- Text for button in private space GAIA education screen to start login [CHAR LIMIT=20] -->
    <string name="private_space_gaia_education_got_it">Got it</string>
    <!-- The title of the category for settings related to the private space lock  [CHAR LIMIT=20] -->
    <string name="private_space_category_lock">Lock</string>
    <!-- The title of the category for settings related to hiding the private space  [CHAR LIMIT=20] -->
+13 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import static com.android.settings.privatespace.PrivateSpaceSetupActivity.SET_LO

import android.content.Intent;
import android.os.Bundle;
import android.os.UserHandle;
import android.util.Log;

import androidx.activity.result.ActivityResult;
@@ -70,13 +71,22 @@ public class PrivateProfileContextHelperActivity extends FragmentActivity {
        if (savedInstanceState == null) {
            int action = getIntent().getIntExtra(EXTRA_ACTION_TYPE, -1);
            if (action == ACCOUNT_LOGIN_ACTION) {
                setContentView(R.layout.private_space_wait_screen);
                PrivateSpaceLoginFeatureProvider privateSpaceLoginFeatureProvider =
                        FeatureFactory.getFeatureFactory().getPrivateSpaceLoginFeatureProvider();
                UserHandle userHandle =
                        PrivateSpaceMaintainer.getInstance(this).getPrivateProfileHandle();
                if (userHandle != null) {
                    if (!privateSpaceLoginFeatureProvider.initiateAccountLogin(
                        this, mAddAccountToPrivateProfile)) {
                            createContextAsUser(userHandle, 0), mAddAccountToPrivateProfile)) {
                        setResult(RESULT_OK);
                        finish();
                    }
                } else {
                    Log.w(TAG, "Private profile user handle is null");
                    setResult(RESULT_CANCELED);
                    finish();
                }
            } else if (action == SET_LOCK_ACTION) {
                createPrivateSpaceLock();
            }
Loading