mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 11:09:49 +08:00
Changed: Rename ShareUtils openURL() to openUrl()
This commit is contained in:
@@ -152,7 +152,7 @@ public class SettingsActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
donatePreference.setOnPreferenceClickListener(preference -> {
|
donatePreference.setOnPreferenceClickListener(preference -> {
|
||||||
ShareUtils.openURL(context, TermuxConstants.TERMUX_DONATE_URL);
|
ShareUtils.openUrl(context, TermuxConstants.TERMUX_DONATE_URL);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -180,7 +180,7 @@ public class TermuxTerminalViewClient extends TermuxTerminalViewClientBase {
|
|||||||
|
|
||||||
if (!urlSet.isEmpty()) {
|
if (!urlSet.isEmpty()) {
|
||||||
String url = (String) urlSet.iterator().next();
|
String url = (String) urlSet.iterator().next();
|
||||||
ShareUtils.openURL(mActivity, url);
|
ShareUtils.openUrl(mActivity, url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -685,7 +685,7 @@ public class TermuxTerminalViewClient extends TermuxTerminalViewClientBase {
|
|||||||
lv.setOnItemLongClickListener((parent, view, position, id) -> {
|
lv.setOnItemLongClickListener((parent, view, position, id) -> {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
String url = (String) urls[position];
|
String url = (String) urls[position];
|
||||||
ShareUtils.openURL(mActivity, url);
|
ShareUtils.openUrl(mActivity, url);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -92,7 +92,7 @@ public class ShareUtils {
|
|||||||
* @param context The context for operations.
|
* @param context The context for operations.
|
||||||
* @param url The url to open.
|
* @param url The url to open.
|
||||||
*/
|
*/
|
||||||
public static void openURL(final Context context, final String url) {
|
public static void openUrl(final Context context, final String url) {
|
||||||
if (context == null || url == null || url.isEmpty()) return;
|
if (context == null || url == null || url.isEmpty()) return;
|
||||||
Uri uri = Uri.parse(url);
|
Uri uri = Uri.parse(url);
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||||
|
Reference in New Issue
Block a user