Skip to content

Commit e503e81

Browse files
committed
Fixing the CI repoted error 'Imports not contiguous' - Fix error: ':spotlessJavaCheck'
1 parent 13a4d9c commit e503e81

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@
1313
import android.app.PendingIntent;
1414
import android.os.Process;
1515
import java.io.File;
16-
17-
//imports for channel definition
1816
import android.app.NotificationManager;
1917
import android.app.NotificationChannel;
2018
import android.graphics.Color;
21-
2219
import org.qtproject.qt.android.bindings.QtService;
2320

2421
public class PythonService extends QtService implements Runnable {
@@ -77,7 +74,8 @@ public int onStartCommand(Intent intent, int flags, int startId) {
7774
Log.v(TAG, "service exists, do not start again");
7875
return startType();
7976
}
80-
//intent is null if OS restarts a STICKY service
77+
78+
//intent is null if OS restarts a STICKY service
8179
if (intent == null) {
8280
Context context = getApplicationContext();
8381
intent = getThisDefaultIntent(context, "");
@@ -124,24 +122,25 @@ protected void doStartForeground(Bundle extras) {
124122
PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent,
125123
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
126124

127-
// Unspecified icon uses default.
128-
int smallIconId = context.getApplicationInfo().icon;
129-
if (smallIconName != null) {
130-
if (!smallIconName.equals("")){
131-
int resId = getResources().getIdentifier(smallIconName, "mipmap",
132-
getPackageName());
133-
if (resId ==0) {
134-
resId = getResources().getIdentifier(smallIconName, "drawable",
135-
getPackageName());
136-
}
137-
if (resId !=0) {
138-
smallIconId = resId;
125+
// Unspecified icon uses default.
126+
int smallIconId = context.getApplicationInfo().icon;
127+
128+
if (smallIconName != null) {
129+
if (!smallIconName.equals("")){
130+
int resId = getResources().getIdentifier(smallIconName, "mipmap",
131+
getPackageName());
132+
if (resId ==0) {
133+
resId = getResources().getIdentifier(smallIconName, "drawable",
134+
getPackageName());
135+
}
136+
if (resId !=0) {
137+
smallIconId = resId;
138+
}
139139
}
140140
}
141-
}
142141

143-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
144-
// This constructor is deprecated
142+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
143+
// This constructor is deprecated
145144
notification = new Notification(
146145
smallIconId, serviceTitle, System.currentTimeMillis());
147146
try {
@@ -172,6 +171,7 @@ protected void doStartForeground(Bundle extras) {
172171
builder.setSmallIcon(smallIconId);
173172
notification = builder.build();
174173
}
174+
175175
startForeground(getServiceId(), notification);
176176
}
177177

0 commit comments

Comments
 (0)