Issue:
"
Actual Results: Pop message "Take a minute to add an account that will back up your contacts to Google" when trying to add contacts on non gms build
Expected Results: No pop message when trying to add contacts on non gms build
Reproduction Steps:
- Flash the latest product build and boot to system
- Launch Contact app
- Tap “+” icon to add contacts
- Pop message "Take a minute to add an account that will back up your contacts to Google"==>Problem
"
Solution:
"
#Solution: Remove add account message on NON-GMS image
"
diff --git a/Android.bp b/Android.bp
index 08288f8..6c8cf73 100644
--- a/Android.bp
+++ b/Android.bp
@@ -22,6 +22,9 @@
"guava",
"libphonenumber",
],
+ libs: [
+ "xxxxutils",
+ ],
certificate: "shared",
product_specific: true,
diff --git a/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java b/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java
index dea134b..ba48ec8 100644
--- a/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 The Android Open Source Project
+ * Copyright (c) 2021 Zebra Technologies Corporation and/or its affiliates. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,6 +41,7 @@
import com.android.contacts.util.ImplicitIntentsUtil;
import java.util.List;
+import com.zebra.util.XXXUtils;
/**
* This activity can be shown to the user when creating a new contact to inform the user about
@@ -122,7 +124,11 @@
if (numAccounts < 0) {
throw new IllegalStateException("Cannot have a negative number of accounts");
}
-
+ if(XXXUtils.isZebra().orElse(false) && !XXX.isGms().orElse(false)){
+ saveAccountAndReturnResult(AccountWithDataSet.getNullAccount());
+ finish();
+ return;
+ }
final View view;
if (numAccounts >= 2) {
// When the user has 2+ writable accounts, show a list of accounts so the user can pick