这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit 39c4a17

Browse files
Changed: Log full intent for TermuxFloatService and remove multiple log entries for action
1 parent 62c713a commit 39c4a17

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/src/main/java/com/termux/window/TermuxFloatService.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,21 @@ public int onStartCommand(Intent intent, int flags, int startId) {
5656
if (mFloatingWindow == null && !initializeFloatView())
5757
return Service.START_NOT_STICKY;
5858

59-
String action = intent.getAction();
59+
String action = null;
60+
if (intent != null) {
61+
Logger.logVerboseExtended(LOG_TAG, "Received intent:\n" + IntentUtils.getIntentString(intent));
62+
action = intent.getAction();
63+
}
6064

6165
if (action != null) {
6266
switch (action) {
6367
case TERMUX_FLOAT_SERVICE.ACTION_STOP_SERVICE:
64-
Logger.logDebug(LOG_TAG, "ACTION_STOP_SERVICE intent received");
6568
actionStopService();
6669
break;
6770
case TERMUX_FLOAT_SERVICE.ACTION_SHOW:
68-
Logger.logDebug(LOG_TAG, "ACTION_SHOW intent received");
6971
setVisible(true);
7072
break;
7173
case TERMUX_FLOAT_SERVICE.ACTION_HIDE:
72-
Logger.logDebug(LOG_TAG, "ACTION_HIDE intent received");
7374
setVisible(false);
7475
break;
7576
default:

0 commit comments

Comments
 (0)