zoukankan      html  css  js  c++  java
  • 系统apk监听安装返回值说明

      1 /**
      2      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
      3      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} on success.
      4      * @hide
      5      */
      6     public static final int INSTALL_SUCCEEDED = 1;
      7 
      8     /**
      9      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     10      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the package is
     11      * already installed.
     12      * @hide
     13      */
     14     public static final int INSTALL_FAILED_ALREADY_EXISTS = -1;
     15 
     16     /**
     17      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     18      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the package archive
     19      * file is invalid.
     20      * @hide
     21      */
     22     public static final int INSTALL_FAILED_INVALID_APK = -2;
     23 
     24     /**
     25      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     26      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the URI passed in
     27      * is invalid.
     28      * @hide
     29      */
     30     public static final int INSTALL_FAILED_INVALID_URI = -3;
     31 
     32     /**
     33      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     34      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the package manager
     35      * service found that the device didn't have enough storage space to install the app.
     36      * @hide
     37      */
     38     public static final int INSTALL_FAILED_INSUFFICIENT_STORAGE = -4;
     39 
     40     /**
     41      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     42      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if a
     43      * package is already installed with the same name.
     44      * @hide
     45      */
     46     public static final int INSTALL_FAILED_DUPLICATE_PACKAGE = -5;
     47 
     48     /**
     49      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     50      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
     51      * the requested shared user does not exist.
     52      * @hide
     53      */
     54     public static final int INSTALL_FAILED_NO_SHARED_USER = -6;
     55 
     56     /**
     57      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     58      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
     59      * a previously installed package of the same name has a different signature
     60      * than the new package (and the old package's data was not removed).
     61      * @hide
     62      */
     63     public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE = -7;
     64 
     65     /**
     66      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     67      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
     68      * the new package is requested a shared user which is already installed on the
     69      * device and does not have matching signature.
     70      * @hide
     71      */
     72     public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE = -8;
     73 
     74     /**
     75      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     76      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
     77      * the new package uses a shared library that is not available.
     78      * @hide
     79      */
     80     public static final int INSTALL_FAILED_MISSING_SHARED_LIBRARY = -9;
     81 
     82     /**
     83      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     84      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
     85      * the new package uses a shared library that is not available.
     86      * @hide
     87      */
     88     public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE = -10;
     89 
     90     /**
     91      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
     92      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
     93      * the new package failed while optimizing and validating its dex files,
     94      * either because there was not enough storage or the validation failed.
     95      * @hide
     96      */
     97     public static final int INSTALL_FAILED_DEXOPT = -11;
     98 
     99     /**
    100      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    101      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    102      * the new package failed because the current SDK version is older than
    103      * that required by the package.
    104      * @hide
    105      */
    106     public static final int INSTALL_FAILED_OLDER_SDK = -12;
    107 
    108     /**
    109      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    110      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    111      * the new package failed because it contains a content provider with the
    112      * same authority as a provider already installed in the system.
    113      * @hide
    114      */
    115     public static final int INSTALL_FAILED_CONFLICTING_PROVIDER = -13;
    116 
    117     /**
    118      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    119      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    120      * the new package failed because the current SDK version is newer than
    121      * that required by the package.
    122      * @hide
    123      */
    124     public static final int INSTALL_FAILED_NEWER_SDK = -14;
    125 
    126     /**
    127      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    128      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    129      * the new package failed because it has specified that it is a test-only
    130      * package and the caller has not supplied the {@link #INSTALL_ALLOW_TEST}
    131      * flag.
    132      * @hide
    133      */
    134     public static final int INSTALL_FAILED_TEST_ONLY = -15;
    135 
    136     /**
    137      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    138      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    139      * the package being installed contains native code, but none that is
    140      * compatible with the the device's CPU_ABI.
    141      * @hide
    142      */
    143     public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE = -16;
    144 
    145     /**
    146      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    147      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    148      * the new package uses a feature that is not available.
    149      * @hide
    150      */
    151     public static final int INSTALL_FAILED_MISSING_FEATURE = -17;
    152 
    153     // ------ Errors related to sdcard
    154     /**
    155      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    156      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    157      * a secure container mount point couldn't be accessed on external media.
    158      * @hide
    159      */
    160     public static final int INSTALL_FAILED_CONTAINER_ERROR = -18;
    161 
    162     /**
    163      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    164      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    165      * the new package couldn't be installed in the specified install
    166      * location.
    167      * @hide
    168      */
    169     public static final int INSTALL_FAILED_INVALID_INSTALL_LOCATION = -19;
    170 
    171     /**
    172      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    173      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    174      * the new package couldn't be installed in the specified install
    175      * location because the media is not available.
    176      * @hide
    177      */
    178     public static final int INSTALL_FAILED_MEDIA_UNAVAILABLE = -20;
    179 
    180     /**
    181      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    182      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    183      * the new package couldn't be installed because the verification timed out.
    184      * @hide
    185      */
    186     public static final int INSTALL_FAILED_VERIFICATION_TIMEOUT = -21;
    187 
    188     /**
    189      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    190      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    191      * the new package couldn't be installed because the verification did not succeed.
    192      * @hide
    193      */
    194     public static final int INSTALL_FAILED_VERIFICATION_FAILURE = -22;
    195 
    196     /**
    197      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    198      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    199      * the package changed from what the calling program expected.
    200      * @hide
    201      */
    202     public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23;
    203 
    204     /**
    205      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    206      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    207      * the new package is assigned a different UID than it previously held.
    208      * @hide
    209      */
    210     public static final int INSTALL_FAILED_UID_CHANGED = -24;
    211 
    212     /**
    213      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
    214      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
    215      * the new package has an older version code than the currently installed package.
    216      * @hide
    217      */
    218     public static final int INSTALL_FAILED_VERSION_DOWNGRADE = -25;
    219 
    220     /**
    221      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    222      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    223      * if the parser was given a path that is not a file, or does not end with the expected
    224      * '.apk' extension.
    225      * @hide
    226      */
    227     public static final int INSTALL_PARSE_FAILED_NOT_APK = -100;
    228 
    229     /**
    230      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    231      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    232      * if the parser was unable to retrieve the AndroidManifest.xml file.
    233      * @hide
    234      */
    235     public static final int INSTALL_PARSE_FAILED_BAD_MANIFEST = -101;
    236 
    237     /**
    238      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    239      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    240      * if the parser encountered an unexpected exception.
    241      * @hide
    242      */
    243     public static final int INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION = -102;
    244 
    245     /**
    246      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    247      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    248      * if the parser did not find any certificates in the .apk.
    249      * @hide
    250      */
    251     public static final int INSTALL_PARSE_FAILED_NO_CERTIFICATES = -103;
    252 
    253     /**
    254      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    255      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    256      * if the parser found inconsistent certificates on the files in the .apk.
    257      * @hide
    258      */
    259     public static final int INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES = -104;
    260 
    261     /**
    262      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    263      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    264      * if the parser encountered a CertificateEncodingException in one of the
    265      * files in the .apk.
    266      * @hide
    267      */
    268     public static final int INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING = -105;
    269 
    270     /**
    271      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    272      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    273      * if the parser encountered a bad or missing package name in the manifest.
    274      * @hide
    275      */
    276     public static final int INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME = -106;
    277 
    278     /**
    279      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    280      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    281      * if the parser encountered a bad shared user id name in the manifest.
    282      * @hide
    283      */
    284     public static final int INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID = -107;
    285 
    286     /**
    287      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    288      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    289      * if the parser encountered some structural problem in the manifest.
    290      * @hide
    291      */
    292     public static final int INSTALL_PARSE_FAILED_MANIFEST_MALFORMED = -108;
    293 
    294     /**
    295      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
    296      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    297      * if the parser did not find any actionable tags (instrumentation or application)
    298      * in the manifest.
    299      * @hide
    300      */
    301     public static final int INSTALL_PARSE_FAILED_MANIFEST_EMPTY = -109;
    302 
    303     /**
    304      * Installation failed return code: this is passed to the {@link IPackageInstallObserver} by
    305      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
    306      * if the system failed to install the package because of system issues.
    307      * @hide
    308      */
    309     public static final int INSTALL_FAILED_INTERNAL_ERROR = -110;
  • 相关阅读:
    k8s keepalived haproxy 集群成功
    .Net Core 用 EntityFramework 读取 Oracle
    Fedora CoreOS 安装 非LInux专业国内第一手
    Docker 下的 Keepalived + Haproxy 高可用实现 1 实现结果演示
    第二篇 windows container 微软的原生容器
    第一篇 Windows docker 概述
    测试openLiveWrite写博客
    比特币勒索病毒肆虐,腾讯云安全专家给你支招
    WannaCry 勒索病毒用户处置指南
    pytorch 学习笔记之编写 C 扩展,又涨姿势了
  • 原文地址:https://www.cnblogs.com/Miami/p/5253586.html
Copyright © 2011-2022 走看看