Skip to content

Commit 20aab57

Browse files
committed
🎨 Fix inconsistent indentation in Java source files
Replace tabs with spaces for consistent formatting across: - PythonService.java - PythonUtil.java - PythonActivity.java (sdl2, sdl3, service_only) - Service.tmpl.java template
1 parent 359975b commit 20aab57

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

pythonforandroid/bootstraps/common/build/src/main/java/org/kivy/android/PythonService.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
6464
Log.v("python service", "service exists, do not start again");
6565
return startType();
6666
}
67-
//intent is null if OS restarts a STICKY service
67+
// intent is null if OS restarts a STICKY service
6868
if (intent == null) {
6969
Context context = getApplicationContext();
7070
intent = getThisDefaultIntent(context, "");
@@ -111,24 +111,24 @@ protected void doStartForeground(Bundle extras) {
111111
PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent,
112112
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
113113

114-
// Unspecified icon uses default.
115-
int smallIconId = context.getApplicationInfo().icon;
116-
if (smallIconName != null) {
117-
if (!smallIconName.equals("")){
118-
int resId = getResources().getIdentifier(smallIconName, "mipmap",
119-
getPackageName());
120-
if (resId ==0) {
121-
resId = getResources().getIdentifier(smallIconName, "drawable",
122-
getPackageName());
123-
}
124-
if (resId !=0) {
125-
smallIconId = resId;
114+
// Unspecified icon uses default.
115+
int smallIconId = context.getApplicationInfo().icon;
116+
if (smallIconName != null) {
117+
if (!smallIconName.equals("")) {
118+
int resId = getResources().getIdentifier(smallIconName, "mipmap",
119+
getPackageName());
120+
if (resId == 0) {
121+
resId = getResources().getIdentifier(smallIconName, "drawable",
122+
getPackageName());
123+
}
124+
if (resId != 0) {
125+
smallIconId = resId;
126+
}
126127
}
127128
}
128-
}
129129

130-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
131-
// This constructor is deprecated
130+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
131+
// This constructor is deprecated
132132
notification = new Notification(
133133
smallIconId, serviceTitle, System.currentTimeMillis());
134134
try {

pythonforandroid/bootstraps/common/build/src/main/java/org/kivy/android/PythonUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.renpy.android.AssetExtract;
1818

1919
public class PythonUtil {
20-
private static final String TAG = "pythonutil";
20+
private static final String TAG = "pythonutil";
2121

2222
protected static void addLibraryIfExists(ArrayList<String> libsList, String pattern, File libsDir) {
2323
// pattern should be the name of the lib file, without the

pythonforandroid/bootstraps/common/build/templates/Service.tmpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public int startType() {
1717
protected int getServiceId() {
1818
return {{ service_id }};
1919
}
20-
20+
2121
static private void _start(Context ctx, String smallIconName,
22-
String contentTitle, String contentText,
23-
String pythonServiceArgument) {
22+
String contentTitle, String contentText,
23+
String pythonServiceArgument) {
2424
Intent intent = getDefaultIntent(ctx, smallIconName, contentTitle,
25-
contentText, pythonServiceArgument);
25+
contentText, pythonServiceArgument);
2626
ctx.startService(intent);
2727
}
2828

@@ -31,13 +31,13 @@ static public void start(Context ctx, String pythonServiceArgument) {
3131
}
3232

3333
static public void start(Context ctx, String smallIconName,
34-
String contentTitle, String contentText,
34+
String contentTitle, String contentText,
3535
String pythonServiceArgument) {
36-
_start(ctx, smallIconName, contentTitle, contentText, pythonServiceArgument);
37-
}
36+
_start(ctx, smallIconName, contentTitle, contentText, pythonServiceArgument);
37+
}
3838

3939
static public Intent getDefaultIntent(Context ctx, String smallIconName,
40-
String contentTitle, String contentText,
40+
String contentTitle, String contentText,
4141
String pythonServiceArgument) {
4242
Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);
4343
String argument = ctx.getFilesDir().getAbsolutePath() + "/app";
@@ -58,8 +58,8 @@ static public Intent getDefaultIntent(Context ctx, String smallIconName,
5858

5959
@Override
6060
protected Intent getThisDefaultIntent(Context ctx, String pythonServiceArgument) {
61-
return Service{{ name|capitalize }}.getDefaultIntent(ctx, "", "", "",
62-
pythonServiceArgument);
61+
return Service{{ name|capitalize }}.getDefaultIntent(ctx, "", "", "",
62+
pythonServiceArgument);
6363
}
6464

6565
static public void stop(Context ctx) {

pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public String getEntryPoint(String search_dir) {
424424
*/
425425
List<String> entryPoints = new ArrayList<String>();
426426
entryPoints.add("main.pyc"); // python 3 compiled files
427-
for (String value : entryPoints) {
427+
for (String value : entryPoints) {
428428
File mainFile = new File(search_dir + "/" + value);
429429
if (mainFile.exists()) {
430430
return value;

pythonforandroid/bootstraps/sdl3/build/src/main/java/org/kivy/android/PythonActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public String getEntryPoint(String search_dir) {
424424
*/
425425
List<String> entryPoints = new ArrayList<String>();
426426
entryPoints.add("main.pyc"); // python 3 compiled files
427-
for (String value : entryPoints) {
427+
for (String value : entryPoints) {
428428
File mainFile = new File(search_dir + "/" + value);
429429
if (mainFile.exists()) {
430430
return value;

pythonforandroid/bootstraps/service_only/build/src/main/java/org/kivy/android/PythonActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public String getEntryPoint(String search_dir) {
5151
*/
5252
List<String> entryPoints = new ArrayList<String>();
5353
entryPoints.add("main.pyc"); // python 3 compiled files
54-
for (String value : entryPoints) {
54+
for (String value : entryPoints) {
5555
File mainFile = new File(search_dir + "/" + value);
5656
if (mainFile.exists()) {
5757
return value;

0 commit comments

Comments
 (0)