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

Commit 9f16d755 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-e5546013-e96c-4ee5-90aa-42a79d072375-for-git_oc-dr1-release-40...

release-request-e5546013-e96c-4ee5-90aa-42a79d072375-for-git_oc-dr1-release-4057695 snap-temp-L89700000069427448

Change-Id: I67a57f982cc9daef8c0b070b0d386515df5c9cd6
parents 042e1158 c303829a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0"
        android:tint="?attr/colorControlNormal">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"/>
</vector>
+7 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ public class LetterTileDrawable extends Drawable {
   */
  public static final int TYPE_GENERIC_AVATAR = 4;
  public static final int TYPE_SPAM = 5;
  public static final int TYPE_CONFERENCE = 6;
  @ContactType public static final int TYPE_DEFAULT = TYPE_PERSON;

  /**
@@ -99,6 +100,8 @@ public class LetterTileDrawable extends Drawable {
  private static Drawable sDefaultBusinessAvatar;
  private static Drawable sDefaultVoicemailAvatar;
  private static Drawable sDefaultSpamAvatar;
  private static Drawable sDefaultConferenceAvatar;

  private final Paint mPaint;
  @ContactType private int mContactType = TYPE_DEFAULT;
  private float mScale = 1.0f;
@@ -122,6 +125,7 @@ public class LetterTileDrawable extends Drawable {
      sDefaultBusinessAvatar = res.getDrawable(R.drawable.quantum_ic_business_vd_theme_24, null);
      sDefaultVoicemailAvatar = res.getDrawable(R.drawable.quantum_ic_voicemail_vd_theme_24, null);
      sDefaultSpamAvatar = res.getDrawable(R.drawable.quantum_ic_report_vd_theme_24, null);
      sDefaultConferenceAvatar = res.getDrawable(R.drawable.quantum_ic_group_vd_theme_24, null);
      sPaint.setTypeface(
          Typeface.create(res.getString(R.string.letter_tile_letter_font_family), Typeface.NORMAL));
      sPaint.setTextAlign(Align.CENTER);
@@ -159,6 +163,9 @@ public class LetterTileDrawable extends Drawable {
      case TYPE_SPAM:
        mScale = VECTOR_ICON_SCALE;
        return sDefaultSpamAvatar;
      case TYPE_CONFERENCE:
        mScale = VECTOR_ICON_SCALE;
        return sDefaultConferenceAvatar;
      case TYPE_PERSON:
      case TYPE_GENERIC_AVATAR:
      default:
+9 −5
Original line number Diff line number Diff line
@@ -56,11 +56,15 @@ public class CallLogAsyncTaskUtil {
          public Void doInBackground(Void... params) {
            ContentValues values = new ContentValues();
            values.put(Voicemails.IS_READ, true);
            context
            // "External" changes to the database will be automatically marked as dirty, but this
            // voicemail might be from dialer so it need to be marked manually.
            values.put(Voicemails.DIRTY, 1);
            if (context
                    .getContentResolver()
                .update(voicemailUri, values, Voicemails.IS_READ + " = 0", null);

                    .update(voicemailUri, values, Voicemails.IS_READ + " = 0", null)
                > 0) {
              uploadVoicemailLocalChangesToServer(context);
            }

            Intent intent = new Intent(context, CallLogNotificationsService.class);
            intent.setAction(CallLogNotificationsService.ACTION_MARK_NEW_VOICEMAILS_AS_OLD);
+2 −1
Original line number Diff line number Diff line
@@ -275,7 +275,8 @@ public class FilteredNumberCompat {
        && safeBlockedNumbersContractCanCurrentUserBlockNumbers(context);
  }

  static void setCanAttemptBlockOperationsForTest(boolean canAttempt) {
  @VisibleForTesting(otherwise = VisibleForTesting.NONE)
  public static void setCanAttemptBlockOperationsForTest(boolean canAttempt) {
    canAttemptBlockOperationsForTest = canAttempt;
  }

+9 −6
Original line number Diff line number Diff line
@@ -22,12 +22,12 @@ import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.os.AsyncTask;
import android.preference.PreferenceManager;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
import android.provider.Settings;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;
import android.support.v4.os.UserManagerCompat;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.widget.Toast;
@@ -39,6 +39,7 @@ import com.android.dialer.notification.NotificationChannelManager;
import com.android.dialer.notification.NotificationChannelManager.Channel;
import com.android.dialer.util.DialerUtils;
import com.android.dialer.util.PermissionsUtil;
import java.util.concurrent.TimeUnit;

/** Utility to help with tasks related to filtered numbers. */
public class FilteredNumbersUtil {
@@ -54,7 +55,7 @@ public class FilteredNumbersUtil {
  protected static final String NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY =
      "notified_call_blocking_disabled_by_emergency_call";
  // Disable incoming call blocking if there was a call within the past 2 days.
  private static final long RECENT_EMERGENCY_CALL_THRESHOLD_MS = 1000 * 60 * 60 * 24 * 2;
  static final long RECENT_EMERGENCY_CALL_THRESHOLD_MS = TimeUnit.DAYS.toMillis(2);

  /**
   * Used for testing to specify the custom threshold value, in milliseconds for whether an
@@ -210,14 +211,16 @@ public class FilteredNumbersUtil {
      return;
    }

    PreferenceManager.getDefaultSharedPreferences(context)
    DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
        .edit()
        .putLong(LAST_EMERGENCY_CALL_MS_PREF_KEY, System.currentTimeMillis())
        .putBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, false)
        .apply();

    if (UserManagerCompat.isUserUnlocked(context)) {
      maybeNotifyCallBlockingDisabled(context);
    }
  }

  public static void maybeNotifyCallBlockingDisabled(final Context context) {
    // The Dialer is not responsible for this notification after migrating
@@ -225,7 +228,7 @@ public class FilteredNumbersUtil {
      return;
    }
    // Skip if the user has already received a notification for the most recent emergency call.
    if (PreferenceManager.getDefaultSharedPreferences(context)
    if (DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
        .getBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, false)) {
      return;
    }
@@ -265,7 +268,7 @@ public class FilteredNumbersUtil {
                builder.build());

            // Record that the user has been notified for this emergency call.
            PreferenceManager.getDefaultSharedPreferences(context)
            DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext(context)
                .edit()
                .putBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, true)
                .apply();
Loading