1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.content.pm; 18 19 /** 20 * Callbacks from a data loader binder service to report data loader status. 21 * @hide 22 */ 23 oneway interface IDataLoaderStatusListener { 24 /** The DataLoader process died, binder disconnected or class destroyed. */ 25 const int DATA_LOADER_DESTROYED = 0; 26 /** The system is in process of binding to the DataLoader. */ 27 const int DATA_LOADER_BINDING = 1; 28 /** DataLoader process is running and bound to. */ 29 const int DATA_LOADER_BOUND = 2; 30 /** DataLoader has handled onCreate(). */ 31 const int DATA_LOADER_CREATED = 3; 32 33 /** DataLoader can receive missing pages and read pages notifications, 34 * and ready to provide data. */ 35 const int DATA_LOADER_STARTED = 4; 36 /** DataLoader no longer ready to provide data and is not receiving 37 * any notifications from IncFS. */ 38 const int DATA_LOADER_STOPPED = 5; 39 40 /** DataLoader streamed everything necessary to continue installation. */ 41 const int DATA_LOADER_IMAGE_READY = 6; 42 /** Installation can't continue as DataLoader failed to stream necessary data. */ 43 const int DATA_LOADER_IMAGE_NOT_READY = 7; 44 45 /** DataLoader instance can't run at the moment, but might recover later. 46 * It's up to system to decide if the app is still usable. */ 47 const int DATA_LOADER_UNAVAILABLE = 8; 48 49 /** DataLoader reports that this instance is invalid and can never be restored. 50 * Warning: this is a terminal status that data loader should use carefully and 51 * the system should almost never use - e.g. only if all recovery attempts 52 * fail and all retry limits are exceeded. */ 53 const int DATA_LOADER_UNRECOVERABLE = 9; 54 55 /** Data loader status callback */ onStatusChanged(in int dataLoaderId, in int status)56 void onStatusChanged(in int dataLoaderId, in int status); 57 } 58 59