Settings: Show user's Google avatar on the homepage
Change-Id: I16f3e241d2d2a4a25977fe7428687b88c8fde0c6 Signed-off-by: Jason Edson <jaysonedson@gmail.com>
This commit is contained in:
@@ -245,7 +245,7 @@
|
|||||||
<bool name="config_use_legacy_suggestion">true</bool>
|
<bool name="config_use_legacy_suggestion">true</bool>
|
||||||
|
|
||||||
<!-- Whether or not homepage should display user's account avatar -->
|
<!-- Whether or not homepage should display user's account avatar -->
|
||||||
<bool name="config_show_avatar_in_homepage">false</bool>
|
<bool name="config_show_avatar_in_homepage">true</bool>
|
||||||
|
|
||||||
<!-- Whether or not emergency info tile should display in device info page -->
|
<!-- Whether or not emergency info tile should display in device info page -->
|
||||||
<bool name="config_show_emergency_info_in_device_info">true</bool>
|
<bool name="config_show_emergency_info_in_device_info">true</bool>
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
<bool name="config_show_branded_account_in_device_info">true</bool>
|
<bool name="config_show_branded_account_in_device_info">true</bool>
|
||||||
|
|
||||||
<!-- Whether or not device header widget tile should display in device info page -->
|
<!-- Whether or not device header widget tile should display in device info page -->
|
||||||
<bool name="config_show_device_header_in_device_info">true</bool>
|
<bool name="config_show_device_header_in_device_info">false</bool>
|
||||||
|
|
||||||
<!-- Whether or not TopLevelSettings should force rounded icon for injected tiles -->
|
<!-- Whether or not TopLevelSettings should force rounded icon for injected tiles -->
|
||||||
<bool name="config_force_rounded_icon_TopLevelSettings">false</bool>
|
<bool name="config_force_rounded_icon_TopLevelSettings">false</bool>
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
<bool name="config_suw_support_face_enroll">true</bool>
|
<bool name="config_suw_support_face_enroll">true</bool>
|
||||||
|
|
||||||
<!-- App intent -->
|
<!-- App intent -->
|
||||||
<string name="config_account_intent_uri" translatable="false"></string>
|
<string name="config_account_intent_uri" translatable="false">intent:#Intent;action=com.android.settings.action.VIEW_ACCOUNT;category=android.intent.category.DEFAULT;launchFlags=0x8000;S.extra.callingPackageName=com.android.settings;end</string>
|
||||||
|
|
||||||
<!-- Whether or not the dock settings are to be displayed for this device when docked -->
|
<!-- Whether or not the dock settings are to be displayed for this device when docked -->
|
||||||
<bool name="has_dock_settings">false</bool>
|
<bool name="has_dock_settings">false</bool>
|
||||||
|
|||||||
@@ -12329,7 +12329,7 @@ Data usage charges may apply.</string>
|
|||||||
<string name="disabled_dependent_setting_summary">Depends on another setting</string>
|
<string name="disabled_dependent_setting_summary">Depends on another setting</string>
|
||||||
|
|
||||||
<!-- Account type associated with the backup account. Empty for AOSP. [DO NOT TRANSLATE] -->
|
<!-- Account type associated with the backup account. Empty for AOSP. [DO NOT TRANSLATE] -->
|
||||||
<string name="account_type" translatable="false"></string>
|
<string name="account_type" translatable="false">com.google</string>
|
||||||
<!-- Package to target for Account credential confirmation. This will allow users to
|
<!-- Package to target for Account credential confirmation. This will allow users to
|
||||||
remind/rediscover their backup account password prior to a reset. Empty for AOSP.
|
remind/rediscover their backup account password prior to a reset. Empty for AOSP.
|
||||||
[DO NOT TRANSLATE] -->
|
[DO NOT TRANSLATE] -->
|
||||||
@@ -12340,7 +12340,7 @@ Data usage charges may apply.</string>
|
|||||||
<string name="account_confirmation_class" translatable="false"></string>
|
<string name="account_confirmation_class" translatable="false"></string>
|
||||||
|
|
||||||
<!-- Title for preference showing the primary account on the device [CHAR LIMIT=60]-->
|
<!-- Title for preference showing the primary account on the device [CHAR LIMIT=60]-->
|
||||||
<string name="my_device_info_account_preference_title">Account</string>
|
<string name="my_device_info_account_preference_title">Google Account</string>
|
||||||
<!-- Summary for preference showing the number of the accounts. [CHAR LIMIT=NONE]-->
|
<!-- Summary for preference showing the number of the accounts. [CHAR LIMIT=NONE]-->
|
||||||
<string name="my_device_info_account_preference_summary">%d accounts</string>
|
<string name="my_device_info_account_preference_summary">%d accounts</string>
|
||||||
<!-- Title for preference showing the name of the device. [CHAR LIMIT=60]-->
|
<!-- Title for preference showing the name of the device. [CHAR LIMIT=60]-->
|
||||||
@@ -13084,7 +13084,7 @@ Data usage charges may apply.</string>
|
|||||||
<string name="copyable_slice_toast"><xliff:g id="copy_content" example="Phone number">%1$s</xliff:g> copied to clipboard.</string>
|
<string name="copyable_slice_toast"><xliff:g id="copy_content" example="Phone number">%1$s</xliff:g> copied to clipboard.</string>
|
||||||
|
|
||||||
<!-- String for talkback on the account avatar of the search bar. [CHAR LIMIT=NONE] -->
|
<!-- String for talkback on the account avatar of the search bar. [CHAR LIMIT=NONE] -->
|
||||||
<string name="search_bar_account_avatar_content_description"></string>
|
<string name="search_bar_account_avatar_content_description">Profile picture, double tap to open Google Account</string>
|
||||||
|
|
||||||
<!-- Title for the accessibility usage preference in the Privacy page. [CHAR LIMIT=NONE] -->
|
<!-- Title for the accessibility usage preference in the Privacy page. [CHAR LIMIT=NONE] -->
|
||||||
<string name="accessibility_usage_title">Accessibility usage</string>
|
<string name="accessibility_usage_title">Accessibility usage</string>
|
||||||
|
|||||||
@@ -4,14 +4,17 @@ import android.accounts.Account;
|
|||||||
import android.accounts.AccountManager;
|
import android.accounts.AccountManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
|
|
||||||
public class AccountFeatureProviderImpl implements AccountFeatureProvider {
|
public class AccountFeatureProviderImpl implements AccountFeatureProvider {
|
||||||
@Override
|
@Override
|
||||||
public String getAccountType() {
|
public String getAccountType() {
|
||||||
return "com.google";
|
return FeatureFactory.getAppContext().getString(R.string.account_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Account[] getAccounts(Context context) {
|
public Account[] getAccounts(Context context) {
|
||||||
return AccountManager.get(context).getAccountsByType("com.google");
|
return AccountManager.get(context).getAccountsByType(getAccountType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user