Home | History | Annotate | Download | only in cts
      1 /*
      2  * Copyright (C) 2008 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 com.android.cts;
     18 
     19 public interface DeviceObserver {
     20 
     21     /**
     22      * Indicate the status of installing/uninstalling action:
     23      * <ul>
     24      *     <li>FAIL: indicate that the action is failed.
     25      *     <li>SUCCESS: indicates that the action is success.
     26      * </ul>
     27      */
     28     public static final int FAIL = -1;
     29     public static final int SUCCESS = 1;
     30 
     31     /**
     32      * Notify after installing apk complete on the {@link TestDevice}
     33      * no matter succeeded or failed.
     34      *
     35      * @param resultCode the result code of installation.
     36      */
     37     void notifyInstallingComplete(final int resultCode);
     38 
     39     /**
     40      * Notify after uninstalling apk complete on the {@link TestDevice}.
     41      *
     42      * @param resultCode the result code of uninstallation.
     43      */
     44     void notifyUninstallingComplete(final int resultCode);
     45 
     46     /**
     47      * Notify after installing apk timeout on the {@link TestDevice}
     48      *
     49      * @param testDevice the {@link TestDevice} whose install action timeout.
     50      */
     51     void notifyInstallingTimeout(final TestDevice testDevice);
     52 
     53     /**
     54      * Notify after uninstalling apk timeout.
     55      *
     56      * @param testDevice the {@link TestDevice} whose install action timeout
     57      */
     58     void notifyUninstallingTimeout(final TestDevice testDevice);
     59 
     60     /**
     61      * Notify after a {@link TestDevice}, which is used in testing,
     62      * is disconnected to the {@link TestHost}.
     63      *
     64      */
     65     void notifyTestingDeviceDisconnected();
     66 }
     67