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

Commit 7e7f82ac authored by Udam Saini's avatar Udam Saini Committed by Android (Google) Code Review
Browse files

Merge "Changes SetupRedactionInterstitial to be an optional step" into nyc-dev

parents cd1dd624 dd05ab76
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1550,8 +1550,22 @@
        </activity>

        <activity android:name=".SetupRedactionInterstitial"
            android:enabled="false"
            android:exported="true"
            android:taskAffinity="com.android.wizard"
            android:theme="@style/SetupWizardDisableAppStartingTheme"/>
            android:theme="@style/SetupWizardDisableAppStartingTheme"
            android:icon="@drawable/ic_suggested_notifications">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="com.android.settings.suggested.category.DEFAULT_SETUP_WIZARD_ONLY" />
            </intent-filter>
            <meta-data android:name="com.android.settings.require_user_type"
                       android:value="primary" />
            <meta-data android:name="com.android.settings.title"
                       android:resource="@string/notification_suggestion_title" />
            <meta-data android:name="com.android.settings.summary"
                       android:resource="@string/notification_suggestion_summary" />
        </activity>

        <activity android:name=".notification.RedactionInterstitial"/>

+25 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2016 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24.0dp"
        android:height="24.0dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0"
        android:tint="@color/suw_color_accent_light">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M12.0,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0c0.0,1.0 0.89,2.0 2.0,2.0zm6.0,-6.0l0.0,-5.0c0.0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4.0c0.0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.0,0.67 -1.5,1.5l0.0,0.68C7.63,5.36 6.0,7.92 6.0,11.0l0.0,5.0l-2.0,2.0l0.0,1.0l16.0,0.0l0.0,-1.0l-2.0,-2.0z"/>
</vector>
+5 −0
Original line number Diff line number Diff line
@@ -7345,4 +7345,9 @@
    <!-- Message of the dialog box to confirm resetting rate-limiting in the system service ShortcutManager. [CHAR_LIMIT=none] -->
    <string name="confirm_reset_shortcut_manager_throttling_message">Reset ShortcutManager rate-limiting counters?</string>
    <!-- Title of notification suggestion during optional steps of setup. [CHAR_LIMIT=40] -->
    <string name="notification_suggestion_title">Control lock screen notifications</string>
    <!-- Summary of notification suggestion during optional steps of setup. [CHAR_LIMIT=80] -->
    <string name="notification_suggestion_summary">Show or hide notification content</string>
</resources>
+8 −0
Original line number Diff line number Diff line
@@ -18,8 +18,10 @@ package com.android.settings;

import android.app.Activity;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.UserHandle;
@@ -118,6 +120,12 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
                data.putExtra(EXTRA_PASSWORD_QUALITY,
                        lockPatternUtils.getKeyguardStoredPasswordQuality(UserHandle.myUserId()));

                PackageManager packageManager = getPackageManager();
                ComponentName componentName = new ComponentName("com.android.settings",
                        "com.android.settings.SetupRedactionInterstitial");
                packageManager.setComponentEnabledSetting(componentName,
                        PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
                        PackageManager.DONT_KILL_APP);
                super.onActivityResult(requestCode, resultCode, data);
            }
            // If the started activity was cancelled (e.g. the user presses back), then this
+1 −5
Original line number Diff line number Diff line
@@ -109,11 +109,7 @@ public class SetupChooseLockPassword extends ChooseLockPassword {

        @Override
        protected Intent getRedactionInterstitialIntent(Context context) {
            Intent intent = SetupRedactionInterstitial.createStartIntent(context);
            if (intent != null) {
                SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
            }
            return intent;
            return null;
        }

        @Override
Loading