Skip to content

Commit

Permalink
1.1.4 activity using onCreateIntent to start newIntent() from onStart()
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrvarz committed Aug 28, 2022
1 parent d93f3ae commit 3d70ec5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/timur/webcall/callee/WebCallCalleeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public class WebCallCalleeActivity extends Activity implements CreateNdefMessage
private volatile int callInProgress = 0;
private ValueCallback<Uri[]> filePath = null; // for file selector
private volatile boolean activityVisible = false;
private Intent onCreateIntent = null;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -600,6 +601,8 @@ public void onReceive(Context context, Intent intent) {
if(extendedLogsFlag) {
Log.d(TAG, "onCreate done");
}

onCreateIntent = getIntent();
}

private ServiceConnection serviceConnection = new ServiceConnection() {
Expand Down Expand Up @@ -1124,11 +1127,10 @@ public void onStart() {

checkPermissions();

// check for special intent
// this is needed for activity started by the service (on incoming call)
// or by Android OS intentFilter (as a dial request)
// TODO why does VIEW arrive as act=android.intent.action.MAIN
newIntent(getIntent(),"onStart");
if(onCreateIntent!=null) {
newIntent(onCreateIntent,"onStart");
onCreateIntent = null;
}
}

@Override
Expand Down

0 comments on commit 3d70ec5

Please sign in to comment.