mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-09-20 04:34:47 -04:00
Various small patches
7408144e1b
> extend Network/Sensors permission handling for legacy apps not targeting Android 6 > or above (API 23) to resolve a UI issue where the user choosing to grant the > Network/Sensors permissions via the legacy permission review interface doesn't > appear in the Settings app info page22d32cb61b
suppresses https://github.com/Divested-Mobile/DivestOS-Build/discussions/11266f406b979
3f69205d06
nice to have Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
e6a7cd6a14
commit
da63c9e571
10 changed files with 178 additions and 0 deletions
|
@ -0,0 +1,53 @@
|
|||
From 66f406b9797194895e607b080cefa5ab27189e77 Mon Sep 17 00:00:00 2001
|
||||
From: Chirayu Desai <chirayudesai1@gmail.com>
|
||||
Date: Wed, 25 May 2022 23:59:57 +0100
|
||||
Subject: [PATCH] Don't prompt to add account when creating a contact
|
||||
|
||||
---
|
||||
.../ContactEditorAccountsChangedActivity.java | 33 +++----------------
|
||||
1 file changed, 5 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java b/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java
|
||||
index 8f0509bab..1ae79a8bb 100644
|
||||
--- a/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java
|
||||
+++ b/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java
|
||||
@@ -171,34 +171,11 @@ public void onClick(View v) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
- // If the user has 0 writable accounts, we will just show the user a message with 2
|
||||
- // possible action buttons.
|
||||
- view = View.inflate(this,
|
||||
- R.layout.contact_editor_accounts_changed_activity_with_text, null);
|
||||
-
|
||||
- final TextView textView = (TextView) view.findViewById(R.id.text);
|
||||
- final Button leftButton = (Button) view.findViewById(R.id.left_button);
|
||||
- final Button rightButton = (Button) view.findViewById(R.id.right_button);
|
||||
-
|
||||
- textView.setText(getString(R.string.contact_editor_prompt_zero_accounts));
|
||||
-
|
||||
- // This button allows the user to continue editing the contact as a phone-only
|
||||
- // local contact.
|
||||
- leftButton.setText(getString(android.R.string.cancel));
|
||||
- leftButton.setOnClickListener(new OnClickListener() {
|
||||
- @Override
|
||||
- public void onClick(View v) {
|
||||
- // Remember that the user wants to create local contacts, so the user is not
|
||||
- // prompted again with this activity.
|
||||
- saveAccountAndReturnResult(AccountWithDataSet.getNullAccount());
|
||||
- finish();
|
||||
- }
|
||||
- });
|
||||
-
|
||||
- // This button allows the user to add a new account to the device and return to
|
||||
- // this app afterwards.
|
||||
- rightButton.setText(getString(R.string.add_account));
|
||||
- rightButton.setOnClickListener(mAddAccountClickListener);
|
||||
+ view = null; // Only to make the compiler happy
|
||||
+ // If the user has 0 writable accounts, don't bother, let them continue editing
|
||||
+ // the contact as a phone-only local contact.
|
||||
+ saveAccountAndReturnResult(AccountWithDataSet.getNullAccount());
|
||||
+ finish();
|
||||
}
|
||||
|
||||
if (mDialog != null && mDialog.isShowing()) {
|
Loading…
Add table
Add a link
Reference in a new issue