尝试在非gms版本上添加联系人时弹出添加帐户消息

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:

  1. Flash the latest product build and boot to system
  2. Launch Contact app
  3. Tap “+” icon to add contacts
  4. 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值