Emergency info button design change

Title of Emergency information become subtitle of button, using
anonymous avatar to replace default user icon, using black background
with 85 percent opacity, and change the layout parameter to match UI
guideline.

- Re-layout emergency information button.
- EmergencyInfoGroup refactoring.
- Apply black background with 85 percent opacity, and always using
light text theme without updating theme.

Test: Manually

Bug: 112168722
Bug: 80406570

Change-Id: Ie7b52f312696db06fe0d2b856b56f5bf2be2df8f
Merged-In: Ie7b52f312696db06fe0d2b856b56f5bf2be2df8f
diff --git a/res/drawable-hdpi/ic_arrow_go_next_18.png b/res/drawable-hdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..37cd6df
--- /dev/null
+++ b/res/drawable-hdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-hdpi/logo_avatar_anonymous_120.png b/res/drawable-hdpi/logo_avatar_anonymous_120.png
new file mode 100644
index 0000000..70d3011
--- /dev/null
+++ b/res/drawable-hdpi/logo_avatar_anonymous_120.png
Binary files differ
diff --git a/res/drawable-ldrtl-hdpi/ic_arrow_go_next_18.png b/res/drawable-ldrtl-hdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..b8cef90
--- /dev/null
+++ b/res/drawable-ldrtl-hdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-ldrtl-mdpi/ic_arrow_go_next_18.png b/res/drawable-ldrtl-mdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..fc0a292
--- /dev/null
+++ b/res/drawable-ldrtl-mdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-ldrtl-xhdpi/ic_arrow_go_next_18.png b/res/drawable-ldrtl-xhdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..76c1e7f
--- /dev/null
+++ b/res/drawable-ldrtl-xhdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-ldrtl-xxhdpi/ic_arrow_go_next_18.png b/res/drawable-ldrtl-xxhdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..5914ace
--- /dev/null
+++ b/res/drawable-ldrtl-xxhdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_arrow_go_next_18.png b/res/drawable-mdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..d487ae0
--- /dev/null
+++ b/res/drawable-mdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-mdpi/logo_avatar_anonymous_120.png b/res/drawable-mdpi/logo_avatar_anonymous_120.png
new file mode 100644
index 0000000..60d3c3a
--- /dev/null
+++ b/res/drawable-mdpi/logo_avatar_anonymous_120.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_arrow_go_next_18.png b/res/drawable-xhdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..766a889
--- /dev/null
+++ b/res/drawable-xhdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-xhdpi/logo_avatar_anonymous_120.png b/res/drawable-xhdpi/logo_avatar_anonymous_120.png
new file mode 100644
index 0000000..ec99ca6
--- /dev/null
+++ b/res/drawable-xhdpi/logo_avatar_anonymous_120.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_arrow_go_next_18.png b/res/drawable-xxhdpi/ic_arrow_go_next_18.png
new file mode 100644
index 0000000..bb4d45e
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_arrow_go_next_18.png
Binary files differ
diff --git a/res/drawable-xxhdpi/logo_avatar_anonymous_120.png b/res/drawable-xxhdpi/logo_avatar_anonymous_120.png
new file mode 100644
index 0000000..2b009a3
--- /dev/null
+++ b/res/drawable-xxhdpi/logo_avatar_anonymous_120.png
Binary files differ
diff --git a/res/layout/emergency_dialer.xml b/res/layout/emergency_dialer.xml
index b98b5c4..cdb9530 100644
--- a/res/layout/emergency_dialer.xml
+++ b/res/layout/emergency_dialer.xml
@@ -24,9 +24,6 @@
         android:id="@+id/emergency_dialer_shortcuts"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:paddingLeft="18dp"
-        android:paddingRight="18dp"
-        android:paddingBottom="@dimen/dialpad_bottom_padding"
         android:visibility="gone">
         <LinearLayout
             android:layout_width="match_parent"
@@ -38,14 +35,14 @@
 
         <FrameLayout
             android:id="@+id/dialpad_button_container"
-            android:layout_width="@dimen/floating_action_button_width"
-            android:layout_height="@dimen/floating_action_button_height"
-            android:layout_gravity="bottom|end">
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:layout_gravity="bottom|end"
+            android:layout_margin="@dimen/emergency_dialer_dialpad_button_margin">
             <ImageButton
                 android:id="@+id/floating_action_button_dialpad"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
+                android:layout_width="@dimen/dialpad_button_width"
+                android:layout_height="@dimen/dialpad_button_height"
                 android:background="@drawable/floating_action_button_red"
                 android:contentDescription="@string/description_dialpad_button"
                 android:src="@drawable/ic_dialpad_white_24"/>
diff --git a/res/layout/emergency_information.xml b/res/layout/emergency_information.xml
index c9e9f8b..881fb88 100644
--- a/res/layout/emergency_information.xml
+++ b/res/layout/emergency_information.xml
@@ -13,38 +13,62 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<com.android.phone.EmergencyInfoGroup xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/emergency_info_group"
-    android:layout_height="wrap_content"
+<com.android.phone.EmergencyInfoGroup
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/emergency_info_button"
+    android:layout_height="@dimen/emergency_info_button_height"
     android:layout_width="match_parent"
-    android:layout_marginTop="48dp"
-    android:orientation="vertical">
-    <TextView
-        android:id="@+id/emergency_info_title"
+    android:layout_marginTop="@dimen/emergency_info_button_margin_top">
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:layout_marginEnd="56dp"
+        android:orientation="horizontal">
+        <FrameLayout
+            android:id="@+id/emergency_info_image_container"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:layout_gravity="center_vertical|start"
+            android:layout_marginHorizontal="@dimen/emergency_dialer_image_margin_horizontal">
+            <ImageView
+                android:id="@+id/emergency_info_image"
+                android:layout_height="@dimen/emergency_info_image_height"
+                android:layout_width="@dimen/emergency_info_image_width"
+                android:scaleType="centerCrop"/>
+        </FrameLayout>
+        <LinearLayout
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:orientation="vertical"
+            android:layout_gravity="center_vertical">
+            <TextView
+                android:id="@+id/emergency_info_name"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:includeFontPadding="false"
+                android:textAppearance="@style/HeadlineTextAppearance"/>
+            <TextView
+                android:id="@+id/emergency_info_hint"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:paddingTop="9dp"
+                android:includeFontPadding="false"
+                android:alpha="0.7"
+                android:textAppearance="@style/SubtitleTextAppearance"
+                android:text="@string/emergency_information_hint"/>
+        </LinearLayout>
+    </LinearLayout>
+
+    <FrameLayout
+        android:id="@+id/arrow_go_next_container"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
-        android:layout_gravity="start"
-        android:paddingBottom="12dp"
-        android:textStyle="bold"
-        android:text="@string/emergency_information_title"/>
-    <LinearLayout
-        android:id="@+id/emergency_info_button"
-        android:layout_height="64dp"
-        android:layout_width="match_parent"
-        android:layout_marginTop="2dp"
-        android:orientation="horizontal"
-        android:gravity="center_vertical"
-        android:background="@drawable/btn_emergency_shortcuts">
+        android:layout_gravity="center_vertical|end"
+        android:layout_marginHorizontal="@dimen/emergency_dialer_image_margin_horizontal">
         <ImageView
-            android:id="@+id/emergency_info_image"
-            android:layout_width="40dp"
-            android:layout_height="40dp"
-            android:layout_marginLeft="16dp"
-            android:layout_marginRight="16dp"/>
-        <TextView
-            android:id="@+id/emergency_info_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceButton"/>
-    </LinearLayout>
-</com.android.phone.EmergencyInfoGroup>
\ No newline at end of file
+            android:id="@+id/arrow_go_next"
+            android:layout_height="@dimen/emergency_shortcuts_function_icon_height"
+            android:layout_width="@dimen/emergency_shortcuts_function_icon_width"
+            android:src="@drawable/ic_arrow_go_next_18"/>
+    </FrameLayout>
+</com.android.phone.EmergencyInfoGroup>
diff --git a/res/layout/emergency_shortcut_buttons_group.xml b/res/layout/emergency_shortcut_buttons_group.xml
index 5ba0533..915e5bb 100644
--- a/res/layout/emergency_shortcut_buttons_group.xml
+++ b/res/layout/emergency_shortcut_buttons_group.xml
@@ -18,6 +18,7 @@
     android:id="@+id/emergency_shortcut_buttons_group"
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
+    android:layout_marginHorizontal="@dimen/emergency_shortcut_button_margin_horizontal"
     android:layout_marginTop="58dp"
     android:orientation="vertical">
     <FrameLayout
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 42f9563..f590950 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -113,4 +113,30 @@
 
     <!-- The size of the "emergency calling unavailable" message shown in the emergency dialer -->
     <dimen name="emergency_call_warning_size">16sp</dimen>
+
+    <!-- Horizontal margin for the image on emergency dialer.-->
+    <dimen name="emergency_dialer_image_margin_horizontal">16dp</dimen>
+
+    <!-- Margin of dialpad button -->
+    <dimen name="emergency_dialer_dialpad_button_margin">16dp</dimen>
+
+    <!-- Horizontal margin for button of emergency shortcut. -->
+    <dimen name="emergency_shortcut_button_margin_horizontal">16dp</dimen>
+
+    <!-- Height and top margin for the emergency information button. -->
+    <dimen name="emergency_info_button_height">72dp</dimen>
+    <dimen name="emergency_info_button_margin_top">56dp</dimen>
+
+    <!-- The height and width for the image of emergency information. -->
+    <dimen name="emergency_info_image_height">56dp</dimen>
+    <dimen name="emergency_info_image_width">56dp</dimen>
+
+    <!-- The height and width for the function icon of emergency shortcuts. -->
+    <dimen name="emergency_shortcuts_function_icon_height">24dp</dimen>
+    <dimen name="emergency_shortcuts_function_icon_width">24dp</dimen>
+
+    <!-- The height and width for the dialpad button -->
+    <dimen name="dialpad_button_height">56dp</dimen>
+    <dimen name="dialpad_button_width">56dp</dimen>
+
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e52dfbf..7feae67 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1127,10 +1127,12 @@
     <!-- In-call screen: call failure message displayed in an error dialog when the user is connected to a wireless network, but wifi calling is turned off. [CHAR_LIMIT=NONE] -->
     <string name="incall_error_promote_wfc">Enable Wi-Fi calling to make a call.</string>
 
-    <!-- Title for the button of emergency information -->
-    <string name="emergency_information_title">Emergency information</string>
-    <!-- Content description for the button of emergency information -->
-    <string name="emergency_information_button_content_description"><xliff:g id="user_name">%s</xliff:g>\'s emergency information</string>
+    <!-- Hint for the button of emergency information -->
+    <string name="emergency_information_hint">Emergency information</string>
+    <!-- Hint for the owner of emergency information -->
+    <string name="emergency_information_owner_hint">Owner</string>
+    <!-- Content description for the owner of emergency information -->
+    <string name="emergency_information_owner_content_description"><xliff:g id="user_name">%s</xliff:g>\'s</string>
     <!-- Dialog title for the "radio enable" UI for emergency calls -->
     <string name="emergency_enable_radio_dialog_title">Emergency call</string>
     <!-- Title for the emergency dialpad UI -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index d003aec..64b8c29 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -313,4 +313,15 @@
     <style name="CallSettingsWithoutDividerTheme" parent="SettingsLight">
         <item name="android:listDivider">@null</item>
     </style>
+
+    <style name="HeadlineTextAppearance">
+        <item name="android:textColor">@android:color/white</item>
+        <item name="android:maxLines">1</item>
+        <item name="android:ellipsize">end</item>
+        <item name="android:textSize">24sp</item>
+    </style>
+
+    <style name="SubtitleTextAppearance" parent="@style/HeadlineTextAppearance">
+        <item name="android:textSize">14sp</item>
+    </style>
 </resources>
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index f5c892f..61061d9 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -31,6 +31,7 @@
 import android.content.IntentFilter;
 import android.database.ContentObserver;
 import android.database.Cursor;
+import android.graphics.Color;
 import android.graphics.Point;
 import android.media.AudioManager;
 import android.media.ToneGenerator;
@@ -135,6 +136,9 @@
     /** 90% opacity, different from other gradients **/
     private static final int BACKGROUND_GRADIENT_ALPHA = 230;
 
+    /** 85% opacity for black background **/
+    private static final int BLACK_BACKGROUND_GRADIENT_ALPHA = 217;
+
     ResizingTextEditText mDigits;
     private View mDialButton;
     private View mDelete;
@@ -236,10 +240,20 @@
 
         getWindow().setAttributes(lp);
 
+        mAreEmergencyDialerShortcutsEnabled = Settings.Global.getInt(getContentResolver(),
+                Settings.Global.FASTER_EMERGENCY_PHONE_CALL_ENABLED, 0) != 0;
+
         mColorExtractor = new ColorExtractor(this);
-        GradientColors lockScreenColors = mColorExtractor.getColors(WallpaperManager.FLAG_LOCK,
-                ColorExtractor.TYPE_EXTRA_DARK);
-        updateTheme(lockScreenColors.supportsDarkText());
+
+        // It does not support dark text theme, when emergency dialer shortcuts are enabled.
+        // And the background color is black with 85% opacity.
+        if (mAreEmergencyDialerShortcutsEnabled) {
+            updateTheme(false);
+        } else {
+            GradientColors lockScreenColors = mColorExtractor.getColors(WallpaperManager.FLAG_LOCK,
+                    ColorExtractor.TYPE_EXTRA_DARK);
+            updateTheme(lockScreenColors.supportsDarkText());
+        }
 
         setContentView(R.layout.emergency_dialer);
 
@@ -257,7 +271,8 @@
         ((WindowManager) getSystemService(Context.WINDOW_SERVICE))
                 .getDefaultDisplay().getSize(displaySize);
         mBackgroundGradient.setScreenSize(displaySize.x, displaySize.y);
-        mBackgroundGradient.setAlpha(BACKGROUND_GRADIENT_ALPHA);
+        mBackgroundGradient.setAlpha(mAreEmergencyDialerShortcutsEnabled
+                ? BLACK_BACKGROUND_GRADIENT_ALPHA : BACKGROUND_GRADIENT_ALPHA);
         getWindow().setBackgroundDrawable(mBackgroundGradient);
 
         // Check for the presence of the keypad
@@ -323,9 +338,6 @@
 
         mEmergencyActionGroup = (EmergencyActionGroup) findViewById(R.id.emergency_action_group);
 
-        mAreEmergencyDialerShortcutsEnabled = Settings.Global.getInt(getContentResolver(),
-                Settings.Global.FASTER_EMERGENCY_PHONE_CALL_ENABLED, 0) != 0;
-
         if (mAreEmergencyDialerShortcutsEnabled) {
             setupEmergencyShortcutsView();
         }
@@ -488,6 +500,7 @@
                 return;
             }
             case R.id.floating_action_button_dialpad: {
+                mDigits.getText().clear();
                 switchView(mDialpadView, mEmergencyShortcutView, true);
                 return;
             }
@@ -593,13 +606,19 @@
     @Override
     protected void onStart() {
         super.onStart();
-
-        mColorExtractor.addOnColorsChangedListener(this);
-        GradientColors lockScreenColors = mColorExtractor.getColors(WallpaperManager.FLAG_LOCK,
-                ColorExtractor.TYPE_EXTRA_DARK);
-        // Do not animate when view isn't visible yet, just set an initial state.
-        mBackgroundGradient.setColors(lockScreenColors, false);
-        updateTheme(lockScreenColors.supportsDarkText());
+        // It does not support dark text theme, when emergency dialer shortcuts are enabled.
+        // And set background color to black.
+        if (mAreEmergencyDialerShortcutsEnabled) {
+            mBackgroundGradient.setColors(Color.BLACK, Color.BLACK, false);
+            updateTheme(false);
+        } else {
+            mColorExtractor.addOnColorsChangedListener(this);
+            GradientColors lockScreenColors = mColorExtractor.getColors(WallpaperManager.FLAG_LOCK,
+                    ColorExtractor.TYPE_EXTRA_DARK);
+            // Do not animate when view isn't visible yet, just set an initial state.
+            mBackgroundGradient.setColors(lockScreenColors, false);
+            updateTheme(lockScreenColors.supportsDarkText());
+        }
     }
 
     @Override
@@ -635,7 +654,6 @@
     @Override
     protected void onStop() {
         super.onStop();
-
         mColorExtractor.removeOnColorsChangedListener(this);
     }
 
@@ -1076,7 +1094,7 @@
                 super.onPostExecute(result);
                 if (!isFinishing() && !isDestroyed()) {
                     // Update emergency info with emergency info name
-                    EmergencyInfoGroup group = findViewById(R.id.emergency_info_group);
+                    EmergencyInfoGroup group = findViewById(R.id.emergency_info_button);
                     if (group != null) {
                         group.updateEmergencyInfo(result);
                     }
diff --git a/src/com/android/phone/EmergencyInfoGroup.java b/src/com/android/phone/EmergencyInfoGroup.java
index 67f70b4..5a1d546 100644
--- a/src/com/android/phone/EmergencyInfoGroup.java
+++ b/src/com/android/phone/EmergencyInfoGroup.java
@@ -30,8 +30,8 @@
 import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.view.View;
+import android.widget.FrameLayout;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.android.internal.util.UserIcons;
@@ -42,13 +42,10 @@
  * EmergencyInfoGroup display user icon and user name. And it is an entry point to
  * Emergency Information.
  */
-public class EmergencyInfoGroup extends LinearLayout {
-
+public class EmergencyInfoGroup extends FrameLayout {
     private ImageView mEmergencyInfoImage;
-    private TextView mEmergencyInfoNameTextView;
-    private View mEmergencyInfoTitle;
+    private TextView mEmergencyInfoName;
     private View mEmergencyInfoButton;
-    private String mDefaultEmergencyInfoName;
 
     public EmergencyInfoGroup(Context context, @Nullable AttributeSet attrs) {
         super(context, attrs);
@@ -57,12 +54,9 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-        mEmergencyInfoTitle = findViewById(R.id.emergency_info_title);
         mEmergencyInfoButton = findViewById(R.id.emergency_info_button);
         mEmergencyInfoImage = (ImageView) findViewById(R.id.emergency_info_image);
-        mEmergencyInfoNameTextView = (TextView) findViewById(R.id.emergency_info_name);
-        mDefaultEmergencyInfoName = getContext().getResources().getString(
-                R.string.emergency_information_title);
+        mEmergencyInfoName = (TextView) findViewById(R.id.emergency_info_name);
     }
 
     @Override
@@ -90,24 +84,44 @@
                     .setPackage(packageName);
             mEmergencyInfoButton.setTag(R.id.tag_intent, intent);
             mEmergencyInfoImage.setImageDrawable(getCircularUserIcon());
+
             visible = true;
         }
 
         setVisibility(visible ? View.VISIBLE : View.GONE);
     }
 
+    /**
+     * Get user icon.
+     *
+     * @return user icon, or anonymous avatar if user do not set photo.
+     */
     private Drawable getCircularUserIcon() {
+        final int userId = UserHandle.getCallingUserId();
+
         final UserManager userManager = (UserManager) getContext().getSystemService(
                 Context.USER_SERVICE);
-        Bitmap bitmapUserIcon = userManager.getUserIcon(UserHandle.getCallingUserId());
+
+        // get user icon.
+        Bitmap bitmapUserIcon = userManager.getUserIcon(userId);
 
         if (bitmapUserIcon == null) {
-            // get default user icon.
-            final Drawable defaultUserIcon = UserIcons.getDefaultUserIcon(
-                    getContext().getResources(), UserHandle.getCallingUserId(), false);
-            bitmapUserIcon = UserIcons.convertToBitmap(defaultUserIcon);
+            // use anonymous avatar.
+            return getContext().getDrawable(R.drawable.logo_avatar_anonymous_120);
         }
 
+        // get default user icon.
+        Drawable drawableDefaultUserIcon = UserIcons.getDefaultUserIcon(
+                getContext().getResources(), userId, false);
+        Bitmap bitmapDefaultUserIcon = UserIcons.convertToBitmap(drawableDefaultUserIcon);
+
+        // User icon is default icon that means user do not set photo, replacing default icon
+        // with anonymous avatar on emergency info button.
+        if (bitmapUserIcon.sameAs(bitmapDefaultUserIcon)) {
+            return getContext().getDrawable(R.drawable.logo_avatar_anonymous_120);
+        }
+
+        // set user icon circular.
         RoundedBitmapDrawable drawableUserIcon = RoundedBitmapDrawableFactory.create(
                 getContext().getResources(), bitmapUserIcon);
         drawableUserIcon.setCircular(true);
@@ -116,17 +130,13 @@
     }
 
     void updateEmergencyInfo(String emergencyInfoName) {
-        String infoNameDescription;
         if (TextUtils.isEmpty(emergencyInfoName)) {
-            mEmergencyInfoTitle.setVisibility(View.INVISIBLE);
-            mEmergencyInfoNameTextView.setText(mDefaultEmergencyInfoName);
-            infoNameDescription = mDefaultEmergencyInfoName;
-        } else {
-            mEmergencyInfoTitle.setVisibility(View.VISIBLE);
-            mEmergencyInfoNameTextView.setText(emergencyInfoName);
-            infoNameDescription = getContext().getString(
-                    R.string.emergency_information_button_content_description, emergencyInfoName);
+            emergencyInfoName = getContext().getString(R.string.emergency_information_owner_hint);
         }
-        mEmergencyInfoNameTextView.setContentDescription(infoNameDescription);
+        mEmergencyInfoName.setText(emergencyInfoName);
+
+        final String infoNameDescription = getContext().getString(
+                R.string.emergency_information_owner_content_description, emergencyInfoName);
+        mEmergencyInfoName.setContentDescription(infoNameDescription);
     }
 }
\ No newline at end of file