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 /** DataLoader process is running and bound to. */ 27 const int DATA_LOADER_BOUND = 1; 28 /** DataLoader has handled onCreate(). */ 29 const int DATA_LOADER_CREATED = 2; 30 31 /** DataLoader can receive missing pages and read pages notifications, 32 * and ready to provide data. */ 33 const int DATA_LOADER_STARTED = 3; 34 /** DataLoader no longer ready to provide data and is not receiving 35 * any notifications from IncFS. */ 36 const int DATA_LOADER_STOPPED = 4; 37 38 /** DataLoader streamed everything necessary to continue installation. */ 39 const int DATA_LOADER_IMAGE_READY = 5; 40 /** Installation can't continue as DataLoader failed to stream necessary data. */ 41 const int DATA_LOADER_IMAGE_NOT_READY = 6; 42 43 /** DataLoader instance can't run at the moment, but might recover later. 44 * It's up to system to decide if the app is still usable. */ 45 const int DATA_LOADER_UNAVAILABLE = 7; 46 47 /** DataLoader reports that this instance is invalid and can never be restored. 48 * Warning: this is a terminal status that data loader should use carefully and 49 * the system should almost never use - e.g. only if all recovery attempts 50 * fail and all retry limits are exceeded. */ 51 const int DATA_LOADER_UNRECOVERABLE = 8; 52 53 /** Data loader status callback */ onStatusChanged(in int dataLoaderId, in int status)54 void onStatusChanged(in int dataLoaderId, in int status); 55 } 56 57