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

Commit f7f2a4cf authored by twyen's avatar twyen Committed by Eric Erfanian
Browse files

Used VectorDrawable for Blocked Numbers

Previously the icon is tinted with a BitmapDrawable, which glide ignores. This CL uses a VectorDrawable instead.

Bug: 73089932
Test: N/A
PiperOrigin-RevId: 185084222
Change-Id: I99ef5ccf40aeb52f40d21ef8418ea8f16ec0f2dc
parent b841a6ee
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ public class GlidePhotoManagerImpl implements GlidePhotoManager {
  }

  private GlideRequest<Drawable> buildRequest(GlideRequests requestManager, PhotoInfo photoInfo) {
    // Warning: Glide ignores extra attributes on BitmapDrawable such as tint and draw the bitmap
    // directly so be sure not to set tint in the XML of any drawable referenced below.

    // The spam status takes precedence over whether the number is blocked.
    if (photoInfo.isSpam()) {
      return requestManager.load(R.drawable.ic_report_red_48dp);
−2.47 KiB
Loading image diff...
+10 −3
Original line number Diff line number Diff line
@@ -12,6 +12,13 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/ic_block_black_48dp"
    android:tint="#757575" />
 No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
  <path android:pathData="M0 0h24v24H0z"/>
  <path
      android:fillColor="#757575"
      android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"/>
</vector>
 No newline at end of file