Skip to content

Commit 8973a5e

Browse files
committed
[Refactor] Rename getIntent to getServiceIntent to suppress false-positive lint issues
Signed-off-by: Muntashir Al-Islam <muntashirakon@riseup.net>
1 parent ba7b7d0 commit 8973a5e

11 files changed

Lines changed: 11 additions & 11 deletions

File tree

app/src/main/java/io/github/muntashirakon/AppManager/apk/dexopt/DexOptDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void launchOp() {
137137
BatchDexOptOptions options = new BatchDexOptOptions(mOptions);
138138
BatchQueueItem queueItem = BatchQueueItem.getBatchOpQueue(
139139
BatchOpsManager.OP_DEXOPT, null, null, options);
140-
Intent intent = BatchOpsService.getIntent(requireContext(), queueItem);
140+
Intent intent = BatchOpsService.getServiceIntent(requireContext(), queueItem);
141141
ContextCompat.startForegroundService(requireContext(), intent);
142142
}
143143
}

app/src/main/java/io/github/muntashirakon/AppManager/backup/dialog/BackupRestoreDialogFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ private void startOperation(@NonNull BackupRestoreDialogViewModel.OperationInfo
402402
BatchBackupOptions options = new BatchBackupOptions(operationInfo.flags, operationInfo.backupNames);
403403
BatchQueueItem queueItem = BatchQueueItem.getBatchOpQueue(operationInfo.op,
404404
operationInfo.packageList, operationInfo.userIdListMappedToPackageList, options);
405-
Intent intent = BatchOpsService.getIntent(mActivity, queueItem);
405+
Intent intent = BatchOpsService.getServiceIntent(mActivity, queueItem);
406406
ContextCompat.startForegroundService(mActivity, intent);
407407
dismiss();
408408
}

app/src/main/java/io/github/muntashirakon/AppManager/batchops/BatchOpsResultsActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
117117
return true;
118118
} else if (id == R.id.action_retry) {
119119
if (mBatchQueueItem != null) {
120-
Intent BatchOpsIntent = BatchOpsService.getIntent(this, mBatchQueueItem);
120+
Intent BatchOpsIntent = BatchOpsService.getServiceIntent(this, mBatchQueueItem);
121121
ContextCompat.startForegroundService(this, BatchOpsIntent);
122122
}
123123
}

app/src/main/java/io/github/muntashirakon/AppManager/batchops/BatchOpsService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public class BatchOpsService extends ForegroundService {
8383
public static final String CHANNEL_ID = BuildConfig.APPLICATION_ID + ".channel.BATCH_OPS";
8484

8585
@NonNull
86-
public static Intent getIntent(@NonNull Context context, @NonNull BatchQueueItem queueItem) {
86+
public static Intent getServiceIntent(@NonNull Context context, @NonNull BatchQueueItem queueItem) {
8787
Intent intent = new Intent(context, BatchOpsService.class);
8888
IntentCompat.putWrappedParcelableExtra(intent, EXTRA_QUEUE_ITEM, queueItem);
8989
return intent;

app/src/main/java/io/github/muntashirakon/AppManager/debloat/DebloaterActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private void handleBatchOp(@BatchOpsManager.OpType int op, @Nullable IBatchOpOpt
235235
}
236236
BatchOpsManager.Result input = new BatchOpsManager.Result(viewModel.getSelectedPackagesWithUsers());
237237
BatchQueueItem item = BatchQueueItem.getBatchOpQueue(op, input.getFailedPackages(), input.getAssociatedUsers(), options);
238-
ContextCompat.startForegroundService(this, BatchOpsService.getIntent(this, item));
238+
ContextCompat.startForegroundService(this, BatchOpsService.getServiceIntent(this, item));
239239
mMultiSelectionView.cancel();
240240
}
241241
}

app/src/main/java/io/github/muntashirakon/AppManager/details/info/AppInfoFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ private List<TagItem> getTagCloudItems(@NonNull AppInfoViewModel.TagCloud tagClo
11271127
}
11281128
BatchQueueItem item = BatchQueueItem.getBatchOpQueue(
11291129
BatchOpsManager.OP_UNINSTALL, selectedItems, userIds, null);
1130-
Intent intent = BatchOpsService.getIntent(mActivity, item);
1130+
Intent intent = BatchOpsService.getServiceIntent(mActivity, item);
11311131
ContextCompat.startForegroundService(mActivity, intent);
11321132
}
11331133
})

app/src/main/java/io/github/muntashirakon/AppManager/history/ops/OpHistoryManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static Intent getExecutableIntent(@NonNull Context context, @NonNull OpHi
9292
switch (item.getType()) {
9393
case HISTORY_TYPE_BATCH_OPS: {
9494
BatchQueueItem batchQueueItem = BatchQueueItem.DESERIALIZER.deserialize(item.jsonData);
95-
return BatchOpsService.getIntent(context, batchQueueItem);
95+
return BatchOpsService.getServiceIntent(context, batchQueueItem);
9696
}
9797
case HISTORY_TYPE_INSTALLER: {
9898
ApkQueueItem apkQueueItem = ApkQueueItem.DESERIALIZER.deserialize(item.jsonData);

app/src/main/java/io/github/muntashirakon/AppManager/main/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ private void handleBatchOp(@BatchOpsManager.OpType int op, @Nullable IBatchOpOpt
610610
showProgressIndicator(true);
611611
BatchOpsManager.Result input = new BatchOpsManager.Result(viewModel.getSelectedPackagesWithUsers());
612612
BatchQueueItem item = BatchQueueItem.getBatchOpQueue(op, input.getFailedPackages(), input.getAssociatedUsers(), options);
613-
Intent intent = BatchOpsService.getIntent(this, item);
613+
Intent intent = BatchOpsService.getServiceIntent(this, item);
614614
ContextCompat.startForegroundService(this, intent);
615615
}
616616

app/src/main/java/io/github/muntashirakon/AppManager/oneclickops/OneClickOpsActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ protected void onDestroy() {
413413
}
414414

415415
private void launchService(@NonNull BatchQueueItem queueItem) {
416-
Intent intent = BatchOpsService.getIntent(this, queueItem);
416+
Intent intent = BatchOpsService.getServiceIntent(this, queueItem);
417417
ContextCompat.startForegroundService(this, intent);
418418
}
419419

app/src/main/java/io/github/muntashirakon/AppManager/runningapps/RunningAppsActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ private void handleBatchOp(@BatchOpsManager.OpType int op) {
396396
}
397397
BatchOpsManager.Result input = new BatchOpsManager.Result(model.getSelectedPackagesWithUsers());
398398
BatchQueueItem item = BatchQueueItem.getBatchOpQueue(op, input.getFailedPackages(), input.getAssociatedUsers(), null);
399-
Intent intent = BatchOpsService.getIntent(this, item);
399+
Intent intent = BatchOpsService.getServiceIntent(this, item);
400400
ContextCompat.startForegroundService(this, intent);
401401
}
402402

0 commit comments

Comments
 (0)