Loading src/com/android/contacts/activities/ActionBarAdapter.java +4 −1 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ import android.widget.Toolbar; import com.android.contacts.R; import com.android.contacts.activities.ActionBarAdapter.Listener.Action; import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.list.ContactsRequest; /** * Adapter for the action bar at the top of the Contacts activity. */ Loading Loading @@ -503,6 +503,9 @@ public class ActionBarAdapter implements OnCloseListener { } private void updateStatusBarColor() { if (!CompatUtils.isLollipopCompatible()) { return; // we can't change the status bar color prior to Lollipop } if (mSelectionMode) { final int cabStatusBarColor = mActivity.getResources().getColor( R.color.contextual_selection_bar_status_bar_color); Loading src/com/android/contacts/quickcontact/QuickContactActivity.java +5 −2 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ import com.android.contacts.common.Collapser; import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactsUtils; import com.android.contacts.common.activity.RequestPermissionsActivity; import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.common.dialog.CallSubjectDialog; import com.android.contacts.common.editor.SelectAccountDialogFragment; import com.android.contacts.common.interactions.TouchPointManager; Loading Loading @@ -928,7 +929,9 @@ public class QuickContactActivity extends ContactsActivity return; } if (CompatUtils.isLollipopCompatible()) { getWindow().setStatusBarColor(Color.TRANSPARENT); } processIntent(getIntent()); Loading Loading @@ -2309,7 +2312,7 @@ public class QuickContactActivity extends ContactsActivity } private void updateStatusBarColor() { if (mScroller == null) { if (mScroller == null || !CompatUtils.isLollipopCompatible()) { return; } final int desiredStatusBarColor; Loading src/com/android/contacts/widget/MultiShrinkScroller.java +13 −9 Original line number Diff line number Diff line package com.android.contacts.widget; import com.android.contacts.R; import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.quickcontact.ExpandingEntryCardView; import com.android.contacts.test.NeededForReflection; import com.android.contacts.util.SchedulingUtils; Loading @@ -20,6 +21,8 @@ import android.graphics.ColorMatrixColorFilter; import android.graphics.drawable.GradientDrawable; import android.hardware.display.DisplayManager; import android.os.Trace; import android.support.v4.view.ViewCompat; import android.support.v4.view.animation.PathInterpolatorCompat; import android.util.AttributeSet; import android.util.TypedValue; import android.view.Display; Loading @@ -31,7 +34,6 @@ import android.view.ViewGroup; import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.view.animation.PathInterpolator; import android.widget.EdgeEffect; import android.widget.FrameLayout; import android.widget.LinearLayout; Loading Loading @@ -177,8 +179,8 @@ public class MultiShrinkScroller extends FrameLayout { 0, 0, 0, 1, 0 }; private final PathInterpolator mTextSizePathInterpolator = new PathInterpolator(0.16f, 0.4f, 0.2f, 1); private final Interpolator mTextSizePathInterpolator = PathInterpolatorCompat.create(0.16f, 0.4f, 0.2f, 1); private final int[] mGradientColors = new int[] {0,0x88000000}; private GradientDrawable mTitleGradientDrawable = new GradientDrawable( Loading Loading @@ -526,11 +528,13 @@ public class MultiShrinkScroller extends FrameLayout { public void setHeaderTintColor(int color) { mHeaderTintColor = color; updatePhotoTintAndDropShadow(); // We want to use the same amount of alpha on the new tint color as the previous tint color. if (CompatUtils.isLollipopCompatible()) { // Use the same amount of alpha on the new tint color as the previous tint color. final int edgeEffectAlpha = Color.alpha(mEdgeGlowBottom.getColor()); mEdgeGlowBottom.setColor((color & 0xffffff) | Color.argb(edgeEffectAlpha, 0, 0, 0)); mEdgeGlowTop.setColor(mEdgeGlowBottom.getColor()); } } /** * Expand to maximum size. Loading Loading @@ -1117,9 +1121,9 @@ public class MultiShrinkScroller extends FrameLayout { final int toolbarHeight = getToolbarHeight(); if (toolbarHeight <= mMinimumHeaderHeight && !mIsTwoPanel) { mPhotoViewContainer.setElevation(mToolbarElevation); ViewCompat.setElevation(mPhotoViewContainer, mToolbarElevation); } else { mPhotoViewContainer.setElevation(0); ViewCompat.setElevation(mPhotoViewContainer, 0); } // Reuse an existing mColorFilter (to avoid GC pauses) to change the photo's tint. Loading Loading
src/com/android/contacts/activities/ActionBarAdapter.java +4 −1 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ import android.widget.Toolbar; import com.android.contacts.R; import com.android.contacts.activities.ActionBarAdapter.Listener.Action; import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.list.ContactsRequest; /** * Adapter for the action bar at the top of the Contacts activity. */ Loading Loading @@ -503,6 +503,9 @@ public class ActionBarAdapter implements OnCloseListener { } private void updateStatusBarColor() { if (!CompatUtils.isLollipopCompatible()) { return; // we can't change the status bar color prior to Lollipop } if (mSelectionMode) { final int cabStatusBarColor = mActivity.getResources().getColor( R.color.contextual_selection_bar_status_bar_color); Loading
src/com/android/contacts/quickcontact/QuickContactActivity.java +5 −2 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ import com.android.contacts.common.Collapser; import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactsUtils; import com.android.contacts.common.activity.RequestPermissionsActivity; import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.common.dialog.CallSubjectDialog; import com.android.contacts.common.editor.SelectAccountDialogFragment; import com.android.contacts.common.interactions.TouchPointManager; Loading Loading @@ -928,7 +929,9 @@ public class QuickContactActivity extends ContactsActivity return; } if (CompatUtils.isLollipopCompatible()) { getWindow().setStatusBarColor(Color.TRANSPARENT); } processIntent(getIntent()); Loading Loading @@ -2309,7 +2312,7 @@ public class QuickContactActivity extends ContactsActivity } private void updateStatusBarColor() { if (mScroller == null) { if (mScroller == null || !CompatUtils.isLollipopCompatible()) { return; } final int desiredStatusBarColor; Loading
src/com/android/contacts/widget/MultiShrinkScroller.java +13 −9 Original line number Diff line number Diff line package com.android.contacts.widget; import com.android.contacts.R; import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.quickcontact.ExpandingEntryCardView; import com.android.contacts.test.NeededForReflection; import com.android.contacts.util.SchedulingUtils; Loading @@ -20,6 +21,8 @@ import android.graphics.ColorMatrixColorFilter; import android.graphics.drawable.GradientDrawable; import android.hardware.display.DisplayManager; import android.os.Trace; import android.support.v4.view.ViewCompat; import android.support.v4.view.animation.PathInterpolatorCompat; import android.util.AttributeSet; import android.util.TypedValue; import android.view.Display; Loading @@ -31,7 +34,6 @@ import android.view.ViewGroup; import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.view.animation.PathInterpolator; import android.widget.EdgeEffect; import android.widget.FrameLayout; import android.widget.LinearLayout; Loading Loading @@ -177,8 +179,8 @@ public class MultiShrinkScroller extends FrameLayout { 0, 0, 0, 1, 0 }; private final PathInterpolator mTextSizePathInterpolator = new PathInterpolator(0.16f, 0.4f, 0.2f, 1); private final Interpolator mTextSizePathInterpolator = PathInterpolatorCompat.create(0.16f, 0.4f, 0.2f, 1); private final int[] mGradientColors = new int[] {0,0x88000000}; private GradientDrawable mTitleGradientDrawable = new GradientDrawable( Loading Loading @@ -526,11 +528,13 @@ public class MultiShrinkScroller extends FrameLayout { public void setHeaderTintColor(int color) { mHeaderTintColor = color; updatePhotoTintAndDropShadow(); // We want to use the same amount of alpha on the new tint color as the previous tint color. if (CompatUtils.isLollipopCompatible()) { // Use the same amount of alpha on the new tint color as the previous tint color. final int edgeEffectAlpha = Color.alpha(mEdgeGlowBottom.getColor()); mEdgeGlowBottom.setColor((color & 0xffffff) | Color.argb(edgeEffectAlpha, 0, 0, 0)); mEdgeGlowTop.setColor(mEdgeGlowBottom.getColor()); } } /** * Expand to maximum size. Loading Loading @@ -1117,9 +1121,9 @@ public class MultiShrinkScroller extends FrameLayout { final int toolbarHeight = getToolbarHeight(); if (toolbarHeight <= mMinimumHeaderHeight && !mIsTwoPanel) { mPhotoViewContainer.setElevation(mToolbarElevation); ViewCompat.setElevation(mPhotoViewContainer, mToolbarElevation); } else { mPhotoViewContainer.setElevation(0); ViewCompat.setElevation(mPhotoViewContainer, 0); } // Reuse an existing mColorFilter (to avoid GC pauses) to change the photo's tint. Loading