clang-format: Add JavaImportGroups for Java code

This commit is contained in:
Rémi Verschelde 2020-05-05 10:26:19 +02:00
parent 33d0b9e169
commit 6038325470
37 changed files with 113 additions and 48 deletions

View file

@ -124,4 +124,5 @@ ObjCBlockIndentWidth: 4
### Java specific config ###
Language: Java
# BreakAfterJavaFieldAnnotations: false
JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
...

View file

@ -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;
@ -77,6 +84,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;
@ -84,6 +92,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;
@ -91,12 +100,6 @@ import java.security.MessageDigest;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
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 {

View file

@ -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;
/**

View file

@ -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;
/**

View file

@ -29,13 +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 android.view.SurfaceView;
import org.godotengine.godot.input.GodotGestureHandler;
import org.godotengine.godot.input.GodotInputHandler;
import org.godotengine.godot.utils.GLUtils;
@ -47,6 +41,14 @@ 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;
import android.view.SurfaceView;
/**
* A simple GLSurfaceView sub-class that demonstrate how to perform
* OpenGL ES 2.0 rendering into a GL Surface. Note the following important

View file

@ -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

View file

@ -33,6 +33,7 @@ package org.godotengine.godot;
import android.app.Activity;
import android.hardware.SensorEvent;
import android.view.Surface;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

View file

@ -30,14 +30,16 @@
package org.godotengine.godot;
import android.content.Context;
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.content.Context;
import android.opengl.GLSurfaceView;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
/**
* Godot's renderer implementation.
*/

View file

@ -30,15 +30,16 @@
package org.godotengine.godot;
import org.godotengine.godot.input.GodotGestureHandler;
import org.godotengine.godot.input.GodotInputHandler;
import org.godotengine.godot.vulkan.VkRenderer;
import org.godotengine.godot.vulkan.VkSurfaceView;
import android.annotation.SuppressLint;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.SurfaceView;
import org.godotengine.godot.input.GodotGestureHandler;
import org.godotengine.godot.input.GodotInputHandler;
import org.godotengine.godot.vulkan.VkRenderer;
import org.godotengine.godot.vulkan.VkSurfaceView;
public class GodotVulkanRenderView extends VkSurfaceView implements GodotRenderView {

View file

@ -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 {
// ===========================================================

View file

@ -30,11 +30,12 @@
package org.godotengine.godot.input;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.GodotRenderView;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.GodotRenderView;
/**
* Handles gesture input related events for the {@link GodotRenderView} view.

View file

@ -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.GodotRenderView;
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.GodotRenderView;
import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;
/**
* Handles input related events for the {@link GodotRenderView} view.

View file

@ -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 {
// ===========================================================

View file

@ -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;

View file

@ -31,6 +31,7 @@
package org.godotengine.godot.input;
import android.view.InputDevice.MotionRange;
import java.util.ArrayList;
/**

View file

@ -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;
@ -38,16 +41,16 @@ import android.text.TextUtils;
import android.util.Log;
import android.view.Surface;
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.

View file

@ -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.

View file

@ -32,6 +32,7 @@ package org.godotengine.godot.plugin;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import java.util.Arrays;
/**

View file

@ -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;

View file

@ -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.

View file

@ -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.

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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.

View file

@ -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.

View file

@ -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 {

View file

@ -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 {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -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;

View file

@ -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;

View file

@ -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;
/**

View file

@ -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;
/**
*

View file

@ -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;