Show qr code in "Share your audio" dialog
Test: atest Bug: 381775542 Flag: com.android.settingslib.flags.enable_le_audio_sharing Change-Id: I6fe339beb50803989d4110fca681e609d2d600c1
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.connecteddevice.audiosharing;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Bitmap;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@@ -147,7 +148,7 @@ public class AudioSharingDialogFactory {
|
||||
/**
|
||||
* Sets the custom image of the dialog custom body.
|
||||
*
|
||||
* @param iconRes The text to be used for the title.
|
||||
* @param iconRes The iconRes to be used for the image.
|
||||
* @return This builder.
|
||||
*/
|
||||
@NonNull
|
||||
@@ -158,6 +159,20 @@ public class AudioSharingDialogFactory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the custom image of the dialog custom body.
|
||||
*
|
||||
* @param bitmap The bitmap to be used for the image.
|
||||
* @return This builder.
|
||||
*/
|
||||
@NonNull
|
||||
public AudioSharingDialogFactory.DialogBuilder setCustomImage(Bitmap bitmap) {
|
||||
ImageView image = mCustomBody.findViewById(R.id.description_image);
|
||||
image.setImageBitmap(bitmap);
|
||||
image.setVisibility(View.VISIBLE);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the custom message of the dialog custom body.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user