• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016, 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.managedprovisioning.provisioning;
18 
19 /**
20  * Interface for listeners to the {@link ProvisioningManager}. A listener can be registered for
21  * updated via {@link ProvisioningManager#registerListener(ProvisioningManagerCallback)}.
22  */
23 public interface ProvisioningManagerCallback {
24     /**
25      * Method called when an error was encountered during the provisioning process.
26      *
27      * @param dialogTitleId resource id of the error title to be displayed to the user.
28      * @param errorMessageId resource id of the error message to be displayed to the user.
29      * @param factoryResetRequired indicating whether a factory reset is necessary.
30      */
error(int dialogTitleId, int errorMessageId, boolean factoryResetRequired)31     void error(int dialogTitleId, int errorMessageId, boolean factoryResetRequired);
32 
33     /**
34      * Method called to indicate a progress update in the provisioning process.
35      *
36      * @param progressMessageId resource id of the progress message to be displayed to the user.
37      */
progressUpdate(int progressMessageId)38     void progressUpdate(int progressMessageId);
39 
40     /**
41      * Method called to indicate that pre-finalization has completed.
42      */
preFinalizationCompleted()43     void preFinalizationCompleted();
44 }
45