summaryrefslogtreecommitdiffstats
path: root/java/com/android/incallui/calllocation
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-03-21 10:11:17 -0700
committerEric Erfanian <erfanian@google.com>2017-03-21 10:11:17 -0700
commitfc37b02f5d3381a7882770941e461b13b679b6ef (patch)
tree23ce96100a89f1cf8847a4967efd35e56b6f8092 /java/com/android/incallui/calllocation
parent30ccc4f3aa6da94f0bb8a01a880a6353b883b263 (diff)
downloadandroid_packages_apps_Dialer-fc37b02f5d3381a7882770941e461b13b679b6ef.tar.gz
android_packages_apps_Dialer-fc37b02f5d3381a7882770941e461b13b679b6ef.tar.bz2
android_packages_apps_Dialer-fc37b02f5d3381a7882770941e461b13b679b6ef.zip
Update AOSP Dialer source from internal google3 repository at
cl/150756069 Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/150392808 (3/16/2017) to cl/150756069 (3/21/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: I0888b5db52efb28eb8194600e0c7804592f975f3
Diffstat (limited to 'java/com/android/incallui/calllocation')
-rw-r--r--java/com/android/incallui/calllocation/CallLocationComponent.java20
-rw-r--r--java/com/android/incallui/calllocation/impl/HttpFetcher.java2
-rw-r--r--java/com/android/incallui/calllocation/stub/StubCallLocationModule.java6
3 files changed, 11 insertions, 17 deletions
diff --git a/java/com/android/incallui/calllocation/CallLocationComponent.java b/java/com/android/incallui/calllocation/CallLocationComponent.java
index 6b1faf299..46ca669db 100644
--- a/java/com/android/incallui/calllocation/CallLocationComponent.java
+++ b/java/com/android/incallui/calllocation/CallLocationComponent.java
@@ -17,26 +17,18 @@
package com.android.incallui.calllocation;
import android.content.Context;
+import com.android.dialer.inject.HasRootComponent;
import dagger.Subcomponent;
-import com.android.incallui.calllocation.stub.StubCallLocationModule;
/** Subcomponent that can be used to access the call location implementation. */
-public class CallLocationComponent {
- private static CallLocationComponent instance;
- private CallLocation callLocation;
+@Subcomponent
+public abstract class CallLocationComponent {
- public CallLocation getCallLocation(){
- if (callLocation == null) {
- callLocation = new StubCallLocationModule.StubCallLocation();
- }
- return callLocation;
- }
+ public abstract CallLocation getCallLocation();
public static CallLocationComponent get(Context context) {
- if (instance == null) {
- instance = new CallLocationComponent();
- }
- return instance;
+ return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component())
+ .callLocationComponent();
}
/** Used to refer to the root application component. */
diff --git a/java/com/android/incallui/calllocation/impl/HttpFetcher.java b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
index c4aaa2257..7bfbaa6ef 100644
--- a/java/com/android/incallui/calllocation/impl/HttpFetcher.java
+++ b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
@@ -223,6 +223,8 @@ public class HttpFetcher {
/**
* Lookup up url re-write rules from gServices and apply to the given url.
*
+ * <p>https://wiki.corp.google.com/twiki/bin/view/Main/AndroidGservices#URL_Rewriting_Rules
+ *
* @return The new url.
*/
private static URL reWriteUrl(Context context, String url) {
diff --git a/java/com/android/incallui/calllocation/stub/StubCallLocationModule.java b/java/com/android/incallui/calllocation/stub/StubCallLocationModule.java
index fc198c724..20460699a 100644
--- a/java/com/android/incallui/calllocation/stub/StubCallLocationModule.java
+++ b/java/com/android/incallui/calllocation/stub/StubCallLocationModule.java
@@ -32,9 +32,9 @@ public abstract class StubCallLocationModule {
@Binds
public abstract CallLocation bindCallLocation(StubCallLocation callLocation);
- static public class StubCallLocation implements CallLocation {
+ static class StubCallLocation implements CallLocation {
@Inject
- public StubCallLocation() {}
+ StubCallLocation() {}
@Override
public boolean canGetLocation(@NonNull Context context) {
@@ -44,7 +44,7 @@ public abstract class StubCallLocationModule {
@Override
@NonNull
public Fragment getLocationFragment(@NonNull Context context) {
- return null;
+ throw Assert.createUnsupportedOperationFailException();
}
@Override