blob: 24831b37b26ed786b083f31d2442c9e566dad6bd [file] [log] [blame]
Hunter Knepshieldc9e2c6d2020-01-15 17:48:01 -08001/*
2 * Copyright (C) 2020 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 */
16package android.hardware.dumpstate@1.1;
17
18import @1.0::IDumpstateDevice;
19
20interface IDumpstateDevice extends @1.0::IDumpstateDevice {
21 /**
22 * Extension of dumpstateBoard which also accepts a mode parameter to limit dumped data.
23 *
24 * For an example of when this is relevant, consider a bug report being generated with
25 * DumpstateMode::CONNECTIVITY - there is no reason to include camera or USB logs in this type
26 * of report.
27 *
28 * The 1.0 version of #dumpstateBoard(handle) should just delegate to this new method and pass
29 * DumpstateMode::DEFAULT and a timeout of 30,000ms (30 seconds).
30 *
31 * @param h A native handle with one or two valid file descriptors. The first FD is for text
32 * output, the second (if present) is for binary output.
33 * @param mode A mode value to restrict dumped content.
34 * @param timeoutMillis An approximate "budget" for how much time this call has been allotted.
35 * If execution runs longer than this, the IDumpstateDevice service may be killed and only
36 * partial information will be included in the report.
37 */
38 dumpstateBoard_1_1(handle h, DumpstateMode mode, uint64_t timeoutMillis);
39
40 /**
41 * Turns device vendor logging on or off.
42 *
43 * The setting should be persistent across reboots. Underlying implementations may need to start
44 * vendor logging daemons, set system properties, or change logging masks, for example. Given
45 * that many vendor logs contain significant amounts of private information and may come with
46 * memory/storage/battery impacts, calling this method on a user build should only be done after
47 * user consent has been obtained, e.g. from a toggle in developer settings.
48 *
49 * @param enable Whether to enable or disable device vendor logging.
50 * @return success Whether or not the change took effect.
51 */
52 setDeviceLoggingEnabled(bool enable) generates (bool success);
53};