Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 128ecd2b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I4f4f66f5,I77e7ff75

* changes:
  Removed cast to DialtactsActivity.
  Fix incall icon arrow color
parents 1d3dbe88 e332b103
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ import android.view.View;
import android.view.ViewGroup;
import com.android.contacts.common.ContactsUtils;
import com.android.contacts.common.preference.ContactsPreferences;
import com.android.dialer.app.DialtactsActivity;
import com.android.dialer.app.R;
import com.android.dialer.app.calllog.CallLogFragment.CallLogFragmentListener;
import com.android.dialer.app.calllog.CallLogGroupBuilder.GroupCreator;
@@ -395,16 +394,15 @@ public class CallLogAdapter extends GroupingListAdapter
            if (viewHolder.callType == CallLog.Calls.MISSED_TYPE) {
              CallLogAsyncTaskUtil.markCallAsRead(activity, viewHolder.callIds);
              if (activityType == ACTIVITY_TYPE_DIALTACTS) {
                if (v.getContext() instanceof MainActivityPeer.PeerSupplier) {
                Assert.checkState(
                    v.getContext() instanceof MainActivityPeer.PeerSupplier,
                    "%s is not a PeerSupplier",
                    v.getContext().getClass());
                // This is really bad, but we must do this to prevent a dependency cycle, enforce
                // best practices in new code, and avoid refactoring DialtactsActivity.
                  ((FragmentUtilListener)
                          ((MainActivityPeer.PeerSupplier) v.getContext()).getPeer())
                ((FragmentUtilListener) ((MainActivityPeer.PeerSupplier) v.getContext()).getPeer())
                    .getImpl(CallLogFragmentListener.class)
                    .updateTabUnreadCounts();
                } else {
                  ((DialtactsActivity) v.getContext()).updateTabUnreadCounts();
                }
              }
            }
            expandViewHolderActions(viewHolder);
+8 −4
Original line number Diff line number Diff line
@@ -67,8 +67,10 @@ public class CheckableLabeledButton extends LinearLayout implements Checkable {
    CharSequence labelText;
    boolean enabled;

    backgroundMore = getResources().getDrawable(R.drawable.incall_button_background_more, null);
    background = getResources().getDrawable(R.drawable.incall_button_background, null);
    backgroundMore =
        getResources().getDrawable(R.drawable.incall_button_background_more, context.getTheme());
    background =
        getResources().getDrawable(R.drawable.incall_button_background, context.getTheme());

    TypedArray typedArray =
        context.obtainStyledAttributes(attrs, R.styleable.CheckableLabeledButton);
@@ -92,9 +94,11 @@ public class CheckableLabeledButton extends LinearLayout implements Checkable {
    iconView.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
    iconView.setImageDrawable(icon);
    iconView.setImageTintMode(Mode.SRC_IN);
    iconView.setImageTintList(getResources().getColorStateList(R.color.incall_button_icon, null));
    iconView.setImageTintList(
        getResources().getColorStateList(R.color.incall_button_icon, context.getTheme()));

    iconView.setBackground(getResources().getDrawable(R.drawable.incall_button_background, null));
    iconView.setBackground(
        getResources().getDrawable(R.drawable.incall_button_background, context.getTheme()));
    iconView.setDuplicateParentStateEnabled(true);
    iconView.setElevation(getResources().getDimension(R.dimen.incall_button_elevation));
    iconView.setStateListAnimator(
+1 −1
Original line number Diff line number Diff line
@@ -17,5 +17,5 @@

<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:color="?android:attr/colorPrimaryDark" android:state_checked="true"/>
  <item android:color="?android:attr/colorBackgroundFloating"/>
  <item android:color="?android:attr/textColorPrimary"/>
</selector>