Merge "Create empty PowerWhitelistManager."
This commit is contained in:
committed by
Android (Google) Code Review
commit
276b49f758
@@ -21,6 +21,7 @@ import android.app.SystemServiceRegistry;
|
||||
import android.content.Context;
|
||||
import android.os.DeviceIdleManager;
|
||||
import android.os.IDeviceIdleController;
|
||||
import android.os.PowerWhitelistManager;
|
||||
|
||||
/**
|
||||
* Class holding initialization code for the job scheduler module.
|
||||
@@ -48,5 +49,8 @@ public class JobSchedulerFrameworkInitializer {
|
||||
Context.DEVICE_IDLE_CONTROLLER, DeviceIdleManager.class,
|
||||
(context, b) -> new DeviceIdleManager(
|
||||
context, IDeviceIdleController.Stub.asInterface(b)));
|
||||
SystemServiceRegistry.registerContextAwareService(
|
||||
Context.POWER_WHITELIST_MANAGER, PowerWhitelistManager.class,
|
||||
PowerWhitelistManager::new);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2019 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.os;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SystemService;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.Context;
|
||||
|
||||
/**
|
||||
* Interface to access and modify the power save whitelist.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
@SystemService(Context.POWER_WHITELIST_MANAGER)
|
||||
public class PowerWhitelistManager {
|
||||
private final Context mContext;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public PowerWhitelistManager(@NonNull Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
}
|
||||
@@ -5733,6 +5733,9 @@ package android.os {
|
||||
field public static final int USER_ACTIVITY_FLAG_NO_CHANGE_LIGHTS = 1; // 0x1
|
||||
}
|
||||
|
||||
public class PowerWhitelistManager {
|
||||
}
|
||||
|
||||
public class RecoverySystem {
|
||||
method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void cancelScheduledUpdate(android.content.Context) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void installPackage(android.content.Context, java.io.File, boolean) throws java.io.IOException;
|
||||
|
||||
@@ -707,6 +707,7 @@ package android.content {
|
||||
field public static final String CONTENT_CAPTURE_MANAGER_SERVICE = "content_capture";
|
||||
field public static final String DEVICE_IDLE_CONTROLLER = "deviceidle";
|
||||
field public static final String PERMISSION_SERVICE = "permission";
|
||||
field public static final String POWER_WHITELIST_MANAGER = "power_whitelist";
|
||||
field public static final String ROLLBACK_SERVICE = "rollback";
|
||||
field public static final String STATUS_BAR_SERVICE = "statusbar";
|
||||
field public static final String TEST_NETWORK_SERVICE = "test_network";
|
||||
@@ -2042,6 +2043,9 @@ package android.os {
|
||||
field public static final int POWER_SAVE_MODE_TRIGGER_PERCENTAGE = 0; // 0x0
|
||||
}
|
||||
|
||||
public class PowerWhitelistManager {
|
||||
}
|
||||
|
||||
public class Process {
|
||||
method public static final int getThreadScheduler(int) throws java.lang.IllegalArgumentException;
|
||||
field public static final int FIRST_APP_ZYGOTE_ISOLATED_UID = 90000; // 0x15f90
|
||||
|
||||
@@ -3335,6 +3335,7 @@ public abstract class Context {
|
||||
ROLLBACK_SERVICE,
|
||||
DROPBOX_SERVICE,
|
||||
//@hide: DEVICE_IDLE_CONTROLLER,
|
||||
//@hide: POWER_WHITELIST_MANAGER,
|
||||
DEVICE_POLICY_SERVICE,
|
||||
UI_MODE_SERVICE,
|
||||
DOWNLOAD_SERVICE,
|
||||
@@ -4344,6 +4345,15 @@ public abstract class Context {
|
||||
@TestApi
|
||||
public static final String DEVICE_IDLE_CONTROLLER = "deviceidle";
|
||||
|
||||
/**
|
||||
* System service name for the PowerWhitelistManager.
|
||||
*
|
||||
* @see #getSystemService(String)
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public static final String POWER_WHITELIST_MANAGER = "power_whitelist";
|
||||
|
||||
/**
|
||||
* Use with {@link #getSystemService(String)} to retrieve a
|
||||
* {@link android.app.admin.DevicePolicyManager} for working with global
|
||||
|
||||
Reference in New Issue
Block a user