Skip to content

Commit

Permalink
Handle feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek committed Jan 15, 2022
1 parent 61f234d commit 95f520a
Showing 1 changed file with 10 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,10 @@

public class BootSplashActivity extends AppCompatActivity {

protected void forwardIntentToMainActivity(Intent intent) {
Intent intentCopy = new Intent(intent);

intentCopy.setClass(this, MainActivity.class);
intentCopy.putExtras(intent);
intentCopy.setData(intent.getData());
intentCopy.setAction(intent.getAction());

String type = intent.getType();

if (type != null) {
intentCopy.setType(type);
}

startActivity(intentCopy);
finish();
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
forwardIntentToMainActivity(getIntent());
}

@Override
Expand All @@ -34,9 +22,11 @@ protected void onNewIntent(Intent intent) {
forwardIntentToMainActivity(intent);
}

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
forwardIntentToMainActivity(getIntent());
protected void forwardIntentToMainActivity(Intent intent) {
Intent intentCopy = (Intent) intent.clone();
intentCopy.setClass(this, MainActivity.class);

startActivity(intentCopy);
finish();
}
}

0 comments on commit 95f520a

Please sign in to comment.