File tree 1 file changed +7
-0
lines changed
app/src/main/java/us/spotco/malwarescanner
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public class MainActivity extends AppCompatActivity {
69
69
private TextView logView ;
70
70
71
71
private static final int REQUEST_PERMISSION_EXTERNAL_STORAGE = 0 ;
72
+ private static final int REQUEST_PERMISSION_POST_NOTIFICATIONS = 0 ;
72
73
73
74
@ Override
74
75
protected final void onCreate (Bundle savedInstanceState ) {
@@ -143,6 +144,12 @@ public final boolean onCreateOptionsMenu(Menu menu) {
143
144
}
144
145
145
146
private void requestPermissions () {
147
+ if (SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
148
+ if (checkSelfPermission (Manifest .permission .POST_NOTIFICATIONS ) != PackageManager .PERMISSION_GRANTED ) {
149
+ requestPermissions (new String [] { Manifest .permission .POST_NOTIFICATIONS },
150
+ REQUEST_PERMISSION_POST_NOTIFICATIONS );
151
+ }
152
+ }
146
153
if (SDK_INT >= Build .VERSION_CODES .M ) {
147
154
if (checkSelfPermission (Manifest .permission .READ_EXTERNAL_STORAGE ) != PackageManager .PERMISSION_GRANTED ) {
148
155
requestPermissions (new String [] { Manifest .permission .READ_EXTERNAL_STORAGE },
You can’t perform that action at this time.
0 commit comments