aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java
blob: 3e29d58b4d8d9d82112473263621a008f411bab4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
 * Copyright (c) 2016, The CyanogenMod Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.lineageos.tests.versioning.unit.apiv4;

import java.util.HashMap;
import java.util.Map;

public class ApiV4PriorReleaseInterfaces {
    private static Map<String, Map<String, Integer>> mApiMethodsAndValues =
            new HashMap<String, Map<String, Integer>>();

    //Profiles Aidl (IProfileManager)
    static {
        Map<String, Integer> profilesMap = getInternalInterfaceMap("IProfileManager");
        // APRICOT + BOYSENBERRY + CANTALOUPE to 19
        // DRAGONFRUIT BEGIN
        profilesMap.put("isEnabled", 20);
    }

    //LineageHardwareManager Aidl (ILineageHardwareService)
    static {
        Map<String, Integer> hardwareMap = getInternalInterfaceMap("ILineageHardwareService");
        // APRICOT + BOYSENBERRY + CANTALOUPE to 24
        // DRAGONFRUIT BEGIN
        hardwareMap.put("isSunlightEnhancementSelfManaged", 25);
        hardwareMap.put("getUniqueDeviceId", 26);
    }

    //LineageStatusBarManager Aidl (ILineageStatusBarManager)
    static {
        // APRICOT + BOYSENBERRY + CANTALOUPE to 5
        // DRAGONFRUIT BEGIN
    }

    //AppSuggestManager Aidl (IAppSuggestManager)
    static {
        // APRICOT + BOYSENBERRY + CANTALOUPE to 2
        // DRAGONFRUIT BEGIN
    }

    //LineageTelephonyManager Aidl (ILineageTelephonyManager)
    static {
        // APRICOT + BOYSENBERRY + CANTALOUPE to 9
        // DRAGONFRUIT BEGIN
    }

    //PerformanceManager Aidl (IPerformanceManager)
    static {
        Map<String, Integer> perfMap = getInternalInterfaceMap("IPerformanceManager");
        // DRAGONFRUIT BEGIN
        perfMap.put("cpuBoost", 1);
        perfMap.put("setPowerProfile", 2);
        perfMap.put("getPowerProfile", 3);
        perfMap.put("getNumberOfProfiles", 4);
        perfMap.put("getProfileHasAppProfiles", 5);
    }

    //ExternalViewProviderFactory Aidl (IExternalViewProviderFactory)
    static {
        Map<String, Integer> extProviderMap =
                getInternalInterfaceMap("IExternalViewProviderFactory");
        // DRAGONFRUIT BEGIN
        extProviderMap.put("createExternalView", 1);
    }

    //ExternalViewProvider Aidl (IExternalViewProvider)
    static {
        Map<String, Integer> extViewProviderMap =
                getInternalInterfaceMap("IExternalViewProvider");
        // DRAGONFRUIT BEGIN
        extViewProviderMap.put("onAttach", 1);
        extViewProviderMap.put("onStart", 2);
        extViewProviderMap.put("onResume", 3);
        extViewProviderMap.put("onPause", 4);
        extViewProviderMap.put("onStop", 5);
        extViewProviderMap.put("onDetach", 6);
        extViewProviderMap.put("alterWindow", 7);
    }

    protected static Map<String, Integer> getInternalInterfaceMap(String targetInterface) {
        Map<String, Integer> internalMap = mApiMethodsAndValues.get(targetInterface);
        if (internalMap == null) {
            internalMap = new HashMap<String, Integer>();
            mApiMethodsAndValues.put(targetInterface, internalMap);
            return internalMap;
        }
        return internalMap;
    }

    public static Map<String, Map<String, Integer>> getInterfaces() {
        return mApiMethodsAndValues;
    }
}