Skip to content

Commit

Permalink
removing v1 embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelaziz-mahdy committed Dec 11, 2024
1 parent 7726f3c commit 668544f
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,11 @@ public void onCancel(final Object arguments) {
});
this.observer = new LifeCycleObserver(activity);

if (registrar != null) {
// V1 embedding setup for activity listeners.
application.registerActivityLifecycleCallbacks(this.observer);
registrar.addActivityResultListener(this.delegate);
} else {
// V2 embedding setup for activity listeners.
activityBinding.addActivityResultListener(this.delegate);
this.lifecycle = FlutterLifecycleAdapter.getActivityLifecycle(activityBinding);
this.lifecycle.addObserver(this.observer);
}
// V2 embedding setup for activity listeners.
activityBinding.addActivityResultListener(this.delegate);
this.lifecycle = FlutterLifecycleAdapter.getActivityLifecycle(activityBinding);
this.lifecycle.addObserver(this.observer);

}

private void tearDown() {
Expand Down

0 comments on commit 668544f

Please sign in to comment.