Skip to content

Commit

Permalink
Added: Rename app classes in TermuxConstants with _APP suffix add…
Browse files Browse the repository at this point in the history
…ed and add `TERMUX_*_MAIN_ACTIVITY_NAME` and `TERMUX_*_LAUNCHER_ACTIVITY_NAME` constants to each app class
  • Loading branch information
agnostic-apollo committed Jan 12, 2025
1 parent fb01127 commit 078eea2
Showing 1 changed file with 53 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.termux.shared.termux;

import android.annotation.SuppressLint;
import android.content.Intent;

import com.termux.shared.shell.command.ExecutionCommand;
import com.termux.shared.shell.command.ExecutionCommand.Runner;
Expand All @@ -11,7 +12,7 @@
import java.util.List;

/*
* Version: v0.52.0
* Version: v0.53.0
* SPDX-License-Identifier: MIT
*
* Changelog
Expand Down Expand Up @@ -277,6 +278,10 @@
*
* - 0.52.0 (2022-06-18)
* - Added `TERMUX_PREFIX_DIR_IGNORED_SUB_FILES_PATHS_TO_CONSIDER_AS_EMPTY`.
*
* - 0.53.0 (2025-01-12)
* - Renamed `TERMUX_API`, `TERMUX_STYLING`, `TERMUX_TASKER`, `TERMUX_WIDGET` classes with `_APP` suffix added.
* - Added `TERMUX_*_MAIN_ACTIVITY_NAME` and `TERMUX_*_LAUNCHER_ACTIVITY_NAME` constants to each app class.
*/

/**
Expand Down Expand Up @@ -1192,10 +1197,30 @@ public static final class RUN_COMMAND_SERVICE {
/**
* Termux:API app constants.
*/
public static final class TERMUX_API {
public static final class TERMUX_API_APP {

/** Termux:API app main activity name. */
public static final String TERMUX_API_MAIN_ACTIVITY_NAME = TERMUX_API_PACKAGE_NAME + ".activities.TermuxAPIMainActivity"; // Default: "com.termux.api.activities.TermuxAPIMainActivity"

/** Termux:API app launcher activity name. This is an `activity-alias` for {@link #TERMUX_API_MAIN_ACTIVITY_NAME} used for launchers with {@link Intent#CATEGORY_LAUNCHER}. */
public static final String TERMUX_API_LAUNCHER_ACTIVITY_NAME = TERMUX_API_PACKAGE_NAME + ".activities.TermuxAPILauncherActivity"; // Default: "com.termux.api.activities.TermuxAPILauncherActivity"

}





/**
* Termux:Boot app constants.
*/
public static final class TERMUX_BOOT_APP {

/** Termux:Boot app main activity name. */
public static final String TERMUX_BOOT_MAIN_ACTIVITY_NAME = TERMUX_BOOT_PACKAGE_NAME + ".activities.TermuxBootMainActivity"; // Default: "com.termux.boot.activities.TermuxBootMainActivity"

/** Termux:API app core activity name. */
public static final String TERMUX_API_ACTIVITY_NAME = TERMUX_API_PACKAGE_NAME + ".activities.TermuxAPIActivity"; // Default: "com.termux.tasker.activities.TermuxAPIActivity"
/** Termux:Boot app launcher activity name. This is an `activity-alias` for {@link #TERMUX_BOOT_MAIN_ACTIVITY_NAME} used for launchers with {@link Intent#CATEGORY_LAUNCHER}. */
public static final String TERMUX_BOOT_LAUNCHER_ACTIVITY_NAME = TERMUX_BOOT_PACKAGE_NAME + ".activities.TermuxBootLauncherActivity"; // Default: "com.termux.boot.activities.TermuxBootLauncherActivity"

}

Expand All @@ -1208,6 +1233,9 @@ public static final class TERMUX_API {
*/
public static final class TERMUX_FLOAT_APP {

/** Termux:Float app core activity name. */
public static final String TERMUX_FLOAT_ACTIVITY_NAME = TERMUX_FLOAT_PACKAGE_NAME + ".TermuxFloatActivity"; // Default: "com.termux.window.TermuxFloatActivity"

/** Termux:Float app core service name. */
public static final String TERMUX_FLOAT_SERVICE_NAME = TERMUX_FLOAT_PACKAGE_NAME + ".TermuxFloatService"; // Default: "com.termux.window.TermuxFloatService"

Expand Down Expand Up @@ -1236,11 +1264,18 @@ public static final class TERMUX_FLOAT_SERVICE {
/**
* Termux:Styling app constants.
*/
public static final class TERMUX_STYLING {
public static final class TERMUX_STYLING_APP {

/** Termux:Styling app core activity name. */
public static final String TERMUX_STYLING_ACTIVITY_NAME = TERMUX_STYLING_PACKAGE_NAME + ".TermuxStyleActivity"; // Default: "com.termux.styling.TermuxStyleActivity"


/** Termux:Styling app main activity name. */
public static final String TERMUX_STYLING_MAIN_ACTIVITY_NAME = TERMUX_STYLING_PACKAGE_NAME + ".activities.TermuxStylingMainActivity"; // Default: "com.termux.styling.activities.TermuxStylingMainActivity"

/** Termux:Styling app launcher activity name. This is an `activity-alias` for {@link #TERMUX_STYLING_MAIN_ACTIVITY_NAME} used for launchers with {@link Intent#CATEGORY_LAUNCHER}. */
public static final String TERMUX_STYLING_LAUNCHER_ACTIVITY_NAME = TERMUX_STYLING_PACKAGE_NAME + ".activities.TermuxStylingLauncherActivity"; // Default: "com.termux.styling.activities.TermuxStylingLauncherActivity"

}


Expand All @@ -1250,10 +1285,13 @@ public static final class TERMUX_STYLING {
/**
* Termux:Tasker app constants.
*/
public static final class TERMUX_TASKER {
public static final class TERMUX_TASKER_APP {

/** Termux:Tasker app main activity name. */
public static final String TERMUX_TASKER_MAIN_ACTIVITY_NAME = TERMUX_TASKER_PACKAGE_NAME + ".activities.TermuxTaskerMainActivity"; // Default: "com.termux.tasker.activities.TermuxTaskerMainActivity"

/** Termux:Tasker app core activity name. */
public static final String TERMUX_TASKER_ACTIVITY_NAME = TERMUX_TASKER_PACKAGE_NAME + ".activities.TermuxTaskerActivity"; // Default: "com.termux.tasker.activities.TermuxTaskerActivity"
/** Termux:Tasker app launcher activity name. This is an `activity-alias` for {@link #TERMUX_TASKER_MAIN_ACTIVITY_NAME} used for launchers with {@link Intent#CATEGORY_LAUNCHER}. */
public static final String TERMUX_TASKER_LAUNCHER_ACTIVITY_NAME = TERMUX_TASKER_PACKAGE_NAME + ".activities.TermuxTaskerLauncherActivity"; // Default: "com.termux.tasker.activities.TermuxTaskerLauncherActivity"

}

Expand All @@ -1264,15 +1302,19 @@ public static final class TERMUX_TASKER {
/**
* Termux:Widget app constants.
*/
public static final class TERMUX_WIDGET {
public static final class TERMUX_WIDGET_APP {

/** Termux:Widget app core activity name. */
public static final String TERMUX_WIDGET_ACTIVITY_NAME = TERMUX_WIDGET_PACKAGE_NAME + ".activities.TermuxWidgetActivity"; // Default: "com.termux.widget.activities.TermuxWidgetActivity"
/** Termux:Widget app main activity name. */
public static final String TERMUX_WIDGET_MAIN_ACTIVITY_NAME = TERMUX_WIDGET_PACKAGE_NAME + ".activities.TermuxWidgetMainActivity"; // Default: "com.termux.widget.activities.TermuxWidgetMainActivity"

/** Termux:Widget app launcher activity name. This is an `activity-alias` for {@link #TERMUX_WIDGET_MAIN_ACTIVITY_NAME} used for launchers with {@link Intent#CATEGORY_LAUNCHER}. */
public static final String TERMUX_WIDGET_LAUNCHER_ACTIVITY_NAME = TERMUX_WIDGET_PACKAGE_NAME + ".activities.TermuxWidgetLauncherActivity"; // Default: "com.termux.widget.activities.TermuxWidgetLauncherActivity"


/** Intent {@code String} extra for the token of the Termux:Widget app shortcuts. */
public static final String EXTRA_TOKEN_NAME = TERMUX_PACKAGE_NAME + ".shortcut.token"; // Default: "com.termux.shortcut.token"


/**
* Termux:Widget app {@link android.appwidget.AppWidgetProvider} class.
*/
Expand Down

0 comments on commit 078eea2

Please sign in to comment.