Merge "Hide "Long Background Tasks" page from Settings." into udc-dev am: b272dbc613
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23252718 Change-Id: Ieee0605442ad79b198129dcb312eef7be86201f7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -16,10 +16,6 @@
|
||||
|
||||
package com.android.settings.applications;
|
||||
|
||||
import static android.Manifest.permission.RUN_USER_INITIATED_JOBS;
|
||||
import static android.app.AppOpsManager.OP_RUN_USER_INITIATED_JOBS;
|
||||
import static android.app.AppOpsManager.opToPermission;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.ComponentName;
|
||||
@@ -345,7 +341,9 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
|
||||
|
||||
@Override
|
||||
public boolean isLongBackgroundTaskPermissionToggleSupported() {
|
||||
return TextUtils.equals(RUN_USER_INITIATED_JOBS,
|
||||
opToPermission(OP_RUN_USER_INITIATED_JOBS));
|
||||
// Since the RUN_USER_INITIATED_JOBS permission related to this controller is a normal
|
||||
// app-op permission allowed by default, this should always return false - if it is ever
|
||||
// converted to a special app-op permission, this should be updated.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,6 +37,6 @@ public class LongBackgroundTaskController extends BasePreferenceController {
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return mAppFeatureProvider.isLongBackgroundTaskPermissionToggleSupported()
|
||||
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user