|
9 | 9 |
|
10 | 10 | public class MainActivity extends AppCompatActivity { |
11 | 11 |
|
12 | | - @Override |
13 | | - protected void onCreate(Bundle savedInstanceState) { |
14 | | - super.onCreate(savedInstanceState); |
15 | | - setContentView(R.layout.activity_main); |
16 | | - //If we are connected to a module we want to start our SdlService |
17 | | - if(BuildConfig.TRANSPORT.equals("MULTI") || BuildConfig.TRANSPORT.equals("MULTI_HB")) { |
18 | | - SdlReceiver.queryForConnectedService(this); |
19 | | - }else if(BuildConfig.TRANSPORT.equals("TCP")) { |
20 | | - Intent proxyIntent = new Intent(this, SdlService.class); |
21 | | - startService(proxyIntent); |
22 | | - } |
23 | | - } |
| 12 | + @Override |
| 13 | + protected void onCreate(Bundle savedInstanceState) { |
| 14 | + super.onCreate(savedInstanceState); |
| 15 | + setContentView(R.layout.activity_main); |
| 16 | + //If we are connected to a module we want to start our SdlService |
| 17 | + if (BuildConfig.TRANSPORT.equals("MULTI") || BuildConfig.TRANSPORT.equals("MULTI_HB")) { |
| 18 | + SdlReceiver.queryForConnectedService(this); |
| 19 | + } else if (BuildConfig.TRANSPORT.equals("TCP")) { |
| 20 | + Intent proxyIntent = new Intent(this, SdlService.class); |
| 21 | + startService(proxyIntent); |
| 22 | + } |
| 23 | + } |
24 | 24 |
|
25 | | - @Override |
26 | | - public boolean onCreateOptionsMenu(Menu menu) { |
27 | | - // Inflate the menu; this adds items to the action bar if it is present. |
28 | | - getMenuInflater().inflate(R.menu.main, menu); |
29 | | - return true; |
30 | | - } |
| 25 | + @Override |
| 26 | + public boolean onCreateOptionsMenu(Menu menu) { |
| 27 | + // Inflate the menu; this adds items to the action bar if it is present. |
| 28 | + getMenuInflater().inflate(R.menu.main, menu); |
| 29 | + return true; |
| 30 | + } |
31 | 31 |
|
32 | | - @Override |
33 | | - public boolean onOptionsItemSelected(MenuItem item) { |
34 | | - // Handle action bar item clicks here. The action bar will |
35 | | - // automatically handle clicks on the Home/Up button, so long |
36 | | - // as you specify a parent activity in AndroidManifest.xml. |
37 | | - int id = item.getItemId(); |
38 | | - if (id == R.id.action_settings) { |
39 | | - return true; |
40 | | - } |
41 | | - return super.onOptionsItemSelected(item); |
42 | | - } |
| 32 | + @Override |
| 33 | + public boolean onOptionsItemSelected(MenuItem item) { |
| 34 | + // Handle action bar item clicks here. The action bar will |
| 35 | + // automatically handle clicks on the Home/Up button, so long |
| 36 | + // as you specify a parent activity in AndroidManifest.xml. |
| 37 | + int id = item.getItemId(); |
| 38 | + if (id == R.id.action_settings) { |
| 39 | + return true; |
| 40 | + } |
| 41 | + return super.onOptionsItemSelected(item); |
| 42 | + } |
43 | 43 | } |
0 commit comments