Add sink models to notification builder setters

This commit is contained in:
Joe Farebrother
2024-01-11 14:36:12 +00:00
parent cd19a91704
commit f9bb004618
4 changed files with 106 additions and 12 deletions

View File

@@ -1,13 +1,16 @@
import android.app.Activity;
import android.app.Notification;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
class Test extends Activity {
void test(String password) {
NotificationManagerCompat manager = NotificationManagerCompat.from(this);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "");
builder.setContentText(password);
manager.notify(0, builder.build()); // sensitive-notification
builder.setContentText(password); // $sensitive-notification
}
void test2(String password) {
Notification.Builder builder = new Notification.Builder(this, "");
builder.setContentText(password); // $sensitive-notification
}
}