Loading Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ LOCAL_SRC_FILES += \ core/java/android/os/IBatteryPropertiesListener.aidl \ core/java/android/os/IBatteryPropertiesRegistrar.aidl \ core/java/android/os/ICancellationSignal.aidl \ core/java/android/os/IDeviceIdleController.aidl \ core/java/android/os/IMessenger.aidl \ core/java/android/os/INetworkActivityListener.aidl \ core/java/android/os/INetworkManagementService.aidl \ Loading core/java/android/net/INetworkPolicyManager.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -38,8 +38,6 @@ interface INetworkPolicyManager { boolean isUidForeground(int uid); int[] getPowerSaveAppIdWhitelist(); void registerListener(INetworkPolicyListener listener); void unregisterListener(INetworkPolicyListener listener); Loading core/java/android/net/NetworkPolicyManager.java +0 −8 Original line number Diff line number Diff line Loading @@ -129,14 +129,6 @@ public class NetworkPolicyManager { } } public int[] getPowerSaveAppIdWhitelist() { try { return mService.getPowerSaveAppIdWhitelist(); } catch (RemoteException e) { return new int[0]; } } public void registerListener(INetworkPolicyListener listener) { try { mService.registerListener(listener); Loading core/java/android/os/IDeviceIdleController.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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; /** @hide */ interface IDeviceIdleController { void addPowerSaveWhitelistApp(String name); void removePowerSaveWhitelistApp(String name); String[] getSystemPowerWhitelist(); String[] getFullPowerWhitelist(); int[] getAppIdWhitelist(); } core/java/android/os/PowerManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -919,6 +919,14 @@ public final class PowerManager { public static final String ACTION_DEVICE_IDLE_MODE_CHANGED = "android.os.action.DEVICE_IDLE_MODE_CHANGED"; /** * @hide Intent that is broadcast when the set of power save whitelist apps has changed. * This broadcast is only sent to registered receivers. */ @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_POWER_SAVE_WHITELIST_CHANGED = "android.os.action.POWER_SAVE_WHITELIST_CHANGED"; /** * Intent that is broadcast when the state of {@link #isPowerSaveMode()} is about to change. * This broadcast is only sent to registered receivers. Loading Loading
Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ LOCAL_SRC_FILES += \ core/java/android/os/IBatteryPropertiesListener.aidl \ core/java/android/os/IBatteryPropertiesRegistrar.aidl \ core/java/android/os/ICancellationSignal.aidl \ core/java/android/os/IDeviceIdleController.aidl \ core/java/android/os/IMessenger.aidl \ core/java/android/os/INetworkActivityListener.aidl \ core/java/android/os/INetworkManagementService.aidl \ Loading
core/java/android/net/INetworkPolicyManager.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -38,8 +38,6 @@ interface INetworkPolicyManager { boolean isUidForeground(int uid); int[] getPowerSaveAppIdWhitelist(); void registerListener(INetworkPolicyListener listener); void unregisterListener(INetworkPolicyListener listener); Loading
core/java/android/net/NetworkPolicyManager.java +0 −8 Original line number Diff line number Diff line Loading @@ -129,14 +129,6 @@ public class NetworkPolicyManager { } } public int[] getPowerSaveAppIdWhitelist() { try { return mService.getPowerSaveAppIdWhitelist(); } catch (RemoteException e) { return new int[0]; } } public void registerListener(INetworkPolicyListener listener) { try { mService.registerListener(listener); Loading
core/java/android/os/IDeviceIdleController.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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; /** @hide */ interface IDeviceIdleController { void addPowerSaveWhitelistApp(String name); void removePowerSaveWhitelistApp(String name); String[] getSystemPowerWhitelist(); String[] getFullPowerWhitelist(); int[] getAppIdWhitelist(); }
core/java/android/os/PowerManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -919,6 +919,14 @@ public final class PowerManager { public static final String ACTION_DEVICE_IDLE_MODE_CHANGED = "android.os.action.DEVICE_IDLE_MODE_CHANGED"; /** * @hide Intent that is broadcast when the set of power save whitelist apps has changed. * This broadcast is only sent to registered receivers. */ @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_POWER_SAVE_WHITELIST_CHANGED = "android.os.action.POWER_SAVE_WHITELIST_CHANGED"; /** * Intent that is broadcast when the state of {@link #isPowerSaveMode()} is about to change. * This broadcast is only sent to registered receivers. Loading