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

Commit 3593f035 authored by cretin45's avatar cretin45
Browse files

SetupWizard: Part 1: Initial wizard manager conversion

Part 1 implements SetupWizard support if GMS is present.

Change-Id: I0d465a9d84f0c477acc8309511894e9b194762f7
parent 167ac2ca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ LOCAL_JAVA_LIBRARIES := \
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_AAPT_FLAGS := --auto-add-overlay

include frameworks/opt/setupwizard/navigationbar/common.mk
include frameworks/opt/setupwizard/library/common.mk

include $(BUILD_PACKAGE)
+54 −11
Original line number Diff line number Diff line
@@ -43,8 +43,6 @@
    <uses-permission android:name="android.permission.BACKUP" />
    <uses-permission android:name="cyanogenmod.permission.FINISH_SETUP" />
    <uses-permission android:name="cyanogenmod.permission.LEGALESE" />
    <uses-permission android:name="com.cyngn.stats.SEND_ANALYTICS" />
    <uses-permission android:name="com.cyanogen.permission.REQUEST_KILL_SWITCH_OP" />
    <uses-permission android:name="cyanogenmod.permission.WRITE_SETTINGS"/>
    <uses-permission android:name="cyanogenmod.permission.WRITE_SECURE_SETTINGS"/>

@@ -60,8 +58,6 @@
    <protected-broadcast android:name="com.cyanogenmod.setupwizard.SETUP_FINISHED"
                         android:permission="cyanogenmod.permission.FINISH_SETUP"/>

    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23" />

    <application android:label="@string/app_name"
                 android:icon="@mipmap/ic_launcher"
                 android:theme="@style/Theme.Setup"
@@ -77,20 +73,67 @@
                  android:immersive="true"
                  android:windowSoftInputMode="stateAlwaysHidden">

            <intent-filter android:priority="9">
        <!--  <intent-filter android:priority="9">

             <action android:name="android.intent.action.MAIN" />
             <action android:name="android.intent.action.DEVICE_INITIALIZATION_WIZARD" />

             <category android:name="android.intent.category.HOME" />
             <category android:name="android.intent.category.DEFAULT" />
         </intent-filter> -->
     </activity>

        <activity android:name=".ui.WelcomeActivity"
                  android:label="@string/product_name"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
                  android:immersive="true"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="com.cyanogenmod.setupwizard.LINEAGE_WELCOME" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".ui.LocaleActivity"
                  android:label="@string/product_name"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
                  android:immersive="true"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="com.cyanogenmod.setupwizard.LINEAGE_LOCALE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".ui.LineageSettingsActivity"
                  android:label="@string/product_name"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
                  android:immersive="true"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="com.cyanogenmod.setupwizard.LINEAGE_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".ui.FinishActivity"
                  android:label="@string/product_name"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
                  android:immersive="true"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="com.cyanogenmod.setupwizard.LINEAGE_SETUP_COMPLETE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <receiver android:name=".setup.FinishSetupReceiver"
                  android:exported="true">
        <receiver android:name=".PartnerReceiver">
            <intent-filter>
                <action android:name="com.cyanogenmod.setupwizard.ACTION_FINISH_SETUPWIZARD" />
                <action android:name="com.android.setupwizard.action.PARTNER_CUSTOMIZATION" />
            </intent-filter>
        </receiver>
    </application>
+2 −2
Original line number Diff line number Diff line
@@ -17,6 +17,6 @@

<translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="300"
    android:fromXDelta="0%"
    android:toXDelta="-100%"
    android:fromXDelta="100%"
    android:toXDelta="0%"
    android:interpolator="@android:anim/decelerate_interpolator" />
+2 −2
Original line number Diff line number Diff line
@@ -17,6 +17,6 @@

<translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="300"
    android:fromXDelta="-100%"
    android:toXDelta="0%"
    android:fromXDelta="0%"
    android:toXDelta="100%"
    android:interpolator="@android:anim/decelerate_interpolator" />
+70 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 The CyanogenMod Project
     Copyright (C) 2017 The LineageOS 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.cyanogenmod.setupwizard.ui.widget.ScrimInsetsFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/root"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clickable="true"
    android:fitsSystemWindows="true"
    app:insetForeground="@android:color/transparent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@color/primary">

        <Space android:layout_width="match_parent"
               android:layout_height="0px"
               android:layout_weight="1"/>

        <ImageView
            android:id="@+id/brand_logo"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/logo"
            android:adjustViewBounds="true"
            android:scaleType="fitCenter"
            android:padding="@dimen/content_margin_left"/>

        <Space android:layout_width="match_parent"
               android:layout_height="0px"
               android:layout_weight="1"/>


        <fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
                  android:id="@+id/navigation_bar"
                  style="@style/setup_wizard_navbar_style" />

    </LinearLayout>
    <ImageView android:id="@+id/reveal"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:background="@drawable/reveal"
               android:visibility="invisible"/>

    <ProgressBar
        android:id="@+id/finishing_bar"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="8dp"
        android:layout_gravity="bottom"
        android:visibility="gone"/>
</com.cyanogenmod.setupwizard.ui.widget.ScrimInsetsFrameLayout>
Loading