Merge "Import translations. DO NOT MERGE" into jb-dev
diff --git a/res/drawable-hdpi/btn_dial_textfield_normal.9.png b/res/drawable-hdpi/btn_dial_textfield_normal.9.png
deleted file mode 100644
index 1718372..0000000
--- a/res/drawable-hdpi/btn_dial_textfield_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/btn_dial_textfield_pressed.9.png b/res/drawable-hdpi/btn_dial_textfield_pressed.9.png
deleted file mode 100644
index eb1fda0..0000000
--- a/res/drawable-hdpi/btn_dial_textfield_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/btn_dial_textfield_selected.9.png b/res/drawable-hdpi/btn_dial_textfield_selected.9.png
deleted file mode 100644
index 5ad7b56..0000000
--- a/res/drawable-hdpi/btn_dial_textfield_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_focused_bottom.9.png b/res/drawable-hdpi/tab_focused_bottom.9.png
deleted file mode 100644
index 2fe4a9b..0000000
--- a/res/drawable-hdpi/tab_focused_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_pressed_bottom.9.png b/res/drawable-hdpi/tab_pressed_bottom.9.png
deleted file mode 100644
index 00361aa..0000000
--- a/res/drawable-hdpi/tab_pressed_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/tab_selected_bottom.9.png b/res/drawable-hdpi/tab_selected_bottom.9.png
deleted file mode 100644
index 3cc26bc..0000000
--- a/res/drawable-hdpi/tab_selected_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_textfield_normal.9.png b/res/drawable-mdpi/btn_dial_textfield_normal.9.png
deleted file mode 100644
index 277400b..0000000
--- a/res/drawable-mdpi/btn_dial_textfield_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_textfield_pressed.9.png b/res/drawable-mdpi/btn_dial_textfield_pressed.9.png
deleted file mode 100644
index 57a8dd9..0000000
--- a/res/drawable-mdpi/btn_dial_textfield_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_textfield_selected.9.png b/res/drawable-mdpi/btn_dial_textfield_selected.9.png
deleted file mode 100644
index 5956668..0000000
--- a/res/drawable-mdpi/btn_dial_textfield_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_focused_bottom.9.png b/res/drawable-mdpi/tab_focused_bottom.9.png
deleted file mode 100644
index 0e3bdb0..0000000
--- a/res/drawable-mdpi/tab_focused_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_pressed_bottom.9.png b/res/drawable-mdpi/tab_pressed_bottom.9.png
deleted file mode 100644
index 4bf95d5..0000000
--- a/res/drawable-mdpi/tab_pressed_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/tab_selected_bottom.9.png b/res/drawable-mdpi/tab_selected_bottom.9.png
deleted file mode 100644
index f69f08e..0000000
--- a/res/drawable-mdpi/tab_selected_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_textfield_normal.9.png b/res/drawable-xhdpi/btn_dial_textfield_normal.9.png
deleted file mode 100644
index 9903624..0000000
--- a/res/drawable-xhdpi/btn_dial_textfield_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_textfield_pressed.9.png b/res/drawable-xhdpi/btn_dial_textfield_pressed.9.png
deleted file mode 100644
index 00e2e7e..0000000
--- a/res/drawable-xhdpi/btn_dial_textfield_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/btn_dial_textfield_selected.9.png b/res/drawable-xhdpi/btn_dial_textfield_selected.9.png
deleted file mode 100644
index bf2e27f..0000000
--- a/res/drawable-xhdpi/btn_dial_textfield_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_focused_bottom.9.png b/res/drawable-xhdpi/tab_focused_bottom.9.png
deleted file mode 100644
index d404f0b..0000000
--- a/res/drawable-xhdpi/tab_focused_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_pressed_bottom.9.png b/res/drawable-xhdpi/tab_pressed_bottom.9.png
deleted file mode 100644
index a7e1668..0000000
--- a/res/drawable-xhdpi/tab_pressed_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_bottom.9.png b/res/drawable-xhdpi/tab_selected_bottom.9.png
deleted file mode 100644
index 64ff016..0000000
--- a/res/drawable-xhdpi/tab_selected_bottom.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/btn_dial_textfield.xml b/res/drawable/btn_dial_textfield.xml
deleted file mode 100644
index de914cf..0000000
--- a/res/drawable/btn_dial_textfield.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/btn_dial_textfield_pressed" />
- <item android:state_focused="true"
- android:drawable="@drawable/btn_dial_textfield_selected" />
- <item
- android:drawable="@drawable/btn_dial_textfield_normal" />
-</selector>
-
diff --git a/res/drawable/tab_bottom.xml b/res/drawable/tab_bottom.xml
deleted file mode 100644
index 96f1a24..0000000
--- a/res/drawable/tab_bottom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <!--
- <item android:state_pressed="true" android:drawable="@drawable/tab_pressed_bottom"/>
- <item android:state_focused="false" android:drawable="@drawable/tab_selected_bottom"/>
- <item android:state_focused="true" android:drawable="@drawable/tab_focused_bottom"/>
- -->
-
- <item
- android:state_focused="false"
- android:state_selected="true"
- android:state_pressed="false"
- android:drawable="@drawable/tab_selected_bottom" />
-
- <!-- Focused states -->
- <item
- android:state_focused="true"
- android:state_selected="true"
- android:state_pressed="false"
- android:drawable="@drawable/tab_focused_bottom" />
-
- <!-- Pressed -->
- <item
- android:state_pressed="true"
- android:drawable="@drawable/tab_pressed_bottom" />
-</selector>
\ No newline at end of file
diff --git a/res/layout-land/dialpad_fragment.xml b/res/layout-land/dialpad_fragment.xml
index 4dc87cc..c5f3056 100644
--- a/res/layout-land/dialpad_fragment.xml
+++ b/res/layout-land/dialpad_fragment.xml
@@ -36,7 +36,7 @@
android:scrollHorizontally="true"
android:textSize="@dimen/dialpad_digits_text_size"
android:freezesText="true"
- android:background="@drawable/btn_dial_textfield"
+ android:background="@drawable/dialpad_background"
android:textColor="@color/dialer_button_text"
android:hint="@string/dialerKeyboardHintText"
/>
diff --git a/src/com/android/contacts/ContactLoader.java b/src/com/android/contacts/ContactLoader.java
index 13d4122..fcc6510 100644
--- a/src/com/android/contacts/ContactLoader.java
+++ b/src/com/android/contacts/ContactLoader.java
@@ -1345,6 +1345,10 @@
* contact. If the next load is for a different contact, the cached result will be dropped
*/
public void cacheResult() {
- sCachedResult = new Result(mContact);
+ if (mContact == null) {
+ sCachedResult = null;
+ } else {
+ sCachedResult = new Result(mContact);
+ }
}
}
diff --git a/src/com/android/contacts/TabStripView.java b/src/com/android/contacts/TabStripView.java
deleted file mode 100644
index 9b875d1..0000000
--- a/src/com/android/contacts/TabStripView.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.contacts;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Rect;
-import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.Drawable;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewParent;
-import android.widget.HorizontalScrollView;
-import android.widget.LinearLayout;
-
-/** Extension of LinearLayout that takes care of drawing bottom strips over the tab children. */
-public class TabStripView extends LinearLayout {
-
- private Drawable mBottomLeftStrip;
- private Drawable mBottomRightStrip;
- private int mSelectedTabIndex;
-
- public TabStripView(Context context) {
- this(context, null);
- }
-
- public TabStripView(Context context, AttributeSet attrs) {
- super(context, attrs);
- init();
- }
-
- private void init() {
- mGroupFlags |= FLAG_USE_CHILD_DRAWING_ORDER;
- mBottomLeftStrip = mContext.getResources().getDrawable(
- R.drawable.tab_bottom);
- mBottomRightStrip = mContext.getResources().getDrawable(
- R.drawable.tab_bottom);
- }
-
- public void setSelected(int index, boolean selected) {
- mSelectedTabIndex = index;
- getChildAt(index).setSelected(selected);
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- ViewParent parent = getParent();
- if (parent instanceof HorizontalScrollView) {
- setMinimumWidth(((HorizontalScrollView) getParent()).getMeasuredWidth());
- }
-
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- }
-
- @Override
- protected int getChildDrawingOrder(int childCount, int i) {
- // Always draw the selected tab last, so that drop shadows are drawn
- // in the correct z-order.
- if (i == childCount - 1) {
- return mSelectedTabIndex;
- } else if (i >= mSelectedTabIndex) {
- return i + 1;
- } else {
- return i;
- }
- }
-
- @Override
- public void childDrawableStateChanged(View child) {
- if (child == getChildAt(mSelectedTabIndex)) {
- // To make sure that the bottom strip is redrawn
- invalidate();
- }
- super.childDrawableStateChanged(child);
- }
-
- @Override
- public void dispatchDraw(Canvas canvas) {
- super.dispatchDraw(canvas);
-
- View selectedChild = getChildAt(mSelectedTabIndex);
-
- mBottomRightStrip.setState(selectedChild.getDrawableState());
- mBottomLeftStrip.setState(selectedChild.getDrawableState());
-
- Rect selBounds = new Rect(); // Bounds of the selected tab indicator
- selBounds.left = selectedChild.getLeft() - getScrollX();
- selBounds.right = selectedChild.getRight() - getScrollX();
- final int myHeight = getHeight();
- mBottomLeftStrip.setBounds(
- Math.min(0, selBounds.left
- - mBottomLeftStrip.getIntrinsicWidth()),
- myHeight - mBottomLeftStrip.getIntrinsicHeight(),
- selBounds.left,
- myHeight);
- mBottomRightStrip.setBounds(
- selBounds.right,
- myHeight - mBottomRightStrip.getIntrinsicHeight(),
- Math.max(getWidth(),
- selBounds.right + mBottomRightStrip.getIntrinsicWidth()),
- myHeight);
-
- mBottomLeftStrip.draw(canvas);
- mBottomRightStrip.draw(canvas);
- }
-
-}