aboutsummaryrefslogtreecommitdiff
path: root/java/com
diff options
context:
space:
mode:
authorTingting <tingtingw@google.com>2021-08-26 22:25:38 +0000
committerTingting <tingtingw@google.com>2021-08-27 18:10:25 +0000
commit6d65daf7cd966838cee33ddc213c9727044bdca2 (patch)
tree143bace7286122aa74d0d36be60aa3f98b0f906d /java/com
parentd3c3d492e08f9228e00fd1f7579473035ab35856 (diff)
downloadDialer-6d65daf7cd966838cee33ddc213c9727044bdca2.tar.gz
Remove FSA1 SyncHighResPhoto service ref.
Test: build and manual tests. Bug: 197889602 Change-Id: I3d0e9b002b29a513c5ed8384a0d6c905781d8067
Diffstat (limited to 'java/com')
-rw-r--r--java/com/android/contacts/common/model/account/GoogleAccountType.java4
-rw-r--r--java/com/android/dialer/contacts/hiresphoto/HighResolutionPhotoRequesterImpl.java9
2 files changed, 7 insertions, 6 deletions
diff --git a/java/com/android/contacts/common/model/account/GoogleAccountType.java b/java/com/android/contacts/common/model/account/GoogleAccountType.java
index a25544bb9..8a3c5753a 100644
--- a/java/com/android/contacts/common/model/account/GoogleAccountType.java
+++ b/java/com/android/contacts/common/model/account/GoogleAccountType.java
@@ -196,11 +196,11 @@ public class GoogleAccountType extends BaseAccountType {
@Override
public String getViewContactNotifyServiceClassName() {
- return "com.google.android.syncadapters.contacts." + "SyncHighResPhotoIntentService";
+ return PLUS_EXTENSION_PACKAGE_NAME + ".people.sync.focus.SyncHighResPhotoIntentOperation";
}
@Override
public String getViewContactNotifyServicePackageName() {
- return "com.google.android.syncadapters.contacts";
+ return PLUS_EXTENSION_PACKAGE_NAME;
}
}
diff --git a/java/com/android/dialer/contacts/hiresphoto/HighResolutionPhotoRequesterImpl.java b/java/com/android/dialer/contacts/hiresphoto/HighResolutionPhotoRequesterImpl.java
index 9201604be..0c1461313 100644
--- a/java/com/android/dialer/contacts/hiresphoto/HighResolutionPhotoRequesterImpl.java
+++ b/java/com/android/dialer/contacts/hiresphoto/HighResolutionPhotoRequesterImpl.java
@@ -51,8 +51,8 @@ public class HighResolutionPhotoRequesterImpl implements HighResolutionPhotoRequ
@VisibleForTesting
static final ComponentName SYNC_HIGH_RESOLUTION_PHOTO_SERVICE =
new ComponentName(
- "com.google.android.syncadapters.contacts",
- "com.google.android.syncadapters.contacts.SyncHighResPhotoIntentService");
+ "com.google.android.gms",
+ "com.google.android.gms.people.sync.focus.SyncHighResPhotoIntentOperation");
private final Context appContext;
private final ListeningExecutorService backgroundExecutor;
@@ -81,7 +81,8 @@ public class HighResolutionPhotoRequesterImpl implements HighResolutionPhotoRequ
private void requestInternal(Uri contactUri) throws RequestFailedException {
for (Long rawContactId : getGoogleRawContactIds(getContactId(contactUri))) {
Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
- Intent intent = new Intent(Intent.ACTION_VIEW);
+ Intent intent = new Intent();
+ intent.setAction("com.google.android.gms.people.sync.focus.SYNC_HIGH_RES_PHOTO");
intent.setComponent(SYNC_HIGH_RESOLUTION_PHOTO_SERVICE);
intent.setDataAndType(rawContactUri, RawContacts.CONTENT_ITEM_TYPE);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
@@ -89,7 +90,7 @@ public class HighResolutionPhotoRequesterImpl implements HighResolutionPhotoRequ
LogUtil.i(
"HighResolutionPhotoRequesterImpl.requestInternal",
"requesting photo for " + rawContactUri);
- appContext.startService(intent);
+ appContext.sendBroadcast(intent);
} catch (IllegalStateException | SecurityException e) {
throw new RequestFailedException("unable to start sync adapter", e);
}