Update for Q setup library changes
setupwizardlib,setupnavigationbar -> setupcompat,setupdesign Change-Id: I8bf75028984dbf9fc2341990e93bd15ca0ad2af8
This commit is contained in:
committed by
Bruno Martins
parent
dc49637898
commit
0ebdabef3c
@@ -15,7 +15,9 @@ LOCAL_PRIVATE_PLATFORM_APIS := true
|
|||||||
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
|
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
|
||||||
|
|
||||||
LOCAL_STATIC_ANDROID_LIBRARIES := \
|
LOCAL_STATIC_ANDROID_LIBRARIES := \
|
||||||
androidx.core_core
|
androidx.core_core \
|
||||||
|
setupcompat \
|
||||||
|
setupdesign
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
LOCAL_STATIC_JAVA_LIBRARIES := \
|
||||||
libphonenumber \
|
libphonenumber \
|
||||||
@@ -28,9 +30,6 @@ LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
|
|||||||
|
|
||||||
LOCAL_USE_AAPT2 := true
|
LOCAL_USE_AAPT2 := true
|
||||||
|
|
||||||
include frameworks/opt/setupwizard/navigationbar/common.mk
|
|
||||||
include frameworks/opt/setupwizard/library/common-gingerbread.mk
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
include $(BUILD_PACKAGE)
|
||||||
|
|
||||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||||
|
|||||||
@@ -64,7 +64,11 @@
|
|||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -42,10 +42,11 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="@dimen/content_margin_left"/>
|
android:padding="@dimen/content_margin_left"/>
|
||||||
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
android:id="@+id/navigation_bar"
|
||||||
android:id="@+id/navigation_bar"
|
style="@style/SudNavBarTheme"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,11 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -103,7 +103,11 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -111,7 +111,11 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
android:id="@+id/navigation_bar"
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
style="@style/setup_wizard_navbar_style" />
|
android:id="@+id/navigation_bar"
|
||||||
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -89,7 +89,11 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -161,8 +161,10 @@
|
|||||||
</ScrollView>
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -38,7 +38,10 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
style="@style/PageContent"/>
|
style="@style/PageContent"/>
|
||||||
|
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -42,9 +42,10 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
android:id="@+id/navigation_bar"
|
||||||
android:id="@+id/navigation_bar"
|
style="@style/SudNavBarTheme"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -67,7 +67,11 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -55,7 +55,11 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -35,9 +35,10 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="@dimen/content_margin_left"/>
|
android:padding="@dimen/content_margin_left"/>
|
||||||
|
|
||||||
|
<com.google.android.setupdesign.view.NavigationBar
|
||||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
|
||||||
android:id="@+id/navigation_bar"
|
android:id="@+id/navigation_bar"
|
||||||
style="@style/setup_wizard_navbar_style" />
|
style="@style/SudNavBarTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/sud_navbar_height" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
|
|
||||||
package org.lineageos.setupwizard;
|
package org.lineageos.setupwizard;
|
||||||
|
|
||||||
import static com.android.setupwizardlib.util.ResultCodes.RESULT_ACTIVITY_NOT_FOUND;
|
import static com.google.android.setupcompat.util.ResultCodes.RESULT_ACTIVITY_NOT_FOUND;
|
||||||
import static com.android.setupwizardlib.util.ResultCodes.RESULT_RETRY;
|
import static com.google.android.setupcompat.util.ResultCodes.RESULT_RETRY;
|
||||||
import static com.android.setupwizardlib.util.ResultCodes.RESULT_SKIP;
|
import static com.google.android.setupcompat.util.ResultCodes.RESULT_SKIP;
|
||||||
|
|
||||||
import static org.lineageos.setupwizard.SetupWizardApp.ACTION_EMERGENCY_DIAL;
|
import static org.lineageos.setupwizard.SetupWizardApp.ACTION_EMERGENCY_DIAL;
|
||||||
import static org.lineageos.setupwizard.SetupWizardApp.ACTION_NEXT;
|
import static org.lineageos.setupwizard.SetupWizardApp.ACTION_NEXT;
|
||||||
@@ -45,22 +45,24 @@ import android.os.UserHandle;
|
|||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
import com.google.android.setupdesign.view.NavigationBar;
|
||||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar.NavigationBarListener;
|
import com.google.android.setupdesign.view.NavigationBar.NavigationBarListener;
|
||||||
import com.android.setupwizardlib.util.SystemBarHelper;
|
import com.google.android.setupcompat.util.SystemBarHelper;
|
||||||
import com.android.setupwizardlib.util.WizardManagerHelper;
|
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||||
|
|
||||||
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class BaseSetupWizardActivity extends Activity implements NavigationBarListener {
|
public abstract class BaseSetupWizardActivity extends Activity implements NavigationBarListener,
|
||||||
|
ViewTreeObserver.OnPreDrawListener {
|
||||||
|
|
||||||
public static final String TAG = BaseSetupWizardActivity.class.getSimpleName();
|
public static final String TAG = BaseSetupWizardActivity.class.getSimpleName();
|
||||||
|
|
||||||
@@ -76,7 +78,11 @@ public abstract class BaseSetupWizardActivity extends Activity implements Naviga
|
|||||||
protected static final int FINGERPRINT_ACTIVITY_REQUEST = 10101;
|
protected static final int FINGERPRINT_ACTIVITY_REQUEST = 10101;
|
||||||
protected static final int SCREENLOCK_ACTIVITY_REQUEST = 10102;
|
protected static final int SCREENLOCK_ACTIVITY_REQUEST = 10102;
|
||||||
|
|
||||||
private SetupWizardNavBar mNavigationBar;
|
private static final int IMMERSIVE_FLAGS =
|
||||||
|
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||||
|
private int mSystemUiFlags = IMMERSIVE_FLAGS | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
|
||||||
|
|
||||||
|
private NavigationBar mNavigationBar;
|
||||||
|
|
||||||
protected boolean mIsActivityVisible = false;
|
protected boolean mIsActivityVisible = false;
|
||||||
protected boolean mIsExiting = false;
|
protected boolean mIsExiting = false;
|
||||||
@@ -94,6 +100,20 @@ public abstract class BaseSetupWizardActivity extends Activity implements Naviga
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mIsPrimaryUser = UserHandle.myUserId() == 0;
|
mIsPrimaryUser = UserHandle.myUserId() == 0;
|
||||||
initLayout();
|
initLayout();
|
||||||
|
mNavigationBar = getNavigationBar();
|
||||||
|
if (mNavigationBar != null) {
|
||||||
|
mNavigationBar.setNavigationBarListener(this);
|
||||||
|
mNavigationBar.addOnLayoutChangeListener((View view,
|
||||||
|
int left, int top, int right, int bottom,
|
||||||
|
int oldLeft, int oldTop, int oldRight, int oldBottom) -> {
|
||||||
|
view.requestApplyInsets();
|
||||||
|
});
|
||||||
|
mNavigationBar.setSystemUiVisibility(mSystemUiFlags);
|
||||||
|
// Set the UI flags before draw because the visibility might change in unexpected /
|
||||||
|
// undetectable times, like transitioning from a finishing activity that had a keyboard
|
||||||
|
ViewTreeObserver viewTreeObserver = mNavigationBar.getViewTreeObserver();
|
||||||
|
viewTreeObserver.addOnPreDrawListener(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -187,16 +207,43 @@ public abstract class BaseSetupWizardActivity extends Activity implements Naviga
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
public boolean onPreDraw() {
|
||||||
mNavigationBar = bar;
|
// View.setSystemUiVisibility checks if the visibility changes before applying them
|
||||||
bar.setUseImmersiveMode(true);
|
// so the performance impact is contained
|
||||||
bar.getView().addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
|
mNavigationBar.setSystemUiVisibility(mSystemUiFlags);
|
||||||
@Override
|
return true;
|
||||||
public void onLayoutChange(View view, int left, int top, int right, int bottom,
|
}
|
||||||
int oldLeft, int oldTop, int oldRight, int oldBottom) {
|
|
||||||
view.requestApplyInsets();
|
/**
|
||||||
|
* @return The navigation bar instance in the layout, or null if the layout does not have a
|
||||||
|
* navigation bar.
|
||||||
|
*/
|
||||||
|
public NavigationBar getNavigationBar() {
|
||||||
|
final View view = findViewById(R.id.navigation_bar);
|
||||||
|
return view instanceof NavigationBar ? (NavigationBar) view : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether system navigation bar should be hidden.
|
||||||
|
* @param useImmersiveMode True to activate immersive mode and hide the system navigation bar
|
||||||
|
*/
|
||||||
|
public void setUseImmersiveMode(boolean useImmersiveMode) {
|
||||||
|
// By default, enable layoutHideNavigation if immersive mode is used
|
||||||
|
setUseImmersiveMode(useImmersiveMode, useImmersiveMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUseImmersiveMode(boolean useImmersiveMode, boolean layoutHideNavigation) {
|
||||||
|
if (useImmersiveMode) {
|
||||||
|
mSystemUiFlags |= IMMERSIVE_FLAGS;
|
||||||
|
if (layoutHideNavigation) {
|
||||||
|
mSystemUiFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
|
||||||
}
|
}
|
||||||
});
|
} else {
|
||||||
|
mSystemUiFlags &= ~(IMMERSIVE_FLAGS | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
if (mNavigationBar != null) {
|
||||||
|
mNavigationBar.setSystemUiVisibility(mSystemUiFlags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setBackDrawable(Drawable drawable) {
|
protected void setBackDrawable(Drawable drawable) {
|
||||||
@@ -431,7 +478,7 @@ public abstract class BaseSetupWizardActivity extends Activity implements Naviga
|
|||||||
|
|
||||||
protected void applyForwardTransition(int transitionId) {
|
protected void applyForwardTransition(int transitionId) {
|
||||||
if (transitionId == TRANSITION_ID_SLIDE) {
|
if (transitionId == TRANSITION_ID_SLIDE) {
|
||||||
overridePendingTransition(R.anim.suw_slide_next_in, R.anim.suw_slide_next_out);
|
overridePendingTransition(R.anim.sud_slide_next_in, R.anim.sud_slide_next_out);
|
||||||
} else if (transitionId == TRANSITION_ID_FADE) {
|
} else if (transitionId == TRANSITION_ID_FADE) {
|
||||||
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
|
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
|
||||||
} else if (transitionId == TRANSITION_ID_DEFAULT) {
|
} else if (transitionId == TRANSITION_ID_DEFAULT) {
|
||||||
@@ -448,7 +495,7 @@ public abstract class BaseSetupWizardActivity extends Activity implements Naviga
|
|||||||
|
|
||||||
protected void applyBackwardTransition(int transitionId) {
|
protected void applyBackwardTransition(int transitionId) {
|
||||||
if (transitionId == TRANSITION_ID_SLIDE) {
|
if (transitionId == TRANSITION_ID_SLIDE) {
|
||||||
overridePendingTransition(R.anim.suw_slide_back_in, R.anim.suw_slide_back_out);
|
overridePendingTransition(R.anim.sud_slide_back_in, R.anim.sud_slide_back_out);
|
||||||
} else if (transitionId == TRANSITION_ID_FADE) {
|
} else if (transitionId == TRANSITION_ID_FADE) {
|
||||||
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
|
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
|
||||||
} else if (transitionId == TRANSITION_ID_DEFAULT) {
|
} else if (transitionId == TRANSITION_ID_DEFAULT) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import android.view.View;
|
|||||||
import android.view.ViewAnimationUtils;
|
import android.view.ViewAnimationUtils;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.android.setupwizardlib.util.WizardManagerHelper;
|
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||||
|
|
||||||
import org.lineageos.setupwizard.util.EnableAccessibilityController;
|
import org.lineageos.setupwizard.util.EnableAccessibilityController;
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import android.view.WindowManagerGlobal;
|
|||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.android.setupwizardlib.util.WizardManagerHelper;
|
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||||
|
|
||||||
import org.lineageos.setupwizard.R;
|
import org.lineageos.setupwizard.R;
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.setupwizardlib.util.WizardManagerHelper;
|
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||||
|
|
||||||
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
||||||
import org.lineageos.setupwizard.wizardmanager.WizardManager;
|
import org.lineageos.setupwizard.wizardmanager.WizardManager;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.setupwizardlib.util.SystemBarHelper;
|
import com.google.android.setupcompat.util.SystemBarHelper;
|
||||||
|
|
||||||
import org.lineageos.setupwizard.util.PhoneMonitor;
|
import org.lineageos.setupwizard.util.PhoneMonitor;
|
||||||
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ package org.lineageos.setupwizard;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.android.setupwizardlib.util.ResultCodes;
|
import com.google.android.setupcompat.util.ResultCodes;
|
||||||
|
|
||||||
import org.lineageos.setupwizard.util.PhoneMonitor;
|
import org.lineageos.setupwizard.util.PhoneMonitor;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package org.lineageos.setupwizard;
|
|||||||
|
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_FORWARD_RESULT;
|
import static android.content.Intent.FLAG_ACTIVITY_FORWARD_RESULT;
|
||||||
|
|
||||||
import static com.android.setupwizardlib.util.ResultCodes.RESULT_ACTIVITY_NOT_FOUND;
|
import static com.google.android.setupcompat.util.ResultCodes.RESULT_ACTIVITY_NOT_FOUND;
|
||||||
|
|
||||||
import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_ACTION_ID;
|
import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_ACTION_ID;
|
||||||
import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_SCRIPT_URI;
|
import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_SCRIPT_URI;
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_RESULT_CODE;
|
|||||||
import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_SCRIPT_URI;
|
import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_SCRIPT_URI;
|
||||||
import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
|
import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
|
||||||
|
|
||||||
import com.android.setupwizardlib.util.ResultCodes;
|
import com.google.android.setupcompat.util.ResultCodes;
|
||||||
import com.android.setupwizardlib.util.WizardManagerHelper;
|
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||||
|
import com.google.android.setupdesign.util.ThemeHelper;
|
||||||
|
|
||||||
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
import org.lineageos.setupwizard.util.SetupWizardUtils;
|
||||||
|
|
||||||
@@ -88,7 +89,7 @@ public class WizardManager extends Activity {
|
|||||||
private void addExtras(Intent intent) {
|
private void addExtras(Intent intent) {
|
||||||
intent.putExtra(WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE, true);
|
intent.putExtra(WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE, true);
|
||||||
intent.putExtra(EXTRA_FIRST_RUN, true);
|
intent.putExtra(EXTRA_FIRST_RUN, true);
|
||||||
intent.putExtra(WizardManagerHelper.EXTRA_THEME, WizardManagerHelper.THEME_MATERIAL_LIGHT);
|
intent.putExtra(WizardManagerHelper.EXTRA_THEME, ThemeHelper.THEME_MATERIAL_LIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doAction(String scriptUri, WizardAction action, Intent extras) {
|
private void doAction(String scriptUri, WizardAction action, Intent extras) {
|
||||||
|
|||||||
Reference in New Issue
Block a user