1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * 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, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16package com.android.multidexlegacytestapp;
17
18import android.app.Activity;
19import android.os.Bundle;
20import android.util.Log;
21import android.widget.TextView;
22
23public class MainActivity extends Activity {
24
25    private static final String TAG = "MultidexLegacyTestApp";
26    private int instanceFieldNotInited;
27    private int instanceFieldInited =
28            new com.android.multidexlegacytestapp.manymethods.Big043().get43();
29    private static int staticField =
30            new com.android.multidexlegacytestapp.manymethods.Big044().get44();
31
32    public MainActivity() {
33        instanceFieldNotInited = new com.android.multidexlegacytestapp.manymethods.Big042().get42();
34    }
35
36    @Override
37    protected void onCreate(Bundle savedInstanceState) {
38        super.onCreate(savedInstanceState);
39        setContentView(R.layout.activity_main);
40        int value = getValue();
41        ((TextView) findViewById(R.id.label_nb)).setText("Here's the count " + value);
42
43        Log.i(TAG, "Here's the count " + value);
44    }
45
46    public int getValue() {
47        int value = new com.android.multidexlegacytestapp.manymethods.Big001().get1()
48                + new com.android.multidexlegacytestapp.manymethods.Big002().get2()
49                + new com.android.multidexlegacytestapp.manymethods.Big003().get3()
50                + new com.android.multidexlegacytestapp.manymethods.Big004().get4()
51                + new com.android.multidexlegacytestapp.manymethods.Big005().get5()
52                + new com.android.multidexlegacytestapp.manymethods.Big006().get6()
53                + new com.android.multidexlegacytestapp.manymethods.Big007().get7()
54                + new com.android.multidexlegacytestapp.manymethods.Big008().get8()
55                + new com.android.multidexlegacytestapp.manymethods.Big009().get9()
56                + new com.android.multidexlegacytestapp.manymethods.Big010().get10()
57                + new com.android.multidexlegacytestapp.manymethods.Big011().get11()
58                + new com.android.multidexlegacytestapp.manymethods.Big012().get12()
59                + new com.android.multidexlegacytestapp.manymethods.Big013().get13()
60                + new com.android.multidexlegacytestapp.manymethods.Big014().get14()
61                + new com.android.multidexlegacytestapp.manymethods.Big015().get15()
62                + new com.android.multidexlegacytestapp.manymethods.Big016().get16()
63                + new com.android.multidexlegacytestapp.manymethods.Big017().get17()
64                + new com.android.multidexlegacytestapp.manymethods.Big018().get18()
65                + new com.android.multidexlegacytestapp.manymethods.Big019().get19()
66                + new com.android.multidexlegacytestapp.manymethods.Big020().get20()
67                + new com.android.multidexlegacytestapp.manymethods.Big021().get21()
68                + new com.android.multidexlegacytestapp.manymethods.Big022().get22()
69                + new com.android.multidexlegacytestapp.manymethods.Big023().get23()
70                + new com.android.multidexlegacytestapp.manymethods.Big024().get24()
71                + new com.android.multidexlegacytestapp.manymethods.Big025().get25()
72                + new com.android.multidexlegacytestapp.manymethods.Big026().get26()
73                + new com.android.multidexlegacytestapp.manymethods.Big027().get27()
74                + new com.android.multidexlegacytestapp.manymethods.Big028().get28()
75                + new com.android.multidexlegacytestapp.manymethods.Big029().get29()
76                + new com.android.multidexlegacytestapp.manymethods.Big030().get30()
77                + new com.android.multidexlegacytestapp.manymethods.Big031().get31()
78                + new com.android.multidexlegacytestapp.manymethods.Big032().get32()
79                + new com.android.multidexlegacytestapp.manymethods.Big033().get33()
80                + new com.android.multidexlegacytestapp.manymethods.Big034().get34()
81                + new com.android.multidexlegacytestapp.manymethods.Big035().get35()
82                + new com.android.multidexlegacytestapp.manymethods.Big036().get36()
83                + new com.android.multidexlegacytestapp.manymethods.Big037().get37()
84                + new com.android.multidexlegacytestapp.manymethods.Big038().get38()
85                + new com.android.multidexlegacytestapp.manymethods.Big039().get39()
86                + new com.android.multidexlegacytestapp.manymethods.Big040().get40()
87                + new com.android.multidexlegacytestapp.manymethods.Big041().get41()
88                + instanceFieldNotInited + instanceFieldInited + staticField
89                + IntermediateClass.get() + Referenced.get(instanceFieldNotInited);
90        return value;
91    }
92
93    public int getAnnotation2Value() {
94        return ((AnnotationWithEnum2) TestApplication.annotation2).value().get();
95    }
96
97}
98