[go: nahoru, domu]

1a89087542f774c585b6a6ec535fc294721710521Andreas Gampe/*
2a89087542f774c585b6a6ec535fc294721710521Andreas Gampe**
3a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** Copyright 2016, The Android Open Source Project
4a89087542f774c585b6a6ec535fc294721710521Andreas Gampe**
5a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** Licensed under the Apache License, Version 2.0 (the "License");
6a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** you may not use this file except in compliance with the License.
7a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** You may obtain a copy of the License at
8a89087542f774c585b6a6ec535fc294721710521Andreas Gampe**
9a89087542f774c585b6a6ec535fc294721710521Andreas Gampe**     http://www.apache.org/licenses/LICENSE-2.0
10a89087542f774c585b6a6ec535fc294721710521Andreas Gampe**
11a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** Unless required by applicable law or agreed to in writing, software
12a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** distributed under the License is distributed on an "AS IS" BASIS,
13a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** See the License for the specific language governing permissions and
15a89087542f774c585b6a6ec535fc294721710521Andreas Gampe** limitations under the License.
16a89087542f774c585b6a6ec535fc294721710521Andreas Gampe*/
17a89087542f774c585b6a6ec535fc294721710521Andreas Gampe
18a89087542f774c585b6a6ec535fc294721710521Andreas Gampepackage android.content.pm;
19a89087542f774c585b6a6ec535fc294721710521Andreas Gampe
20a89087542f774c585b6a6ec535fc294721710521Andreas Gampe/**
21a89087542f774c585b6a6ec535fc294721710521Andreas Gampe * A/B OTA dexopting service.
22a89087542f774c585b6a6ec535fc294721710521Andreas Gampe *
23a89087542f774c585b6a6ec535fc294721710521Andreas Gampe * {@hide}
24a89087542f774c585b6a6ec535fc294721710521Andreas Gampe */
25a89087542f774c585b6a6ec535fc294721710521Andreas Gampeinterface IOtaDexopt {
26a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    /**
27a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     * Prepare for A/B OTA dexopt. Initialize internal structures.
28a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     *
29a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     * Calls to the other methods are only valid after a call to prepare. You may not call
30a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     * prepare twice without a cleanup call.
31a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     */
32a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    void prepare();
33a89087542f774c585b6a6ec535fc294721710521Andreas Gampe
34a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    /**
35a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     * Clean up all internal state.
36a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     */
37a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    void cleanup();
38a89087542f774c585b6a6ec535fc294721710521Andreas Gampe
39a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    /**
40a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     * Check whether all updates have been performed.
41a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     */
42a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    boolean isDone();
43a89087542f774c585b6a6ec535fc294721710521Andreas Gampe
44a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    /**
45a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     * Optimize the next package. Note: this command is synchronous, that is, only returns after
46a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     * the package has been dexopted (or dexopting failed).
47a89087542f774c585b6a6ec535fc294721710521Andreas Gampe     */
48a89087542f774c585b6a6ec535fc294721710521Andreas Gampe    void dexoptNextPackage();
49a89087542f774c585b6a6ec535fc294721710521Andreas Gampe}
50