Remove FSA1 SyncHighResPhoto service ref.
Test: build and manual tests.
Bug: 197889602
Change-Id: I3d0e9b002b29a513c5ed8384a0d6c905781d8067
diff --git a/java/com/android/contacts/common/model/account/GoogleAccountType.java b/java/com/android/contacts/common/model/account/GoogleAccountType.java
index a25544b..8a3c575 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 @@
@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 9201604..0c14613 100644
--- a/java/com/android/dialer/contacts/hiresphoto/HighResolutionPhotoRequesterImpl.java
+++ b/java/com/android/dialer/contacts/hiresphoto/HighResolutionPhotoRequesterImpl.java
@@ -51,8 +51,8 @@
@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 @@
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 @@
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);
}