26
26
import android .net .Uri ;
27
27
import android .os .AsyncTask ;
28
28
import android .os .Binder ;
29
- import android .os .Build ;
29
+ import android .os .Build . VERSION_CODES ;
30
30
import android .os .ParcelFileDescriptor ;
31
31
import android .os .PersistableBundle ;
32
32
import android .os .Process ;
@@ -92,7 +92,7 @@ public void onReceive(Context context, Intent intent) {
92
92
}
93
93
}
94
94
95
- @ TargetApi (Build . VERSION_CODES .N )
95
+ @ TargetApi (VERSION_CODES .N )
96
96
@ Override
97
97
public void onSecurityLogsAvailable (Context context , Intent intent ) {
98
98
Log .i (TAG , "onSecurityLogsAvailable() called" );
@@ -107,7 +107,7 @@ public void onSecurityLogsAvailable(Context context, Intent intent) {
107
107
* TODO: reconsider how to store and present the logs in the future, e.g. save the file into
108
108
* internal memory and show the content in a ListView
109
109
*/
110
- @ TargetApi (Build . VERSION_CODES .O )
110
+ @ TargetApi (VERSION_CODES .O )
111
111
@ Override
112
112
public void onNetworkLogsAvailable (Context context , Intent intent , long batchToken ,
113
113
int networkLogsCount ) {
@@ -133,7 +133,7 @@ public void onProfileProvisioningComplete(Context context, Intent intent) {
133
133
}
134
134
}
135
135
136
- @ TargetApi (Build . VERSION_CODES .N )
136
+ @ TargetApi (VERSION_CODES .N )
137
137
@ Override
138
138
public void onBugreportSharingDeclined (Context context , Intent intent ) {
139
139
Log .i (TAG , "Bugreport sharing declined" );
@@ -142,7 +142,7 @@ public void onBugreportSharingDeclined(Context context, Intent intent) {
142
142
NotificationUtil .BUGREPORT_NOTIFICATION_ID );
143
143
}
144
144
145
- @ TargetApi (Build . VERSION_CODES .N )
145
+ @ TargetApi (VERSION_CODES .N )
146
146
@ Override
147
147
public void onBugreportShared (final Context context , Intent intent ,
148
148
final String bugreportFileHash ) {
@@ -190,7 +190,7 @@ protected void onPostExecute(String message) {
190
190
}.execute ();
191
191
}
192
192
193
- @ TargetApi (Build . VERSION_CODES .N )
193
+ @ TargetApi (VERSION_CODES .N )
194
194
@ Override
195
195
public void onBugreportFailed (Context context , Intent intent , int failureCode ) {
196
196
String failureReason ;
@@ -212,42 +212,42 @@ public void onBugreportFailed(Context context, Intent intent, int failureCode) {
212
212
}
213
213
214
214
215
- @ TargetApi (Build . VERSION_CODES .O )
215
+ @ TargetApi (VERSION_CODES .O )
216
216
@ Override
217
217
public void onUserAdded (Context context , Intent intent , UserHandle newUser ) {
218
218
handleUserAction (context , newUser , R .string .on_user_added_title ,
219
219
R .string .on_user_added_message , NotificationUtil .USER_ADDED_NOTIFICATION_ID );
220
220
}
221
221
222
- @ TargetApi (Build . VERSION_CODES .O )
222
+ @ TargetApi (VERSION_CODES .O )
223
223
@ Override
224
224
public void onUserRemoved (Context context , Intent intent , UserHandle removedUser ) {
225
225
handleUserAction (context , removedUser , R .string .on_user_removed_title ,
226
226
R .string .on_user_removed_message , NotificationUtil .USER_REMOVED_NOTIFICATION_ID );
227
227
}
228
228
229
- @ TargetApi (Build . VERSION_CODES .P )
229
+ @ TargetApi (VERSION_CODES .P )
230
230
@ Override
231
231
public void onUserStarted (Context context , Intent intent , UserHandle startedUser ) {
232
232
handleUserAction (context , startedUser , R .string .on_user_started_title ,
233
233
R .string .on_user_started_message , NotificationUtil .USER_STARTED_NOTIFICATION_ID );
234
234
}
235
235
236
- @ TargetApi (Build . VERSION_CODES .P )
236
+ @ TargetApi (VERSION_CODES .P )
237
237
@ Override
238
238
public void onUserStopped (Context context , Intent intent , UserHandle stoppedUser ) {
239
239
handleUserAction (context , stoppedUser , R .string .on_user_stopped_title ,
240
240
R .string .on_user_stopped_message , NotificationUtil .USER_STOPPED_NOTIFICATION_ID );
241
241
}
242
242
243
- @ TargetApi (Build . VERSION_CODES .P )
243
+ @ TargetApi (VERSION_CODES .P )
244
244
@ Override
245
245
public void onUserSwitched (Context context , Intent intent , UserHandle switchedUser ) {
246
246
handleUserAction (context , switchedUser , R .string .on_user_switched_title ,
247
247
R .string .on_user_switched_message , NotificationUtil .USER_SWITCHED_NOTIFICATION_ID );
248
248
}
249
249
250
- @ TargetApi (Build . VERSION_CODES .M )
250
+ @ TargetApi (VERSION_CODES .M )
251
251
@ Override
252
252
public void onSystemUpdatePending (Context context , Intent intent , long receivedTime ) {
253
253
if (receivedTime != -1 ) {
@@ -260,7 +260,7 @@ public void onSystemUpdatePending(Context context, Intent intent, long receivedT
260
260
}
261
261
}
262
262
263
- @ TargetApi (Build . VERSION_CODES .M )
263
+ @ TargetApi (VERSION_CODES .M )
264
264
@ Override
265
265
public String onChoosePrivateKeyAlias (Context context , Intent intent , int uid , Uri uri ,
266
266
String alias ) {
@@ -281,7 +281,7 @@ public void onPasswordExpiring(Context context, Intent intent) {
281
281
onPasswordExpiring (context , intent , Process .myUserHandle ());
282
282
}
283
283
284
- @ TargetApi (Build . VERSION_CODES .O )
284
+ @ TargetApi (VERSION_CODES .O )
285
285
// @Override
286
286
public void onPasswordExpiring (Context context , Intent intent , UserHandle user ) {
287
287
if (!Process .myUserHandle ().equals (user )) {
@@ -309,7 +309,7 @@ public void onPasswordFailed(Context context, Intent intent) {
309
309
onPasswordFailed (context , intent , Process .myUserHandle ());
310
310
}
311
311
312
- @ TargetApi (Build . VERSION_CODES .O )
312
+ @ TargetApi (VERSION_CODES .O )
313
313
// @Override
314
314
public void onPasswordFailed (Context context , Intent intent , UserHandle user ) {
315
315
if (!Process .myUserHandle ().equals (user )) {
@@ -372,7 +372,7 @@ public void onPasswordSucceeded(Context context, Intent intent) {
372
372
onPasswordSucceeded (context , intent , Process .myUserHandle ());
373
373
}
374
374
375
- @ TargetApi (Build . VERSION_CODES .O )
375
+ @ TargetApi (VERSION_CODES .O )
376
376
// @Override
377
377
public void onPasswordSucceeded (Context context , Intent intent , UserHandle user ) {
378
378
if (Process .myUserHandle ().equals (user )) {
@@ -386,7 +386,7 @@ public void onPasswordChanged(Context context, Intent intent) {
386
386
onPasswordChanged (context , intent , Process .myUserHandle ());
387
387
}
388
388
389
- @ TargetApi (Build . VERSION_CODES .O )
389
+ @ TargetApi (VERSION_CODES .O )
390
390
// @Override
391
391
public void onPasswordChanged (Context context , Intent intent , UserHandle user ) {
392
392
if (Process .myUserHandle ().equals (user )) {
@@ -546,7 +546,7 @@ private void onDeviceOwnerChanged(Context context) {
546
546
NotificationUtil .DEVICE_OWNER_CHANGED_ID );
547
547
}
548
548
549
- @ TargetApi (Build . VERSION_CODES .P )
549
+ @ TargetApi (VERSION_CODES .P )
550
550
public void onTransferOwnershipComplete (Context context , PersistableBundle bundle ) {
551
551
Log .i (TAG , "onTransferOwnershipComplete" );
552
552
NotificationUtil .showNotification (context ,
@@ -556,7 +556,7 @@ public void onTransferOwnershipComplete(Context context, PersistableBundle bundl
556
556
NotificationUtil .TRANSFER_OWNERSHIP_COMPLETE_ID );
557
557
}
558
558
559
- @ TargetApi (Build . VERSION_CODES .P )
559
+ @ TargetApi (VERSION_CODES .P )
560
560
public void onTransferAffiliatedProfileOwnershipComplete (Context context , UserHandle user ) {
561
561
Log .i (TAG , "onTransferAffiliatedProfileOwnershipComplete" );
562
562
NotificationUtil .showNotification (context ,
0 commit comments