Change to add temp GAIA education screen and swap account and lock flow
The change does below things: - Interchange account and lock setup in PS setup - After profile creation checks if network is present and starts new GAIA education screen If network is not present on device skips account login and shows lock setup screen. - Adds a temp GAIA education screen before starting of account login which can skip to lock setup or start account login Recording link : b/326389818#comment5 Screenshot : go/ss/7qWLUF4WDHFBQzi.png go/ss/A8EvoCFJwihaTQP.png Bug: 326389818 Test: Manual Change-Id: I91e3591c60aae22fc10058fb94dcb624573d2e37
This commit is contained in:
@@ -24,6 +24,9 @@ import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@@ -81,8 +84,13 @@ public class AutoAdvanceSetupFragment extends InstrumentedFragment {
|
||||
getContext(),
|
||||
SettingsEnums.ACTION_PRIVATE_SPACE_SETUP_SPACE_CREATED,
|
||||
true);
|
||||
NavHostFragment.findNavController(AutoAdvanceSetupFragment.this)
|
||||
.navigate(R.id.action_set_lock_fragment);
|
||||
if (isConnectedToInternet()) {
|
||||
NavHostFragment.findNavController(AutoAdvanceSetupFragment.this)
|
||||
.navigate(R.id.action_account_intro_fragment);
|
||||
} else {
|
||||
NavHostFragment.findNavController(AutoAdvanceSetupFragment.this)
|
||||
.navigate(R.id.action_set_lock_fragment);
|
||||
}
|
||||
} else {
|
||||
mMetricsFeatureProvider.action(
|
||||
getContext(),
|
||||
@@ -190,4 +198,13 @@ public class AutoAdvanceSetupFragment extends InstrumentedFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Returns true if device has an active internet connection, false otherwise. */
|
||||
private boolean isConnectedToInternet() {
|
||||
ConnectivityManager cm =
|
||||
(ConnectivityManager)
|
||||
getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
|
||||
return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user