Commit bef7bd02 authored by Michael van Ouwerkerk's avatar Michael van Ouwerkerk Committed by Commit Bot

Remove unused arguments from dynamic modules aidl.

Bug: 843161
Change-Id: Ibaa9c303a72f20af52290471b88a7da071e231e3
Reviewed-on: https://chromium-review.googlesource.com/1120528Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Commit-Queue: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572233}
parent e631b9e1
...@@ -366,8 +366,7 @@ public class CustomTabActivity extends ChromeActivity { ...@@ -366,8 +366,7 @@ public class CustomTabActivity extends ChromeActivity {
mConnection.loadModule(packageName, mIntentDataProvider.getModuleClassName()); mConnection.loadModule(packageName, mIntentDataProvider.getModuleClassName());
if (entryPoint == null) return; if (entryPoint == null) return;
mActivityDelegate = entryPoint.createActivityDelegate( mActivityDelegate = entryPoint.createActivityDelegate(new ActivityHostImpl(this));
new ActivityHostImpl(this), getIntent().getExtras());
mActivityDelegate.onCreate(getSavedInstanceState()); mActivityDelegate.onCreate(getSavedInstanceState());
} }
...@@ -803,14 +802,14 @@ public class CustomTabActivity extends ChromeActivity { ...@@ -803,14 +802,14 @@ public class CustomTabActivity extends ChromeActivity {
if (mWebappTimeSpentLogger != null) { if (mWebappTimeSpentLogger != null) {
mWebappTimeSpentLogger.onPause(); mWebappTimeSpentLogger.onPause();
} }
if (mActivityDelegate != null) mActivityDelegate.onPause(isChangingConfigurations()); if (mActivityDelegate != null) mActivityDelegate.onPause();
} }
@Override @Override
public void onStopWithNative() { public void onStopWithNative() {
super.onStopWithNative(); super.onStopWithNative();
BrowserSessionContentUtils.setActiveContentHandler(null); BrowserSessionContentUtils.setActiveContentHandler(null);
if (mActivityDelegate != null) mActivityDelegate.onStop(isChangingConfigurations()); if (mActivityDelegate != null) mActivityDelegate.onStop();
if (mIsClosing) { if (mIsClosing) {
getTabModelSelector().closeAllTabs(true); getTabModelSelector().closeAllTabs(true);
mTabPersistencePolicy.deleteMetadataStateFileAsync(); mTabPersistencePolicy.deleteMetadataStateFileAsync();
...@@ -822,7 +821,7 @@ public class CustomTabActivity extends ChromeActivity { ...@@ -822,7 +821,7 @@ public class CustomTabActivity extends ChromeActivity {
@Override @Override
protected void onDestroyInternal() { protected void onDestroyInternal() {
super.onDestroyInternal(); super.onDestroyInternal();
if (mActivityDelegate != null) mActivityDelegate.onDestroy(isChangingConfigurations()); if (mActivityDelegate != null) mActivityDelegate.onDestroy();
mConnection.maybeUnloadModule(mIntentDataProvider.getModulePackageName(), mConnection.maybeUnloadModule(mIntentDataProvider.getModulePackageName(),
mIntentDataProvider.getModuleClassName()); mIntentDataProvider.getModuleClassName());
} }
......
...@@ -43,9 +43,9 @@ public class ActivityDelegate { ...@@ -43,9 +43,9 @@ public class ActivityDelegate {
} }
} }
public void onStop(boolean isChangingConfigurations) { public void onStop() {
try { try {
mActivityDelegate.onStop(isChangingConfigurations); mActivityDelegate.onStop();
} catch (RemoteException e) { } catch (RemoteException e) {
assert false; assert false;
} }
...@@ -83,17 +83,17 @@ public class ActivityDelegate { ...@@ -83,17 +83,17 @@ public class ActivityDelegate {
} }
} }
public void onPause(boolean isChangingConfigurations) { public void onPause() {
try { try {
mActivityDelegate.onPause(isChangingConfigurations); mActivityDelegate.onPause();
} catch (RemoteException e) { } catch (RemoteException e) {
assert false; assert false;
} }
} }
public void onDestroy(boolean isChangingConfigurations) { public void onDestroy() {
try { try {
mActivityDelegate.onDestroy(isChangingConfigurations); mActivityDelegate.onDestroy();
} catch (RemoteException e) { } catch (RemoteException e) {
assert false; assert false;
} }
......
...@@ -11,7 +11,7 @@ interface IActivityDelegate { ...@@ -11,7 +11,7 @@ interface IActivityDelegate {
void onStart() = 2; void onStart() = 2;
void onStop(boolean isChangingConfigurations) = 3; void onStop() = 3;
void onWindowFocusChanged(boolean hasFocus) = 4; void onWindowFocusChanged(boolean hasFocus) = 4;
...@@ -21,9 +21,9 @@ interface IActivityDelegate { ...@@ -21,9 +21,9 @@ interface IActivityDelegate {
void onResume() = 7; void onResume() = 7;
void onPause(boolean isChangingConfigurations) = 8; void onPause() = 8;
void onDestroy(boolean isChangingConfigurations) = 9; void onDestroy() = 9;
boolean onBackPressed() = 10; boolean onBackPressed() = 10;
} }
...@@ -12,6 +12,6 @@ interface IModuleEntryPoint { ...@@ -12,6 +12,6 @@ interface IModuleEntryPoint {
void init(in IModuleHost moduleHost) = 0; void init(in IModuleHost moduleHost) = 0;
int getModuleVersion() = 1; int getModuleVersion() = 1;
int getMinimumHostVersion() = 2; int getMinimumHostVersion() = 2;
IActivityDelegate createActivityDelegate(in IActivityHost activityHost, in Bundle data) = 3; IActivityDelegate createActivityDelegate(in IActivityHost activityHost) = 3;
void onDestroy() = 4; void onDestroy() = 4;
} }
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.customtabs.dynamicmodule; package org.chromium.chrome.browser.customtabs.dynamicmodule;
import android.os.Bundle;
import android.os.RemoteException; import android.os.RemoteException;
/** /**
...@@ -45,9 +44,9 @@ public class ModuleEntryPoint { ...@@ -45,9 +44,9 @@ public class ModuleEntryPoint {
return -1; return -1;
} }
public ActivityDelegate createActivityDelegate(ActivityHostImpl activityHost, Bundle data) { public ActivityDelegate createActivityDelegate(ActivityHostImpl activityHost) {
try { try {
return new ActivityDelegate(mEntryPoint.createActivityDelegate(activityHost, data)); return new ActivityDelegate(mEntryPoint.createActivityDelegate(activityHost));
} catch (RemoteException e) { } catch (RemoteException e) {
assert false; assert false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment