Skip to content

Commit

Permalink
add comments to helping review
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahengguo123 committed Oct 16, 2024
1 parent 688180a commit 144ea9c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/src/main/java/org/schabi/newpipe/RouterActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ public class RouterActivity extends AppCompatActivity {
private AlertDialog alertDialogChoice = null;
private FragmentManager.FragmentLifecycleCallbacks dismissListener = null;

/**
* Initializes the activity based on the incoming intent. This activity acts as a router
* to direct the user to different parts of the app based on the URL or action specified
* in the intent. It handles special URLs like 'newpipe://search?q=query' to trigger
* search directly or standard URLs to open specific videos, playlists, or channels.
*/
@Override
protected void onCreate(final Bundle savedInstanceState) {
ThemeHelper.setDayNightMode(this);
Expand All @@ -154,10 +160,11 @@ protected void onCreate(final Bundle savedInstanceState) {
getWindow().setAttributes(params);

super.onCreate(savedInstanceState);
// Restoring state with Icepick for handling screen rotations more efficiently
Icepick.restoreInstanceState(this, savedInstanceState);

final Intent intent = getIntent();
final Uri data = intent.getData();
final Intent actionIntent = getIntent();
final Uri data = actionIntent.getData();
if (data != null) {
final String scheme = data.getScheme();
final String host = data.getHost();
Expand Down

0 comments on commit 144ea9c

Please sign in to comment.