Skip to content

Commit ec96925

Browse files
committed
Reformat android Java files
1 parent d0f783c commit ec96925

49 files changed

Lines changed: 339 additions & 314 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

android/sdl_android/src/androidTest/java/com/android/grafika/gles/OffscreenSurfaceTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
import android.opengl.GLES20;
44
import android.os.Environment;
5+
56
import androidx.test.ext.junit.runners.AndroidJUnit4;
7+
68
import android.util.Log;
79

810
import org.junit.Test;
@@ -32,6 +34,7 @@ public void testReadPixels() {
3234
}
3335

3436
// HELPER test method
37+
3538
/**
3639
* Does a simple bit of rendering and then reads the pixels back.
3740
*
@@ -99,7 +102,7 @@ private float runReadPixelsTest(OffscreenSurface eglSurface) {
99102
assertTrue(pixelBuf.capacity() > 0 && totalTime > 0);
100103
}
101104

102-
return (float)totalTime / 1000000f;
105+
return (float) totalTime / 1000000f;
103106
}
104107

105108
}

android/sdl_android/src/androidTest/java/com/smartdevicelink/AlertViewTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.smartdevicelink.managers.screen.SoftButtonObject;
99
import com.smartdevicelink.managers.screen.SoftButtonState;
1010
import com.smartdevicelink.proxy.rpc.enums.FileType;
11+
1112
import static junit.framework.TestCase.assertEquals;
1213
import static junit.framework.TestCase.assertTrue;
1314

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/AlertAudioDataTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
import android.content.Context;
44
import android.net.Uri;
5+
56
import androidx.test.ext.junit.runners.AndroidJUnit4;
67

78
import com.smartdevicelink.managers.file.filetypes.SdlFile;
89
import com.smartdevicelink.proxy.rpc.enums.FileType;
910
import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
11+
1012
import org.junit.Before;
1113
import org.junit.Test;
1214
import org.junit.runner.RunWith;
15+
1316
import java.util.Collections;
1417

1518
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/AlertManagerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public void setUp() throws Exception {
6868
public Void answer(InvocationOnMock invocation) {
6969
Object[] args = invocation.getArguments();
7070
OnPermissionChangeListener onPermissionChangeListener = (OnPermissionChangeListener) args[2];
71-
Map<FunctionID, PermissionStatus > allowedPermissions = new HashMap<>();
71+
Map<FunctionID, PermissionStatus> allowedPermissions = new HashMap<>();
7272
int permissionGroupStatus = PermissionManager.PERMISSION_GROUP_STATUS_DISALLOWED;
73-
onPermissionChangeListener.onPermissionsChange(allowedPermissions,permissionGroupStatus);
73+
onPermissionChangeListener.onPermissionsChange(allowedPermissions, permissionGroupStatus);
7474
return null;
7575
}
7676
};

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/PresentAlertOperationTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public Void answer(InvocationOnMock invocation) {
108108
};
109109

110110
Task task;
111+
111112
@Before
112113
public void setUp() throws Exception {
113114
Context mTestContext = getInstrumentation().getContext();
@@ -194,10 +195,10 @@ public void testPresentAlertTruncatedText() {
194195

195196
windowCapability = getWindowCapability(2);
196197

197-
presentAlertOperation = new PresentAlertOperation(internalInterface, alertView, windowCapability, speechCapabilities, fileManager, 1, alertCompletionListener, alertSoftButtonClearListener);
198+
presentAlertOperation = new PresentAlertOperation(internalInterface, alertView, windowCapability, speechCapabilities, fileManager, 1, alertCompletionListener, alertSoftButtonClearListener);
198199
alert = presentAlertOperation.alertRpc();
199200
assertEquals(alert.getAlertText1(), alertView.getText());
200-
assertEquals(alert.getAlertText2(),alertView.getSecondaryText() + " - " + alertView.getTertiaryText());
201+
assertEquals(alert.getAlertText2(), alertView.getSecondaryText() + " - " + alertView.getTertiaryText());
201202
}
202203

203204
@Test

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/ScreenManagerTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,8 @@ public void testSettingSoftButtonId() {
211211
assertTrue(screenManager.checkAndAssignButtonIds(softButtonObjects, BaseScreenManager.ManagerLocation.SOFTBUTTON_MANAGER));
212212

213213

214-
215-
216-
217214
}
215+
218216
@Test
219217
public void testAssigningIdsToSoftButtonObjects() {
220218
SoftButtonObject sbo1, sbo2, sbo3, sbo4, sbo5;

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/choiceset/ChoiceSetManagerTests.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
*/
3535

3636
package com.smartdevicelink.managers.screen.choiceset;
37+
3738
import androidx.test.ext.junit.runners.AndroidJUnit4;
3839

3940
import com.livio.taskmaster.Taskmaster;
@@ -279,15 +280,15 @@ public void testDefaultWindowCapabilityNotSet() throws NoSuchFieldException, Ill
279280
newCSM.setKeyboardConfiguration(newCSM.defaultKeyboardConfiguration());
280281
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
281282
field.setAccessible(true);
282-
KeyboardProperties properties = (KeyboardProperties)field.get(newCSM);
283+
KeyboardProperties properties = (KeyboardProperties) field.get(newCSM);
283284
assertEquals(properties, csm.defaultKeyboardConfiguration());
284285

285286
// Test presentKeyboard
286287
newCSM = new ChoiceSetManager(internalInterface, fileManager);
287288
newCSM.presentKeyboard("qwerty", newCSM.defaultKeyboardConfiguration(), null);
288289
field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
289290
field.setAccessible(true);
290-
properties = (KeyboardProperties)field.get(newCSM);
291+
properties = (KeyboardProperties) field.get(newCSM);
291292
assertEquals(properties, csm.defaultKeyboardConfiguration());
292293
}
293294

@@ -314,7 +315,7 @@ public void testDefaultWindowCapabilityTooManyKeys() throws NoSuchFieldException
314315
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
315316
field.setAccessible(true);
316317

317-
KeyboardProperties getProperties = (KeyboardProperties)field.get(newCSM);
318+
KeyboardProperties getProperties = (KeyboardProperties) field.get(newCSM);
318319

319320
assertEquals(getProperties.getCustomKeys().size(), 1);
320321
}
@@ -342,7 +343,7 @@ public void testCustomKeysNull() throws NoSuchFieldException, IllegalAccessExcep
342343
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
343344
field.setAccessible(true);
344345

345-
KeyboardProperties getProperties = (KeyboardProperties)field.get(newCSM);
346+
KeyboardProperties getProperties = (KeyboardProperties) field.get(newCSM);
346347

347348
assertNull(getProperties.getCustomKeys());
348349
}
@@ -373,7 +374,7 @@ public void testMaskInputCharactersNotSupported() throws NoSuchFieldException, I
373374
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
374375
field.setAccessible(true);
375376

376-
KeyboardProperties getProperties = (KeyboardProperties)field.get(newCSM);
377+
KeyboardProperties getProperties = (KeyboardProperties) field.get(newCSM);
377378

378379
assertNull(getProperties.getMaskInputCharacters());
379380
}

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/choiceset/PreloadPresentChoicesOperationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public void testCancelingChoiceSetIfThreadHasFinished() {
344344
when(internalInterface.getSdlMsgVersion()).thenReturn(new SdlMsgVersion(6, 0));
345345
WindowCapability windowCapability = new WindowCapability();
346346
HashSet<ChoiceCell> loadedCells = new HashSet<>();
347-
presentChoicesOperation = new PreloadPresentChoicesOperation(internalInterface, fileManager, choiceSet, InteractionMode.MANUAL_ONLY, null, null, TestValues.GENERAL_INTEGER,null, windowCapability, true, loadedCells, null, null);
347+
presentChoicesOperation = new PreloadPresentChoicesOperation(internalInterface, fileManager, choiceSet, InteractionMode.MANUAL_ONLY, null, null, TestValues.GENERAL_INTEGER, null, windowCapability, true, loadedCells, null, null);
348348
presentChoicesOperation.finishOperation(false);
349349

350350
assertEquals(Task.FINISHED, presentChoicesOperation.getState());
@@ -360,7 +360,7 @@ public void testCancelingChoiceSetIfThreadHasCanceled() {
360360
when(internalInterface.getSdlMsgVersion()).thenReturn(new SdlMsgVersion(6, 0));
361361
WindowCapability windowCapability = new WindowCapability();
362362
HashSet<ChoiceCell> loadedCells = new HashSet<>();
363-
presentChoicesOperation = new PreloadPresentChoicesOperation(internalInterface, fileManager, choiceSet, InteractionMode.MANUAL_ONLY, null, null, TestValues.GENERAL_INTEGER,null, windowCapability, true, loadedCells, null, null);
363+
presentChoicesOperation = new PreloadPresentChoicesOperation(internalInterface, fileManager, choiceSet, InteractionMode.MANUAL_ONLY, null, null, TestValues.GENERAL_INTEGER, null, windowCapability, true, loadedCells, null, null);
364364
presentChoicesOperation.cancelTask();
365365

366366
assertEquals(Task.CANCELED, presentChoicesOperation.getState());

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuConfigurationUpdateOperationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public void run() {
192192
transactionQueue.add(operation, false);
193193
}
194194

195-
private Answer<Void> createSetGlobalPropertiesAnswer(final boolean success){
195+
private Answer<Void> createSetGlobalPropertiesAnswer(final boolean success) {
196196
return new Answer<Void>() {
197197
@Override
198198
public Void answer(InvocationOnMock invocation) {
@@ -206,7 +206,7 @@ public Void answer(InvocationOnMock invocation) {
206206
};
207207
}
208208

209-
private WindowCapability createWindowCapability (boolean supportsList, boolean supportsTile) {
209+
private WindowCapability createWindowCapability(boolean supportsList, boolean supportsTile) {
210210
WindowCapability windowCapability = new WindowCapability();
211211
windowCapability.setMenuLayoutsAvailable(new ArrayList<MenuLayout>());
212212
if (supportsList) {

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuManagerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public Void answer(InvocationOnMock invocation) {
145145
@Override
146146
public Void answer(InvocationOnMock invocation) {
147147
Object[] args = invocation.getArguments();
148-
List<RPCMessage> rpcs = (List<RPCMessage>) args[0];
148+
List<RPCMessage> rpcs = (List<RPCMessage>) args[0];
149149
OnMultipleRequestListener listener = (OnMultipleRequestListener) args[1];
150150

151151
for (RPCMessage rpcMessage : rpcs) {
@@ -550,7 +550,7 @@ public void testClearingMenu() {
550550
// Sleep to give time to Taskmaster to run the operations
551551
sleep();
552552

553-
assertEquals(0 , menuManager.currentMenuCells.size());
553+
assertEquals(0, menuManager.currentMenuCells.size());
554554
}
555555

556556
@Test

0 commit comments

Comments
 (0)