Merge "Import translations. DO NOT MERGE" into lmp-dev
diff --git a/res/layout/editor_account_header.xml b/res/layout/editor_account_header.xml
index 93cdad3..59ae3b1 100644
--- a/res/layout/editor_account_header.xml
+++ b/res/layout/editor_account_header.xml
@@ -44,6 +44,7 @@
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:singleLine="true"
+ android:textColor="@color/primary_text_color"
android:ellipsize="end" />
<TextView
@@ -51,7 +52,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorTertiary"
+ android:textColor="@color/primary_text_color"
android:singleLine="true"
android:ellipsize="end" />
diff --git a/res/layout/editor_account_header_with_dropdown.xml b/res/layout/editor_account_header_with_dropdown.xml
index ca876f5..015358e 100644
--- a/res/layout/editor_account_header_with_dropdown.xml
+++ b/res/layout/editor_account_header_with_dropdown.xml
@@ -42,6 +42,7 @@
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:singleLine="true"
+ android:textColor="@color/primary_text_color"
android:ellipsize="end" />
<TextView
@@ -51,8 +52,8 @@
android:paddingRight="8dip"
android:paddingEnd="8dip"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorTertiary"
android:singleLine="true"
+ android:textColor="@color/primary_text_color"
android:ellipsize="end" />
</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2d39407..6a903ec 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -722,4 +722,7 @@
<!-- Prefix for messages that you sent [CHAR LIMIT=40] -->
<string name="message_from_you_prefix">You: <xliff:g id="sms_body">%s</xliff:g></string>
+ <!-- File Authority for the photo picker -->
+ <string name="photo_file_provider_authority">com.android.contacts.files</string>
+
</resources>
diff --git a/src/com/android/contacts/util/ContactPhotoUtils.java b/src/com/android/contacts/util/ContactPhotoUtils.java
index 2b1c19a..3f79da5 100644
--- a/src/com/android/contacts/util/ContactPhotoUtils.java
+++ b/src/com/android/contacts/util/ContactPhotoUtils.java
@@ -28,6 +28,7 @@
import android.support.v4.content.FileProvider;
import android.util.Log;
+import com.android.contacts.R;
import com.google.common.io.Closeables;
import java.io.ByteArrayOutputStream;
@@ -49,8 +50,6 @@
private static final String PHOTO_DATE_FORMAT = "'IMG'_yyyyMMdd_HHmmss";
- public static final String FILE_PROVIDER_AUTHORITY = "com.android.contacts.files";
-
/**
* Generate a new, unique file to be used as an out-of-band communication
* channel, since hi-res Bitmaps are too big to serialize into a Bundle.
@@ -58,12 +57,16 @@
* cropper/etc.), and read by us once they are finished writing it.
*/
public static Uri generateTempImageUri(Context context) {
- return FileProvider.getUriForFile(context, FILE_PROVIDER_AUTHORITY,
+ final String fileProviderAuthority = context.getResources().getString(
+ R.string.photo_file_provider_authority);
+ return FileProvider.getUriForFile(context, fileProviderAuthority,
new File(pathForTempPhoto(context, generateTempPhotoFileName())));
}
public static Uri generateTempCroppedImageUri(Context context) {
- return FileProvider.getUriForFile(context, FILE_PROVIDER_AUTHORITY,
+ final String fileProviderAuthority = context.getResources().getString(
+ R.string.photo_file_provider_authority);
+ return FileProvider.getUriForFile(context, fileProviderAuthority,
new File(pathForTempPhoto(context, generateTempCroppedPhotoFileName())));
}
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java
index 570a24b..bba8a93 100644
--- a/src/com/android/contacts/widget/MultiShrinkScroller.java
+++ b/src/com/android/contacts/widget/MultiShrinkScroller.java
@@ -142,8 +142,6 @@
// Objects used to perform color filtering on the header. These are stored as fields for
// the sole purpose of avoiding "new" operations inside animation loops.
private final ColorMatrix mWhitenessColorMatrix = new ColorMatrix();
- private final ColorMatrixColorFilter mColorFilter = new ColorMatrixColorFilter(
- mWhitenessColorMatrix);
private final ColorMatrix mColorMatrix = new ColorMatrix();
private final float[] mAlphaMatrixValues = {
0, 0, 0, 0, 0,
@@ -1116,8 +1114,7 @@
mColorMatrix.postConcat(multiplyBlendMatrix(mHeaderTintColor, colorAlpha));
}
- mColorFilter.setColorMatrix(mColorMatrix);
- mPhotoView.setColorFilter(mColorFilter);
+ mPhotoView.setColorFilter(new ColorMatrixColorFilter(mColorMatrix));
// Tell the photo view what tint we are trying to achieve. Depending on the type of
// drawable used, the photo view may or may not use this tint.
mPhotoView.setTint(mHeaderTintColor);