1
1
import android .app .Activity ;
2
2
import android .app .Notification ;
3
3
import androidx .core .app .NotificationCompat ;
4
+ import android .content .Intent ;
5
+ import android .app .PendingIntent ;
4
6
5
7
class Test extends Activity {
6
8
void test (String password ) {
@@ -12,5 +14,17 @@ void test(String password) {
12
14
void test2 (String password ) {
13
15
Notification .Builder builder = new Notification .Builder (this , "" );
14
16
builder .setContentText (password ); // $sensitive-notification
17
+ builder .setContentTitle (password ); // $sensitive-notification
18
+ builder .addAction (0 , password , null ); // $sensitive-notification
19
+ builder .addAction (new Notification .Action (0 , password , null )); // $sensitive-notification
20
+ // builder.setStyle( // TODO: update stubs to include MessagingStyle
21
+ // new Notification.MessagingStyle(password) // $sensitive-notification
22
+ // .setConversationTitle(password)) // $sensitive-notification
23
+ // .addMessage(password, 0, null); // $sensitive-notification
24
+ builder .setStyle (new Notification .BigTextStyle ().bigText (password )); // $sensitive-notification
25
+ Intent intent = new Intent ();
26
+ intent .putExtra ("a" , password );
27
+ builder .setContentIntent (PendingIntent .getActivity (this , 0 , intent , PendingIntent .FLAG_IMMUTABLE )); // $MISSING: sensitive-notification // missing model for getActivity
28
+
15
29
}
16
30
}
0 commit comments