Skip to content

Commit 8dce2d5

Browse files
Minor code style changes
1 parent 7d51aeb commit 8dce2d5

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

app/src/main/java/com/sample/utils/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public class Utils {
3434

3535
private Utils() {
36-
36+
// This class is not publicly instantiable
3737
}
3838

3939
public static void showDebugDBAddressLogToast(Context context) {

debug-db/src/main/java/com/amitshekhar/utils/DatabaseHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ public static UpdateRowResponse updateRow(SQLiteDatabase db, String tableName, L
284284
}
285285

286286

287-
public static UpdateRowResponse deleteRow(SQLiteDatabase db, String tableName, List<RowDataRequest> rowDataRequests) {
287+
public static UpdateRowResponse deleteRow(SQLiteDatabase db, String tableName,
288+
List<RowDataRequest> rowDataRequests) {
288289

289290
UpdateRowResponse updateRowResponse = new UpdateRowResponse();
290291

debug-db/src/main/java/com/amitshekhar/utils/NetworkUtils.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package com.amitshekhar.utils;
2121

22+
import android.annotation.SuppressLint;
2223
import android.content.Context;
2324
import android.net.wifi.WifiManager;
2425

@@ -35,8 +36,13 @@ private NetworkUtils() {
3536
public static String getAddressLog(Context context, int port) {
3637
WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
3738
int ipAddress = wifiManager.getConnectionInfo().getIpAddress();
38-
final String formatedIpAddress = String.format("%d.%d.%d.%d", (ipAddress & 0xff), (ipAddress >> 8 & 0xff), (ipAddress >> 16 & 0xff), (ipAddress >> 24 & 0xff));
39-
return "Open http://" + formatedIpAddress + ":" + port + " in your browser";
39+
@SuppressLint("DefaultLocale")
40+
final String formattedIpAddress = String.format("%d.%d.%d.%d",
41+
(ipAddress & 0xff),
42+
(ipAddress >> 8 & 0xff),
43+
(ipAddress >> 16 & 0xff),
44+
(ipAddress >> 24 & 0xff));
45+
return "Open http://" + formattedIpAddress + ":" + port + " in your browser";
4046
}
4147

4248
}

debug-db/src/main/java/com/amitshekhar/utils/PrefHelper.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ public static TableDataResponse getAllPrefData(Context context, String tag) {
141141

142142
}
143143

144-
public static UpdateRowResponse addOrUpdateRow(Context context, String tableName, List<RowDataRequest> rowDataRequests) {
144+
public static UpdateRowResponse addOrUpdateRow(Context context, String tableName,
145+
List<RowDataRequest> rowDataRequests) {
145146
UpdateRowResponse updateRowResponse = new UpdateRowResponse();
146147

147148
if (tableName == null) {
@@ -204,7 +205,8 @@ public static UpdateRowResponse addOrUpdateRow(Context context, String tableName
204205
}
205206

206207

207-
public static UpdateRowResponse deleteRow(Context context, String tableName, List<RowDataRequest> rowDataRequests) {
208+
public static UpdateRowResponse deleteRow(Context context, String tableName,
209+
List<RowDataRequest> rowDataRequests) {
208210
UpdateRowResponse updateRowResponse = new UpdateRowResponse();
209211

210212
if (tableName == null) {

0 commit comments

Comments
 (0)