mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 06:03:09 +00:00
clang-format: Add JavaImportGroups for Java code
(cherry picked from commit 6038325470
)
This commit is contained in:
parent
d09036992c
commit
e637fe9dd3
@ -124,4 +124,5 @@ ObjCBlockIndentWidth: 4
|
||||
### Java specific config ###
|
||||
Language: Java
|
||||
# BreakAfterJavaFieldAnnotations: false
|
||||
JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
|
||||
...
|
||||
|
@ -30,6 +30,13 @@
|
||||
|
||||
package org.godotengine.godot;
|
||||
|
||||
import org.godotengine.godot.input.GodotEditText;
|
||||
import org.godotengine.godot.plugin.GodotPlugin;
|
||||
import org.godotengine.godot.plugin.GodotPluginRegistry;
|
||||
import org.godotengine.godot.utils.GodotNetUtils;
|
||||
import org.godotengine.godot.utils.PermissionsUtil;
|
||||
import org.godotengine.godot.xr.XRMode;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
@ -80,6 +87,7 @@ import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.android.vending.expansion.downloader.DownloadProgressInfo;
|
||||
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
|
||||
import com.google.android.vending.expansion.downloader.DownloaderServiceMarshaller;
|
||||
@ -87,6 +95,7 @@ import com.google.android.vending.expansion.downloader.Helpers;
|
||||
import com.google.android.vending.expansion.downloader.IDownloaderClient;
|
||||
import com.google.android.vending.expansion.downloader.IDownloaderService;
|
||||
import com.google.android.vending.expansion.downloader.IStub;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
@ -96,13 +105,8 @@ import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
import org.godotengine.godot.input.GodotEditText;
|
||||
import org.godotengine.godot.plugin.GodotPlugin;
|
||||
import org.godotengine.godot.plugin.GodotPluginRegistry;
|
||||
import org.godotengine.godot.utils.GodotNetUtils;
|
||||
import org.godotengine.godot.utils.PermissionsUtil;
|
||||
import org.godotengine.godot.xr.XRMode;
|
||||
|
||||
public abstract class Godot extends FragmentActivity implements SensorEventListener, IDownloaderClient {
|
||||
|
||||
|
@ -35,6 +35,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
|
||||
|
||||
/**
|
||||
|
@ -33,6 +33,7 @@ package org.godotengine.godot;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.vending.expansion.downloader.impl.DownloaderService;
|
||||
|
||||
/**
|
||||
|
@ -29,6 +29,9 @@
|
||||
/*************************************************************************/
|
||||
|
||||
package org.godotengine.godot;
|
||||
|
||||
import org.godotengine.godot.input.*;
|
||||
|
||||
import android.content.*;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
@ -39,11 +42,10 @@ import android.os.*;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Locale;
|
||||
import org.godotengine.godot.input.*;
|
||||
//android.os.Build
|
||||
|
||||
// Wrapper for native library
|
||||
|
||||
|
@ -32,6 +32,7 @@ package org.godotengine.godot;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.hardware.SensorEvent;
|
||||
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
|
@ -30,13 +30,15 @@
|
||||
|
||||
package org.godotengine.godot;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
import org.godotengine.godot.plugin.GodotPlugin;
|
||||
import org.godotengine.godot.plugin.GodotPluginRegistry;
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
/**
|
||||
* Godot's renderer implementation.
|
||||
*/
|
||||
|
@ -29,12 +29,7 @@
|
||||
/*************************************************************************/
|
||||
|
||||
package org.godotengine.godot;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import org.godotengine.godot.input.GodotGestureHandler;
|
||||
import org.godotengine.godot.input.GodotInputHandler;
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
@ -46,6 +41,13 @@ import org.godotengine.godot.xr.regular.RegularConfigChooser;
|
||||
import org.godotengine.godot.xr.regular.RegularContextFactory;
|
||||
import org.godotengine.godot.xr.regular.RegularFallbackConfigChooser;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
/**
|
||||
* A simple GLSurfaceView sub-class that demonstrate how to perform
|
||||
* OpenGL ES 2.0 rendering into a GL Surface. Note the following important
|
||||
|
@ -29,6 +29,9 @@
|
||||
/*************************************************************************/
|
||||
|
||||
package org.godotengine.godot.input;
|
||||
|
||||
import org.godotengine.godot.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
@ -38,8 +41,8 @@ import android.view.KeyEvent;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import org.godotengine.godot.*;
|
||||
|
||||
public class GodotEditText extends EditText {
|
||||
// ===========================================================
|
||||
|
@ -30,11 +30,12 @@
|
||||
|
||||
package org.godotengine.godot.input;
|
||||
|
||||
import org.godotengine.godot.GodotLib;
|
||||
import org.godotengine.godot.GodotView;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.MotionEvent;
|
||||
import org.godotengine.godot.GodotLib;
|
||||
import org.godotengine.godot.GodotView;
|
||||
|
||||
/**
|
||||
* Handles gesture input related events for the {@link GodotView} view.
|
||||
|
@ -32,18 +32,20 @@ package org.godotengine.godot.input;
|
||||
|
||||
import static org.godotengine.godot.utils.GLUtils.DEBUG;
|
||||
|
||||
import org.godotengine.godot.GodotLib;
|
||||
import org.godotengine.godot.GodotView;
|
||||
import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
import android.view.InputDevice.MotionRange;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import org.godotengine.godot.GodotLib;
|
||||
import org.godotengine.godot.GodotView;
|
||||
import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;
|
||||
|
||||
/**
|
||||
* Handles input related events for the {@link GodotView} view.
|
||||
|
@ -29,6 +29,9 @@
|
||||
/*************************************************************************/
|
||||
|
||||
package org.godotengine.godot.input;
|
||||
|
||||
import org.godotengine.godot.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
@ -37,7 +40,6 @@ import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TextView.OnEditorActionListener;
|
||||
import org.godotengine.godot.*;
|
||||
|
||||
public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListener {
|
||||
// ===========================================================
|
||||
|
@ -23,6 +23,7 @@ import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.view.InputDevice;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
package org.godotengine.godot.input;
|
||||
|
||||
import android.view.InputDevice.MotionRange;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
|
@ -30,6 +30,9 @@
|
||||
|
||||
package org.godotengine.godot.plugin;
|
||||
|
||||
import org.godotengine.godot.BuildConfig;
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.NonNull;
|
||||
@ -37,16 +40,16 @@ import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
import org.godotengine.godot.BuildConfig;
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
/**
|
||||
* Base class for the Godot Android plugins.
|
||||
|
@ -30,12 +30,15 @@
|
||||
|
||||
package org.godotengine.godot.plugin;
|
||||
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Arrays;
|
||||
@ -43,7 +46,6 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
/**
|
||||
* Registry used to load and access the registered Godot Android plugins.
|
||||
|
@ -32,6 +32,7 @@ package org.godotengine.godot.plugin;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,7 @@
|
||||
package org.godotengine.godot.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
|
@ -30,10 +30,11 @@
|
||||
|
||||
package org.godotengine.godot.utils;
|
||||
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.util.Log;
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
/**
|
||||
* This class handles Android-specific networking functions.
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
package org.godotengine.godot.utils;
|
||||
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
@ -37,9 +39,9 @@ import android.content.pm.PermissionInfo;
|
||||
import android.os.Build;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.godotengine.godot.Godot;
|
||||
|
||||
/**
|
||||
* This class includes utility functions for Android permissions related operations.
|
||||
|
@ -32,6 +32,7 @@ package org.godotengine.godot.xr.ovr;
|
||||
|
||||
import android.opengl.EGLExt;
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
|
@ -32,6 +32,7 @@ package org.godotengine.godot.xr.ovr;
|
||||
|
||||
import android.opengl.EGL14;
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLContext;
|
||||
|
@ -31,6 +31,7 @@
|
||||
package org.godotengine.godot.xr.ovr;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
|
@ -30,11 +30,13 @@
|
||||
|
||||
package org.godotengine.godot.xr.regular;
|
||||
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
|
||||
/**
|
||||
* Used to select the egl config for pancake games.
|
||||
|
@ -30,14 +30,16 @@
|
||||
|
||||
package org.godotengine.godot.xr.regular;
|
||||
|
||||
import org.godotengine.godot.GodotLib;
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.util.Log;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLContext;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
import org.godotengine.godot.GodotLib;
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
|
||||
/**
|
||||
* Factory used to setup the opengl context for pancake games.
|
||||
|
@ -30,11 +30,13 @@
|
||||
|
||||
package org.godotengine.godot.xr.regular;
|
||||
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
import org.godotengine.godot.utils.GLUtils;
|
||||
|
||||
/* Fallback if 32bit View is not supported*/
|
||||
public class RegularFallbackConfigChooser extends RegularConfigChooser {
|
||||
|
@ -33,7 +33,9 @@ package org.godotengine.godot.plugin.payment;
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.android.vending.billing.IInAppBillingService;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
abstract public class ConsumeTask {
|
||||
|
@ -30,16 +30,19 @@
|
||||
|
||||
package org.godotengine.godot.plugin.payment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.util.Log;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.godotengine.godot.Dictionary;
|
||||
import org.godotengine.godot.Godot;
|
||||
import org.godotengine.godot.GodotLib;
|
||||
import org.godotengine.godot.plugin.GodotPlugin;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -32,6 +32,7 @@ package org.godotengine.godot.plugin.payment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -40,9 +40,12 @@ import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.vending.billing.IInAppBillingService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -37,6 +37,7 @@ import android.content.IntentSender.SendIntentException;
|
||||
import android.os.Bundle;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.vending.billing.IInAppBillingService;
|
||||
|
||||
abstract public class PurchaseTask {
|
||||
|
@ -34,9 +34,12 @@ import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.vending.billing.IInAppBillingService;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -30,12 +30,15 @@
|
||||
|
||||
package org.godotengine.godot.plugin.payment;
|
||||
|
||||
import org.godotengine.godot.plugin.payment.utils.HttpRequester;
|
||||
import org.godotengine.godot.plugin.payment.utils.RequestParams;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import org.godotengine.godot.plugin.payment.utils.HttpRequester;
|
||||
import org.godotengine.godot.plugin.payment.utils.RequestParams;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -38,8 +38,10 @@ import java.security.KeyStore;
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.UnrecoverableKeyException;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
|
||||
import org.apache.http.conn.ssl.SSLSocketFactory;
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,12 @@
|
||||
|
||||
package org.godotengine.godot.plugin.payment.utils;
|
||||
|
||||
import org.godotengine.godot.utils.Crypt;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -40,6 +43,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.KeyStore;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpVersion;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
@ -61,7 +65,6 @@ import org.apache.http.params.HttpParams;
|
||||
import org.apache.http.params.HttpProtocolParams;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.godotengine.godot.utils.Crypt;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -33,6 +33,7 @@ package org.godotengine.godot.plugin.payment.utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user