summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2018-02-15 11:11:12 -0800
committerCopybara-Service <copybara-piper@google.com>2018-02-22 01:24:36 -0800
commit410451fcec2e9d6c6e7d2371a401981d4d73faad (patch)
tree6aca2f4708f8d8fb6da7fc42b5a1a01e1dce6590 /java
parent7ca3851cdd7d87822b4615d58e1cb61dc232ddb8 (diff)
Implemented hangouts connection into GoogleMainActivity.
Bug: 72525950 Test: disabled GoogleDialtactsActivity and was able to place a call over wifi. PiperOrigin-RevId: 185867741 Change-Id: Id24b2318a8557a1b3262ff99b62303f4555728ed
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/main/MainActivityPeer.java2
-rw-r--r--java/com/android/dialer/main/impl/MainSearchController.java2
-rw-r--r--java/com/android/dialer/main/impl/NewMainActivityPeer.java3
-rw-r--r--java/com/android/dialer/main/impl/OldMainActivityPeer.java14
4 files changed, 17 insertions, 4 deletions
diff --git a/java/com/android/dialer/main/MainActivityPeer.java b/java/com/android/dialer/main/MainActivityPeer.java
index 6457b607b..c1a328a65 100644
--- a/java/com/android/dialer/main/MainActivityPeer.java
+++ b/java/com/android/dialer/main/MainActivityPeer.java
@@ -28,6 +28,8 @@ public interface MainActivityPeer {
void onActivityStop();
+ void onActivityDestroyed();
+
void onNewIntent(Intent intent);
void onActivityResult(int requestCode, int resultCode, Intent data);
diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java
index 7098f8844..d0e593c80 100644
--- a/java/com/android/dialer/main/impl/MainSearchController.java
+++ b/java/com/android/dialer/main/impl/MainSearchController.java
@@ -261,7 +261,7 @@ public class MainSearchController implements SearchBarListener {
* <p>Unless this method is being called for the first time in {@link #openSearch(Optional)} or
* {@link #showDialpad(boolean)}, it should never return null.
*/
- private DialpadFragment getDialpadFragment() {
+ protected DialpadFragment getDialpadFragment() {
return (DialpadFragment)
mainActivity.getFragmentManager().findFragmentByTag(DIALPAD_FRAGMENT_TAG);
}
diff --git a/java/com/android/dialer/main/impl/NewMainActivityPeer.java b/java/com/android/dialer/main/impl/NewMainActivityPeer.java
index 0a85667a1..ed67df936 100644
--- a/java/com/android/dialer/main/impl/NewMainActivityPeer.java
+++ b/java/com/android/dialer/main/impl/NewMainActivityPeer.java
@@ -60,6 +60,9 @@ public class NewMainActivityPeer implements MainActivityPeer {
public void onActivityStop() {}
@Override
+ public void onActivityDestroyed() {}
+
+ @Override
public void onNewIntent(Intent intent) {}
@Override
diff --git a/java/com/android/dialer/main/impl/OldMainActivityPeer.java b/java/com/android/dialer/main/impl/OldMainActivityPeer.java
index c46e61bd0..b63970103 100644
--- a/java/com/android/dialer/main/impl/OldMainActivityPeer.java
+++ b/java/com/android/dialer/main/impl/OldMainActivityPeer.java
@@ -191,7 +191,7 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen
searchController = getNewMainSearchController(bottomNav, fab, toolbar);
toolbar.setSearchBarListener(searchController);
- onDialpadQueryChangedListener = new MainOnDialpadQueryChangedListener(searchController);
+ onDialpadQueryChangedListener = getNewOnDialpadQueryChangedListener(searchController);
dialpadListener =
new MainDialpadListener(mainActivity, searchController, getLastOutgoingCallListener);
searchFragmentListener = new MainSearchFragmentListener(searchController);
@@ -285,6 +285,9 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen
mainActivity.getSystemService(KeyguardManager.class).isKeyguardLocked());
}
+ @Override
+ public void onActivityDestroyed() {}
+
private void showPostCallPrompt() {
if (TelecomUtil.isInManagedCall(mainActivity)) {
// No prompt to show if the user is in a call
@@ -360,6 +363,11 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen
return new MainSearchController(mainActivity, bottomNavBar, fab, mainToolbar);
}
+ public MainOnDialpadQueryChangedListener getNewOnDialpadQueryChangedListener(
+ MainSearchController mainSearchController) {
+ return new MainOnDialpadQueryChangedListener(mainSearchController);
+ }
+
/** @see OnContactSelectedListener */
private static final class MainOnContactSelectedListener implements OnContactSelectedListener {
@@ -378,12 +386,12 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen
}
/** @see OnDialpadQueryChangedListener */
- private static final class MainOnDialpadQueryChangedListener
+ protected static class MainOnDialpadQueryChangedListener
implements OnDialpadQueryChangedListener {
private final MainSearchController searchController;
- MainOnDialpadQueryChangedListener(MainSearchController searchController) {
+ protected MainOnDialpadQueryChangedListener(MainSearchController searchController) {
this.searchController = searchController;
}