Skip to content

Commit 454e1e6

Browse files
author
Robert Henigan
authored
Merge pull request #1782 from smartdevicelink/cleanup/proposal_sdl_0286_spacing
Cleanup/proposal sdl 0286 spacing
2 parents 039503d + 11fb324 commit 454e1e6

62 files changed

Lines changed: 247 additions & 235 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/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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ public void testPresentAlertTruncatedText() {
194194

195195
windowCapability = getWindowCapability(2);
196196

197-
presentAlertOperation = new PresentAlertOperation(internalInterface, alertView, windowCapability, speechCapabilities, fileManager, 1, alertCompletionListener, alertSoftButtonClearListener);
197+
presentAlertOperation = new PresentAlertOperation(internalInterface, alertView, windowCapability, speechCapabilities, fileManager, 1, alertCompletionListener, alertSoftButtonClearListener);
198198
alert = presentAlertOperation.alertRpc();
199199
assertEquals(alert.getAlertText1(), alertView.getText());
200-
assertEquals(alert.getAlertText2(),alertView.getSecondaryText() + " - " + alertView.getTertiaryText());
200+
assertEquals(alert.getAlertText2(), alertView.getSecondaryText() + " - " + alertView.getTertiaryText());
201201
}
202202

203203
@Test

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,8 @@ public void testSettingSoftButtonId() {
209209
SoftButtonObject softButtonObject3 = new SoftButtonObject("object1", Arrays.asList(softButtonState1, softButtonState2), softButtonState1.getName(), null);
210210
SoftButtonObject softButtonObject4 = new SoftButtonObject("object2", Arrays.asList(softButtonState3, softButtonState4), softButtonState3.getName(), null);
211211
assertTrue(screenManager.checkAndAssignButtonIds(softButtonObjects, BaseScreenManager.ManagerLocation.SOFTBUTTON_MANAGER));
212-
213-
214-
215-
216-
217212
}
213+
218214
@Test
219215
public void testAssigningIdsToSoftButtonObjects() {
220216
SoftButtonObject sbo1, sbo2, sbo3, sbo4, sbo5;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,15 @@ public void testDefaultWindowCapabilityNotSet() throws NoSuchFieldException, Ill
279279
newCSM.setKeyboardConfiguration(newCSM.defaultKeyboardConfiguration());
280280
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
281281
field.setAccessible(true);
282-
KeyboardProperties properties = (KeyboardProperties)field.get(newCSM);
282+
KeyboardProperties properties = (KeyboardProperties) field.get(newCSM);
283283
assertEquals(properties, csm.defaultKeyboardConfiguration());
284284

285285
// Test presentKeyboard
286286
newCSM = new ChoiceSetManager(internalInterface, fileManager);
287287
newCSM.presentKeyboard("qwerty", newCSM.defaultKeyboardConfiguration(), null);
288288
field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
289289
field.setAccessible(true);
290-
properties = (KeyboardProperties)field.get(newCSM);
290+
properties = (KeyboardProperties) field.get(newCSM);
291291
assertEquals(properties, csm.defaultKeyboardConfiguration());
292292
}
293293

@@ -314,7 +314,7 @@ public void testDefaultWindowCapabilityTooManyKeys() throws NoSuchFieldException
314314
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
315315
field.setAccessible(true);
316316

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

319319
assertEquals(getProperties.getCustomKeys().size(), 1);
320320
}
@@ -342,7 +342,7 @@ public void testCustomKeysNull() throws NoSuchFieldException, IllegalAccessExcep
342342
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
343343
field.setAccessible(true);
344344

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

347347
assertNull(getProperties.getCustomKeys());
348348
}
@@ -373,7 +373,7 @@ public void testMaskInputCharactersNotSupported() throws NoSuchFieldException, I
373373
Field field = BaseChoiceSetManager.class.getDeclaredField("keyboardConfiguration");
374374
field.setAccessible(true);
375375

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

378378
assertNull(getProperties.getMaskInputCharacters());
379379
}

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public void testShouldCellIncludeImage() {
331331
assertTrue(MenuReplaceUtilities.shouldCellIncludePrimaryImageFromCell(internalInterface, menuCell, fileManager, windowCapability));
332332
}
333333

334-
private WindowCapability createWindowCapability (boolean supportsCmdIcon, boolean supportsSubMenuIcon) {
334+
private WindowCapability createWindowCapability(boolean supportsCmdIcon, boolean supportsSubMenuIcon) {
335335
WindowCapability windowCapability = new WindowCapability();
336336
windowCapability.setImageFields(new ArrayList<ImageField>());
337337
if (supportsCmdIcon) {
@@ -343,7 +343,7 @@ private WindowCapability createWindowCapability (boolean supportsCmdIcon, boolea
343343
return windowCapability;
344344
}
345345

346-
private FileManager createMockFileManager (boolean hasUploadedFile) {
346+
private FileManager createMockFileManager(boolean hasUploadedFile) {
347347
FileManager fileManager = mock(FileManager.class);
348348
when(fileManager.hasUploadedFile(any(SdlArtwork.class))).thenReturn(hasUploadedFile);
349349
return fileManager;
@@ -392,7 +392,7 @@ private List<MenuCell> createMenuCellList() {
392392
List<MenuCell> menuCellList = new ArrayList<>(Arrays.asList(menuCell1, menuCell2, menuCell3, menuCell4));
393393
addIdsToMenuCells(menuCellList, parentIdNotFound);
394394

395-
return menuCellList ;
395+
return menuCellList;
396396
}
397397

398398
private List<MenuCell> createNewMenuList() {
@@ -422,6 +422,6 @@ private List<MenuCell> createNewMenuList() {
422422
List<MenuCell> newMenuList = new ArrayList<>(Arrays.asList(menuCell5));
423423
addIdsToMenuCells(newMenuList, parentIdNotFound);
424424

425-
return newMenuList ;
425+
return newMenuList;
426426
}
427427
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void testOpenSubMenu() {
108108
verify(internalInterface, Mockito.times(1)).sendRPC(any(ShowAppMenu.class));
109109
}
110110

111-
private Answer<Void> createShowAppMenuAnswer(final boolean success, final Integer menuIdToAssert){
111+
private Answer<Void> createShowAppMenuAnswer(final boolean success, final Integer menuIdToAssert) {
112112
return new Answer<Void>() {
113113
@Override
114114
public Void answer(InvocationOnMock invocation) {
@@ -118,7 +118,7 @@ public Void answer(InvocationOnMock invocation) {
118118
@Override
119119
public void run() {
120120
ShowAppMenu showAppMenu = (ShowAppMenu) request;
121-
assertEquals(showAppMenu.getMenuID(), menuIdToAssert);
121+
assertEquals(showAppMenu.getMenuID(), menuIdToAssert);
122122
}
123123
});
124124
RPCResponse response = new RPCResponse(request.getFunctionID().toString());

0 commit comments

Comments
 (0)