10b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn/**
20b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * Copyright (c) 2015, The Android Open Source Project
30b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn *
40b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * Licensed under the Apache License, Version 2.0 (the "License");
50b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * you may not use this file except in compliance with the License.
60b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * You may obtain a copy of the License at
70b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn *
80b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn *     http://www.apache.org/licenses/LICENSE-2.0
90b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn *
100b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * Unless required by applicable law or agreed to in writing, software
110b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * distributed under the License is distributed on an "AS IS" BASIS,
120b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
130b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * See the License for the specific language governing permissions and
140b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn * limitations under the License.
150b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn */
160b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn
170b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackbornpackage android.os;
180b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn
19ca5edbb6b5300e07a5f7bfbec36f08df65d8f6e7Yao Chenimport android.os.IMaintenanceActivityListener;
20af575b9f8e1b59be9c8862b6a65c0dcb88145a23Amith Yamasaniimport android.os.UserHandle;
21af575b9f8e1b59be9c8862b6a65c0dcb88145a23Amith Yamasani
220b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn/** @hide */
230b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborninterface IDeviceIdleController {
240b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn    void addPowerSaveWhitelistApp(String name);
250b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn    void removePowerSaveWhitelistApp(String name);
264a503b1ece485d44c15eb02ec2bcd464b46e6f7fDianne Hackborn    String[] getSystemPowerWhitelistExceptIdle();
270b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn    String[] getSystemPowerWhitelist();
28262ae5c8eb1579bccaa0f6953b39e6fd65ff2288Dianne Hackborn    String[] getUserPowerWhitelist();
294a503b1ece485d44c15eb02ec2bcd464b46e6f7fDianne Hackborn    String[] getFullPowerWhitelistExceptIdle();
300b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn    String[] getFullPowerWhitelist();
314a503b1ece485d44c15eb02ec2bcd464b46e6f7fDianne Hackborn    int[] getAppIdWhitelistExceptIdle();
320b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn    int[] getAppIdWhitelist();
33262ae5c8eb1579bccaa0f6953b39e6fd65ff2288Dianne Hackborn    int[] getAppIdUserWhitelist();
34af575b9f8e1b59be9c8862b6a65c0dcb88145a23Amith Yamasani    int[] getAppIdTempWhitelist();
354a503b1ece485d44c15eb02ec2bcd464b46e6f7fDianne Hackborn    boolean isPowerSaveWhitelistExceptIdleApp(String name);
3606bf824628c118fbd5ad6756913d7fd63a6f4ce5Amith Yamasani    boolean isPowerSaveWhitelistApp(String name);
37fd854ee58c5d56f84047007ead9f88a767ae956fDianne Hackborn    void addPowerSaveTempWhitelistApp(String name, long duration, int userId, String reason);
38fd854ee58c5d56f84047007ead9f88a767ae956fDianne Hackborn    long addPowerSaveTempWhitelistAppForMms(String name, int userId, String reason);
39451c3468b9186790d5381334a736a35f9b1dab36Dianne Hackborn    long addPowerSaveTempWhitelistAppForSms(String name, int userId, String reason);
40b6683c428698105f715985a96066192aa62e9f53Dianne Hackborn    void exitIdle(String reason);
41ca5edbb6b5300e07a5f7bfbec36f08df65d8f6e7Yao Chen    boolean registerMaintenanceActivityListener(IMaintenanceActivityListener listener);
42ca5edbb6b5300e07a5f7bfbec36f08df65d8f6e7Yao Chen    void unregisterMaintenanceActivityListener(IMaintenanceActivityListener listener);
430b4daca9ba54b7252ea8c159218391380eb00c8aDianne Hackborn}
44