1941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh/* 2941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * Copyright (C) 2016 The Android Open Source Project 3941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * 4941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * Licensed under the Apache License, Version 2.0 (the "License"); 5941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * you may not use this file except in compliance with the License. 6941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * You may obtain a copy of the License at 7941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * 8941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * http://www.apache.org/licenses/LICENSE-2.0 9941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * 10941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * Unless required by applicable law or agreed to in writing, software 11941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * distributed under the License is distributed on an "AS IS" BASIS, 12941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * See the License for the specific language governing permissions and 14941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * limitations under the License 15941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh */ 16941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh 17941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hughpackage com.android.packageinstaller.wear; 18941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh 19941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh/** 20941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * Constants for Installation / Uninstallation requests. 21941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * Using the same values as Finsky/Wearsky code for consistency in user analytics of failures 22941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh */ 23941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hughpublic class InstallerConstants { 24941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** Request succeeded */ 25941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public static final int STATUS_SUCCESS = 0; 26941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh 27941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** 28941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * The new PackageInstaller also returns a small set of less granular error codes, which 29941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * we'll remap to the range -500 and below to keep away from existing installer codes 30941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * (which run from -1 to -110). 31941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh */ 32941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_PACKAGEINSTALLER_BASE = -500; 33941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh 34941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public static final int ERROR_COULD_NOT_GET_FD = -603; 35941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** This node is not targeted by this request. */ 36941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh 37941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because could not create PackageInstaller session */ 38941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_CREATE_SESSION = -612; 39941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because could not open PackageInstaller session */ 40941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_OPEN_SESSION = -613; 41941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because could not open PackageInstaller output stream */ 42941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_OPEN_STREAM = -614; 43941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because of an exception while streaming bytes */ 44941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_COPY_STREAM_EXCEPTION = -615; 45941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because of an unexpected exception from PackageInstaller */ 46941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_SESSION_EXCEPTION = -616; 47941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because of an unexpected userActionRequired callback */ 48941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_USER_ACTION_REQUIRED = -617; 49941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because of an unexpected broadcast (missing fields) */ 50941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_MALFORMED_BROADCAST = -618; 51941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because of an error while copying from downloaded file */ 52941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_APK_COPY_FAILURE = -619; 53941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because of an error while copying to the PackageInstaller 54941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * output stream */ 55941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_COPY_STREAM = -620; 56941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh /** The install did not complete because of an error while closing the PackageInstaller 57941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh * output stream */ 58941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh public final static int ERROR_INSTALL_CLOSE_STREAM = -621; 59941a7c8f242bdc8847c0b47a7621738ac416944fAnthony Hugh}