Rename openURL -> openURLFromLOVE

It's probably a good idea to remove this function in 12.0 and replace
it by calls to SDL_OpenURL() in LOVE C++ code instead.
This commit is contained in:
Miku AuahDark
2020-12-24 22:48:58 +08:00
parent 0fe970a575
commit 596cffc9dc
@@ -327,18 +327,9 @@ public class GameActivity extends SDLActivity {
}
@Keep
public static boolean openURL(String url) {
public static boolean openURLFromLOVE(String url) {
Log.d("GameActivity", "opening url = " + url);
try {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
context.startActivity(i);
return true;
} catch (RuntimeException e) {
Log.d("GameActivity", "love.system.openURL", e);
return false;
}
return openURL(url) == 0;
}
/**