blob: 467bd5f5e82bddfe34a76a8d7abeed9f41b3e1fc [file] [log] [blame]
Andreas Gampea8908752015-11-10 08:58:14 -08001/*
2**
3** Copyright 2016, The Android Open Source Project
4**
5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at
8**
9** http://www.apache.org/licenses/LICENSE-2.0
10**
11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and
15** limitations under the License.
16*/
17
18package android.content.pm;
19
20/**
21 * A/B OTA dexopting service.
22 *
23 * {@hide}
24 */
25interface IOtaDexopt {
26 /**
27 * Prepare for A/B OTA dexopt. Initialize internal structures.
28 *
29 * Calls to the other methods are only valid after a call to prepare. You may not call
30 * prepare twice without a cleanup call.
31 */
32 void prepare();
33
34 /**
35 * Clean up all internal state.
36 */
37 void cleanup();
38
39 /**
40 * Check whether all updates have been performed.
41 */
42 boolean isDone();
43
44 /**
Andreas Gampebf062322016-06-10 15:21:39 -070045 * Return the progress (0..1) made in this session. When {@link #isDone() isDone} returns
46 * true, the progress value will be 1.
47 */
48 float getProgress();
49
50 /**
Andreas Gampea8908752015-11-10 08:58:14 -080051 * Optimize the next package. Note: this command is synchronous, that is, only returns after
52 * the package has been dexopted (or dexopting failed).
Andreas Gampecc241a52016-06-23 20:27:12 -070053 *
54 * Note: this will be removed after a transition period. Use nextDexoptCommand instead.
Andreas Gampea8908752015-11-10 08:58:14 -080055 */
56 void dexoptNextPackage();
Andreas Gampecc241a52016-06-23 20:27:12 -070057
58 /**
59 * Get the optimization parameters for the next package.
60 */
61 String nextDexoptCommand();
Andreas Gampea8908752015-11-10 08:58:14 -080062}