protected void onCreate(Bundle savedInstanceState) {
//if user is already logged in open the profile activity directly
if (SharedPrefManager.getInstance(this).isLoggedIn()) {
finish();
startActivity(new Intent(this, Home.class));
}
buttonSignIn.setOnClickListener(this);
buttonSignUp.setOnClickListener(this);
}
Can someone please explain to me why is finish()
called before launching the Home.class
if the user is already logged in. I'm trying to go through some source code and not able to understand this.