From a85fd06d2018123ae5657fc241cd89eff99fedf2 Mon Sep 17 00:00:00 2001 From: Marcus <3160876878@qq.com> Date: Thu, 16 Nov 2023 21:39:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=95=B4?= =?UTF-8?q?=E7=90=86=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E4=BB=A3=E7=A0=81=E7=9A=84=E6=9C=80=E7=BB=88=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/build.gradle | 1 + src/app/src/main/AndroidManifest.xml | 8 +- src/app/src/main/cpp/jni_interface.cpp | 28 +- src/app/src/main/java/wificar/Database.java | 55 + .../AboutActivity.java} | 6 +- .../BackgroundActivity.java} | 10 +- .../ControlActivity.java} | 34 +- .../MainActivity.java} | 26 +- .../java/wificar/activity/MyActivity.java | 1316 +++++++++++++++ .../{ => components}/MySurfaceView.java | 34 +- .../java/wificar/components/MyTextView.java | 1438 +++++++++++++++++ .../wificar/{ => components}/RockerView.java | 2 +- .../wificar/entity/InfraredSensorData.java | 14 + .../wificar/entity/LivingFeatureData.java | 16 + .../wificar/entity/UltraSoundSensorData.java | 14 + .../wificar/{ => network}/SocketListener.java | 32 +- .../{ => network}/SoundSocketListener.java | 2 +- .../src/main/java/wificar/{ => yolo}/Box.java | 2 +- .../java/wificar/{ => yolo}/Constant.java | 2 +- .../java/wificar/{ => yolo}/KeyPoint.java | 2 +- .../java/wificar/{ => yolo}/SimplePose.java | 2 +- .../main/java/wificar/{ => yolo}/YOLOv5.java | 4 +- .../src/main/res/layout/activity_settings.xml | 2 +- src/app/src/main/res/layout/myvideo.xml | 4 +- 24 files changed, 2955 insertions(+), 99 deletions(-) create mode 100644 src/app/src/main/java/wificar/Database.java rename src/app/src/main/java/wificar/{SettingsActivity.java => activity/AboutActivity.java} (84%) rename src/app/src/main/java/wificar/{BgPictureShowActivity.java => activity/BackgroundActivity.java} (93%) rename src/app/src/main/java/wificar/{MyVideo.java => activity/ControlActivity.java} (92%) rename src/app/src/main/java/wificar/{MyMainFrm.java => activity/MainActivity.java} (83%) create mode 100644 src/app/src/main/java/wificar/activity/MyActivity.java rename src/app/src/main/java/wificar/{ => components}/MySurfaceView.java (96%) create mode 100644 src/app/src/main/java/wificar/components/MyTextView.java rename src/app/src/main/java/wificar/{ => components}/RockerView.java (99%) create mode 100644 src/app/src/main/java/wificar/entity/InfraredSensorData.java create mode 100644 src/app/src/main/java/wificar/entity/LivingFeatureData.java create mode 100644 src/app/src/main/java/wificar/entity/UltraSoundSensorData.java rename src/app/src/main/java/wificar/{ => network}/SocketListener.java (66%) rename src/app/src/main/java/wificar/{ => network}/SoundSocketListener.java (98%) rename src/app/src/main/java/wificar/{ => yolo}/Box.java (98%) rename src/app/src/main/java/wificar/{ => yolo}/Constant.java (94%) rename src/app/src/main/java/wificar/{ => yolo}/KeyPoint.java (98%) rename src/app/src/main/java/wificar/{ => yolo}/SimplePose.java (93%) rename src/app/src/main/java/wificar/{ => yolo}/YOLOv5.java (91%) diff --git a/src/app/build.gradle b/src/app/build.gradle index 3193558..cd351ab 100644 --- a/src/app/build.gradle +++ b/src/app/build.gradle @@ -52,6 +52,7 @@ android { } dependencies { + implementation 'com.j256.ormlite:ormlite-android:6.1' implementation 'io.github.litao0621:nifty-slider:1.4.6' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.6.1' diff --git a/src/app/src/main/AndroidManifest.xml b/src/app/src/main/AndroidManifest.xml index 1f52d28..731986b 100644 --- a/src/app/src/main/AndroidManifest.xml +++ b/src/app/src/main/AndroidManifest.xml @@ -21,11 +21,11 @@ android:theme="@style/Theme.AppCompat.Light.NoActionBar" android:label="@string/app_name" > @@ -35,11 +35,11 @@ diff --git a/src/app/src/main/cpp/jni_interface.cpp b/src/app/src/main/cpp/jni_interface.cpp index bc5d971..d7921c6 100644 --- a/src/app/src/main/cpp/jni_interface.cpp +++ b/src/app/src/main/cpp/jni_interface.cpp @@ -56,7 +56,7 @@ JNIEXPORT void JNI_OnUnload(JavaVM *vm, void *reserved) { Yolov5 ********************************************************************************************/ extern "C" JNIEXPORT void JNICALL -Java_wificar_YOLOv5_init(JNIEnv *env, jclass, jobject assetManager, jboolean useGPU) { +Java_wificar_yolo_YOLOv5_init(JNIEnv *env, jclass, jobject assetManager, jboolean useGPU) { if (YoloV5::detector != nullptr) { delete YoloV5::detector; YoloV5::detector = nullptr; @@ -68,10 +68,10 @@ Java_wificar_YOLOv5_init(JNIEnv *env, jclass, jobject assetManager, jboolean use } extern "C" JNIEXPORT jobjectArray JNICALL -Java_wificar_YOLOv5_detect(JNIEnv *env, jclass, jobject image, jdouble threshold, jdouble nms_threshold) { +Java_wificar_yolo_YOLOv5_detect(JNIEnv *env, jclass, jobject image, jdouble threshold, jdouble nms_threshold) { auto result = YoloV5::detector->detect(env, image, threshold, nms_threshold); - auto box_cls = env->FindClass("wificar/Box"); + auto box_cls = env->FindClass("wificar/yolo/Box"); auto cid = env->GetMethodID(box_cls, "", "(FFFFIF)V"); jobjectArray ret = env->NewObjectArray(result.size(), box_cls, nullptr); int i = 0; @@ -86,7 +86,7 @@ Java_wificar_YOLOv5_detect(JNIEnv *env, jclass, jobject image, jdouble threshold // ***************************************[ Yolov5 Custom Layer ]**************************************** extern "C" JNIEXPORT void JNICALL -Java_wificar_YOLOv5_initCustomLayer(JNIEnv *env, jclass, jobject assetManager, jboolean useGPU) { +Java_wificar_yolo_YOLOv5_initCustomLayer(JNIEnv *env, jclass, jobject assetManager, jboolean useGPU) { if (YoloV5CustomLayer::detector != nullptr) { delete YoloV5CustomLayer::detector; YoloV5CustomLayer::detector = nullptr; @@ -98,10 +98,10 @@ Java_wificar_YOLOv5_initCustomLayer(JNIEnv *env, jclass, jobject assetManager, j } extern "C" JNIEXPORT jobjectArray JNICALL -Java_wificar_YOLOv5_detectCustomLayer(JNIEnv *env, jclass, jobject image, jdouble threshold, jdouble nms_threshold) { +Java_wificar_yolo_YOLOv5_detectCustomLayer(JNIEnv *env, jclass, jobject image, jdouble threshold, jdouble nms_threshold) { auto result = YoloV5CustomLayer::detector->detect(env, image, threshold, nms_threshold); - auto box_cls = env->FindClass("wificar/Box"); + auto box_cls = env->FindClass("wificar/yolo/Box"); auto cid = env->GetMethodID(box_cls, "", "(FFFFIF)V"); jobjectArray ret = env->NewObjectArray(result.size(), box_cls, nullptr); int i = 0; @@ -146,7 +146,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_wificar_YOLOv4_detect(JNIEnv *env, jclass, jobject image, jdouble threshold, jdouble nms_threshold) { auto result = YoloV4::detector->detect(env, image, threshold, nms_threshold); - auto box_cls = env->FindClass("wificar/Box"); + auto box_cls = env->FindClass("wificar/yolo/Box"); auto cid = env->GetMethodID(box_cls, "", "(FFFFIF)V"); jobjectArray ret = env->NewObjectArray(result.size(), box_cls, nullptr); int i = 0; @@ -178,7 +178,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_wificar_NanoDet_detect(JNIEnv *env, jclass, jobject image, jdouble threshold, jdouble nms_threshold) { auto result = NanoDet::detector->detect(env, image, threshold, nms_threshold); - auto box_cls = env->FindClass("wificar/Box"); + auto box_cls = env->FindClass("wificar/yolo/Box"); auto cid = env->GetMethodID(box_cls, "", "(FFFFIF)V"); jobjectArray ret = env->NewObjectArray(result.size(), box_cls, nullptr); int i = 0; @@ -197,7 +197,7 @@ Java_wificar_NanoDet_detect(JNIEnv *env, jclass, jobject image, jdouble threshol ********************************************************************************************/ extern "C" JNIEXPORT void JNICALL -Java_wificar_SimplePose_init(JNIEnv *env, jclass clazz, jobject assetManager, jboolean useGPU) { +Java_wificar_yolo_SimplePose_init(JNIEnv *env, jclass clazz, jobject assetManager, jboolean useGPU) { if (SimplePose::detector != nullptr) { delete SimplePose::detector; SimplePose::detector = nullptr; @@ -209,10 +209,10 @@ Java_wificar_SimplePose_init(JNIEnv *env, jclass clazz, jobject assetManager, jb } extern "C" JNIEXPORT jobjectArray JNICALL -Java_wificar_SimplePose_detect(JNIEnv *env, jclass clazz, jobject image) { +Java_wificar_yolo_SimplePose_detect(JNIEnv *env, jclass clazz, jobject image) { auto result = SimplePose::detector->detect(env, image); - auto box_cls = env->FindClass("wificar/KeyPoint"); + auto box_cls = env->FindClass("wificar/yolo/KeyPoint"); auto cid = env->GetMethodID(box_cls, "", "([F[FFFFFF)V"); jobjectArray ret = env->NewObjectArray(result.size(), box_cls, nullptr); int i = 0; @@ -287,7 +287,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_wificar_Yolact_detect(JNIEnv *env, jclass clazz, jobject image) { auto result = Yolact::detector->detect_yolact(env, image); - auto yolact_mask = env->FindClass("wificar/YolactMask"); + auto yolact_mask = env->FindClass("wificar/yolo/YolactMask"); // auto cid = env->GetMethodID(yolact_mask, "", "(FFFFIF[F[I)V"); auto cid = env->GetMethodID(yolact_mask, "", "(FFFFIF[F[C)V"); jobjectArray ret = env->NewObjectArray(result.size(), yolact_mask, nullptr); @@ -583,7 +583,7 @@ Java_wificar_DBFace_detect(JNIEnv *env, jclass clazz, jobject image, jdouble thr auto result = DBFace::detector->detect(env, image, threshold, nms_threshold); // LOGD("jni dbface size:%d %f %f", result.size(), threshold, nms_threshold); - auto box_cls = env->FindClass("wificar/KeyPoint"); + auto box_cls = env->FindClass("wificar/yolo/KeyPoint"); auto cid = env->GetMethodID(box_cls, "", "([F[FFFFFF)V"); jobjectArray ret = env->NewObjectArray(result.size(), box_cls, nullptr); int i = 0; @@ -631,7 +631,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_wificar_LightOpenPose_detect(JNIEnv *env, jclass clazz, jobject image) { auto poses = LightOpenPose::detector->detect(env, image); - auto box_cls = env->FindClass("wificar/OpenPoseKeyPoint"); + auto box_cls = env->FindClass("wificar/yolo/OpenPoseKeyPoint"); auto cid = env->GetMethodID(box_cls, "", "([F[FF)V"); jobjectArray ret = env->NewObjectArray(poses.size(), box_cls, nullptr); int i = 0; diff --git a/src/app/src/main/java/wificar/Database.java b/src/app/src/main/java/wificar/Database.java new file mode 100644 index 0000000..240b61b --- /dev/null +++ b/src/app/src/main/java/wificar/Database.java @@ -0,0 +1,55 @@ +package wificar; + +import android.content.Context; +import android.database.SQLException; +import android.database.sqlite.SQLiteDatabase; + +import com.j256.ormlite.android.AndroidConnectionSource; +import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; +import com.j256.ormlite.dao.Dao; +import com.j256.ormlite.support.ConnectionSource; +import com.j256.ormlite.table.TableUtils; + +import java.util.HashMap; +import java.util.Map; + +import wificar.entity.InfraredSensorData; + +public class Database extends OrmLiteSqliteOpenHelper { + private static Database INSTANCE; + private Database(Context context) { + super(context,DB_NAME,null,1); + } + public static Database getInstance(Context context) { + if(INSTANCE == null) INSTANCE = new Database(context); + return INSTANCE; + } + private static final String DB_NAME = "isrr.db"; + private final Map daos = new HashMap<>(); + public synchronized Dao getDao(Class clazz) { + if(daos.containsKey(clazz))return daos.get(clazz); + else { + try { + Dao dao = super.getDao(clazz); + daos.put(clazz,dao); + return dao; + } catch (java.sql.SQLException e) { + e.printStackTrace(); + } + return null; + } + } + + @Override + public void onCreate(SQLiteDatabase database, ConnectionSource connectionSource) { + try { +// TableUtils.createTable(connectionSource,); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + @Override + public void onUpgrade(SQLiteDatabase database, ConnectionSource connectionSource, int oldVersion, int newVersion) { + } +} diff --git a/src/app/src/main/java/wificar/SettingsActivity.java b/src/app/src/main/java/wificar/activity/AboutActivity.java similarity index 84% rename from src/app/src/main/java/wificar/SettingsActivity.java rename to src/app/src/main/java/wificar/activity/AboutActivity.java index d84c09b..c00e6a4 100644 --- a/src/app/src/main/java/wificar/SettingsActivity.java +++ b/src/app/src/main/java/wificar/activity/AboutActivity.java @@ -1,17 +1,15 @@ -package wificar; +package wificar.activity; import androidx.appcompat.app.AppCompatActivity; -import android.content.Intent; import android.os.Bundle; -import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; import my.wificar.R; -public class SettingsActivity extends AppCompatActivity { +public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/src/app/src/main/java/wificar/BgPictureShowActivity.java b/src/app/src/main/java/wificar/activity/BackgroundActivity.java similarity index 93% rename from src/app/src/main/java/wificar/BgPictureShowActivity.java rename to src/app/src/main/java/wificar/activity/BackgroundActivity.java index 62709f8..9384264 100644 --- a/src/app/src/main/java/wificar/BgPictureShowActivity.java +++ b/src/app/src/main/java/wificar/activity/BackgroundActivity.java @@ -1,6 +1,4 @@ -package wificar; - -import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; +package wificar.activity; import android.app.Activity; import android.content.Context; @@ -13,8 +11,6 @@ import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; -import android.view.Window; -import android.view.WindowManager; import android.view.animation.AnimationUtils; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; @@ -32,7 +28,7 @@ import java.util.List; import my.wificar.R; -public class BgPictureShowActivity extends Activity implements +public class BackgroundActivity extends Activity implements AdapterView.OnItemSelectedListener, ViewSwitcher.ViewFactory { /* * @@ -75,7 +71,7 @@ public class BgPictureShowActivity extends Activity implements g.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { - Toast.makeText(BgPictureShowActivity.this, "" + (position + 1) + "ͼƬ", Toast.LENGTH_SHORT).show(); + Toast.makeText(BackgroundActivity.this, "" + (position + 1) + "ͼƬ", Toast.LENGTH_SHORT).show(); } }); } catch (Exception e) { diff --git a/src/app/src/main/java/wificar/MyVideo.java b/src/app/src/main/java/wificar/activity/ControlActivity.java similarity index 92% rename from src/app/src/main/java/wificar/MyVideo.java rename to src/app/src/main/java/wificar/activity/ControlActivity.java index a3d7348..05cdf9f 100644 --- a/src/app/src/main/java/wificar/MyVideo.java +++ b/src/app/src/main/java/wificar/activity/ControlActivity.java @@ -1,8 +1,7 @@ -package wificar; +package wificar.activity; import android.app.Activity; import android.content.Intent; -import android.os.AsyncTask; import android.os.Bundle; import android.os.StrictMode; import android.util.Log; @@ -29,8 +28,14 @@ import java.util.Timer; import java.util.TimerTask; import my.wificar.R; - -public class MyVideo extends Activity { +import wificar.Configuration; +import wificar.Database; +import wificar.components.MySurfaceView; +import wificar.components.RockerView; +import wificar.network.SocketListener; +import wificar.network.SoundSocketListener; + +public class ControlActivity extends Activity { public static String CameraIp; public static String CtrlIp; public static String CtrlPort; @@ -185,14 +190,7 @@ public class MyVideo extends Activity { xSeekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean b) { - try { - if(socketWriter == null) return; - socketWriter.write(new byte[]{(byte) 0xff, (byte) 0x01, (byte) 0x08, (byte)((int)(progress * 0.9)+45), (byte) 0xff}); - socketWriter.flush(); - - } catch (IOException e) { - throw new RuntimeException(e); - } + changeRobotAngle(progress); } @Override public void onStartTrackingTouch(SeekBar seekBar) { @@ -236,7 +234,7 @@ public class MyVideo extends Activity { try { socketWriter = socket.getOutputStream(); socketReader = socket.getInputStream(); - socketListener2001 = new SocketListener(activity,socketReader); + socketListener2001 = new SocketListener(activity, Database.getInstance(this),socketReader); socketListener2002 = new SoundSocketListener(activity,soundSocket.getInputStream()); } catch (Exception e) { // TODO Auto-generated catch block @@ -247,6 +245,16 @@ public class MyVideo extends Activity { rockerLayout.addView(rockerView); //Toast.makeText(this,"ʼʧܣ"+e.getMessage(),Toast.LENGTH_LONG).show(); } + public void changeRobotAngle(int progress) { + try { + if(socketWriter == null) return; + socketWriter.write(new byte[]{(byte) 0xff, (byte) 0x01, (byte) 0x08, (byte)((int)(progress * 0.9)+45), (byte) 0xff}); + socketWriter.flush(); + + } catch (IOException e) { + throw new RuntimeException(e); + } + } public void onDestroy() { super.onDestroy(); diff --git a/src/app/src/main/java/wificar/MyMainFrm.java b/src/app/src/main/java/wificar/activity/MainActivity.java similarity index 83% rename from src/app/src/main/java/wificar/MyMainFrm.java rename to src/app/src/main/java/wificar/activity/MainActivity.java index f3db26c..8451dac 100644 --- a/src/app/src/main/java/wificar/MyMainFrm.java +++ b/src/app/src/main/java/wificar/activity/MainActivity.java @@ -1,31 +1,21 @@ -package wificar; -/*СRƼwww.xiao-r.com - * йFPV-WIFI˴⹤ңwww.wifi-robots.comԴԴӵȨ - * Դûѧϰ֮ãϽҵIJ - * 緢ȨΪСRƼͨ;ߣ - * */ +package wificar.activity; + import android.app.Activity; import android.content.Intent; -import android.graphics.Bitmap; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.Paint; import android.os.Bundle; import android.view.KeyEvent; -import android.view.View; import android.view.Window; import android.view.WindowManager; -import android.widget.Button; -import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Toast; -import java.util.Random; - import my.wificar.R; +import wificar.Configuration; +import wificar.yolo.SimplePose; +import wificar.yolo.YOLOv5; -public class MyMainFrm extends Activity { +public class MainActivity extends Activity { // EditText CameraIP, ControlIP, Port; LinearLayout Button_go; @@ -76,7 +66,7 @@ public class MyMainFrm extends Activity { intent.putExtra("Is_Scale", true); //IntentҪActivity - intent.setClass(MyMainFrm.this, MyVideo.class); + intent.setClass(MainActivity.this, ControlActivity.class); //ͨIntentһActivity startActivity(intent); }); @@ -92,7 +82,7 @@ public class MyMainFrm extends Activity { intent.putExtra("Is_Scale", true); //IntentҪActivity - intent.setClass(MyMainFrm.this, SettingsActivity.class); + intent.setClass(MainActivity.this, AboutActivity.class); //ͨIntentһActivity startActivity(intent); }); diff --git a/src/app/src/main/java/wificar/activity/MyActivity.java b/src/app/src/main/java/wificar/activity/MyActivity.java new file mode 100644 index 0000000..0f337f6 --- /dev/null +++ b/src/app/src/main/java/wificar/activity/MyActivity.java @@ -0,0 +1,1316 @@ +package wificar.activity; + +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + + +import android.app.ActionBar; +import android.app.ActivityManager; +import android.app.Application; +import android.app.Dialog; +import android.app.DirectAction; +import android.app.Fragment; +import android.app.FragmentManager; +import android.app.LoaderManager; +import android.app.PendingIntent; +import android.app.PictureInPictureParams; +import android.app.PictureInPictureUiState; +import android.app.SharedElementCallback; +import android.app.TaskStackBuilder; +import android.app.VoiceInteractor; +import android.app.assist.AssistContent; +import android.content.ComponentCallbacks; +import android.content.ComponentCallbacks2; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.IntentSender; +import android.content.LocusId; +import android.content.SharedPreferences; +import android.content.pm.PackageManager; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.database.Cursor; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.drawable.Drawable; +import android.media.session.MediaController; +import android.net.Uri; +import android.os.Bundle; +import android.os.CancellationSignal; +import android.os.OutcomeReceiver; +import android.os.PersistableBundle; +import android.transition.Scene; +import android.transition.TransitionManager; +import android.util.AttributeSet; +import android.view.ActionMode; +import android.view.ContextMenu; +import android.view.ContextThemeWrapper; +import android.view.DragAndDropPermissions; +import android.view.DragEvent; +import android.view.KeyEvent; +import android.view.KeyboardShortcutGroup; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.MotionEvent; +import android.view.SearchEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager; +import android.view.accessibility.AccessibilityEvent; +import android.widget.Toolbar; +import android.window.OnBackInvokedDispatcher; +import android.window.SplashScreen; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import java.io.FileDescriptor; +import java.io.PrintWriter; +import java.util.List; +import java.util.concurrent.Executor; +import java.util.function.Consumer; + +public class MyActivity extends ContextThemeWrapper implements LayoutInflater.Factory2, Window.Callback, KeyEvent.Callback, View.OnCreateContextMenuListener, ComponentCallbacks2 { + public static final int DEFAULT_KEYS_DIALER = 1; + public static final int DEFAULT_KEYS_DISABLE = 0; + public static final int DEFAULT_KEYS_SEARCH_GLOBAL = 4; + public static final int DEFAULT_KEYS_SEARCH_LOCAL = 3; + public static final int DEFAULT_KEYS_SHORTCUT = 2; + protected static final int[] FOCUSED_STATE_SET = new int[0]; + public static final int FULLSCREEN_MODE_REQUEST_ENTER = 1; + public static final int FULLSCREEN_MODE_REQUEST_EXIT = 0; + public static final int OVERRIDE_TRANSITION_CLOSE = 1; + public static final int OVERRIDE_TRANSITION_OPEN = 0; + public static final int RESULT_CANCELED = 0; + public static final int RESULT_FIRST_USER = 1; + public static final int RESULT_OK = -1; + + public MyActivity() { + throw new RuntimeException("Stub!"); + } + + public Intent getIntent() { + throw new RuntimeException("Stub!"); + } + + public void setIntent(Intent newIntent) { + throw new RuntimeException("Stub!"); + } + + public void setLocusContext(@Nullable LocusId locusId, @Nullable Bundle bundle) { + throw new RuntimeException("Stub!"); + } + + public final Application getApplication() { + throw new RuntimeException("Stub!"); + } + + public final boolean isChild() { + throw new RuntimeException("Stub!"); + } + + public final android.app.Activity getParent() { + throw new RuntimeException("Stub!"); + } + + public WindowManager getWindowManager() { + throw new RuntimeException("Stub!"); + } + + public Window getWindow() { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public LoaderManager getLoaderManager() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public View getCurrentFocus() { + throw new RuntimeException("Stub!"); + } + + protected void attachBaseContext(Context newBase) { + throw new RuntimeException("Stub!"); + } + + public void registerActivityLifecycleCallbacks(@NonNull Application.ActivityLifecycleCallbacks callback) { + throw new RuntimeException("Stub!"); + } + + public void unregisterActivityLifecycleCallbacks(@NonNull Application.ActivityLifecycleCallbacks callback) { + throw new RuntimeException("Stub!"); + } + + public void registerComponentCallbacks(ComponentCallbacks callback) { + throw new RuntimeException("Stub!"); + } + + public void unregisterComponentCallbacks(ComponentCallbacks callback) { + throw new RuntimeException("Stub!"); + } + + protected void onCreate(@Nullable Bundle savedInstanceState) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public final SplashScreen getSplashScreen() { + throw new RuntimeException("Stub!"); + } + + public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) { + throw new RuntimeException("Stub!"); + } + + protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) { + throw new RuntimeException("Stub!"); + } + + public void onRestoreInstanceState(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) { + throw new RuntimeException("Stub!"); + } + + protected void onPostCreate(@Nullable Bundle savedInstanceState) { + throw new RuntimeException("Stub!"); + } + + public void onPostCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) { + throw new RuntimeException("Stub!"); + } + + protected void onStart() { + throw new RuntimeException("Stub!"); + } + + protected void onRestart() { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void onStateNotSaved() { + throw new RuntimeException("Stub!"); + } + + protected void onResume() { + throw new RuntimeException("Stub!"); + } + + protected void onPostResume() { + throw new RuntimeException("Stub!"); + } + + public void onTopResumedActivityChanged(boolean isTopResumedActivity) { + throw new RuntimeException("Stub!"); + } + + public boolean isVoiceInteraction() { + throw new RuntimeException("Stub!"); + } + + public boolean isVoiceInteractionRoot() { + throw new RuntimeException("Stub!"); + } + + public VoiceInteractor getVoiceInteractor() { + throw new RuntimeException("Stub!"); + } + + public boolean isLocalVoiceInteractionSupported() { + throw new RuntimeException("Stub!"); + } + + public void startLocalVoiceInteraction(Bundle privateOptions) { + throw new RuntimeException("Stub!"); + } + + public void onLocalVoiceInteractionStarted() { + throw new RuntimeException("Stub!"); + } + + public void onLocalVoiceInteractionStopped() { + throw new RuntimeException("Stub!"); + } + + public void stopLocalVoiceInteraction() { + throw new RuntimeException("Stub!"); + } + + protected void onNewIntent(Intent intent) { + throw new RuntimeException("Stub!"); + } + + protected void onSaveInstanceState(@NonNull Bundle outState) { + throw new RuntimeException("Stub!"); + } + + public void onSaveInstanceState(@NonNull Bundle outState, @NonNull PersistableBundle outPersistentState) { + throw new RuntimeException("Stub!"); + } + + protected void onPause() { + throw new RuntimeException("Stub!"); + } + + protected void onUserLeaveHint() { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public CharSequence onCreateDescription() { + throw new RuntimeException("Stub!"); + } + + public void onProvideAssistData(Bundle data) { + throw new RuntimeException("Stub!"); + } + + public void onProvideAssistContent(AssistContent outContent) { + throw new RuntimeException("Stub!"); + } + + public void onGetDirectActions(@NonNull CancellationSignal cancellationSignal, @NonNull Consumer> callback) { + throw new RuntimeException("Stub!"); + } + + public void onPerformDirectAction(@NonNull String actionId, @NonNull Bundle arguments, @NonNull CancellationSignal cancellationSignal, @NonNull Consumer resultListener) { + throw new RuntimeException("Stub!"); + } + + public final void requestShowKeyboardShortcuts() { + throw new RuntimeException("Stub!"); + } + + public final void dismissKeyboardShortcutsHelper() { + throw new RuntimeException("Stub!"); + } + + public void onProvideKeyboardShortcuts(List data, Menu menu, int deviceId) { + throw new RuntimeException("Stub!"); + } + + public boolean showAssist(Bundle args) { + throw new RuntimeException("Stub!"); + } + + protected void onStop() { + throw new RuntimeException("Stub!"); + } + + protected void onDestroy() { + throw new RuntimeException("Stub!"); + } + + public void reportFullyDrawn() { + throw new RuntimeException("Stub!"); + } + + public void onMultiWindowModeChanged(boolean isInMultiWindowMode, Configuration newConfig) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void onMultiWindowModeChanged(boolean isInMultiWindowMode) { + throw new RuntimeException("Stub!"); + } + + public boolean isInMultiWindowMode() { + throw new RuntimeException("Stub!"); + } + + public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) { + throw new RuntimeException("Stub!"); + } + + public void onPictureInPictureUiStateChanged(@NonNull PictureInPictureUiState pipState) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) { + throw new RuntimeException("Stub!"); + } + + public boolean isInPictureInPictureMode() { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void enterPictureInPictureMode() { + throw new RuntimeException("Stub!"); + } + + public boolean enterPictureInPictureMode(@NonNull PictureInPictureParams params) { + throw new RuntimeException("Stub!"); + } + + public void setPictureInPictureParams(@NonNull PictureInPictureParams params) { + throw new RuntimeException("Stub!"); + } + + public int getMaxNumPictureInPictureActions() { + throw new RuntimeException("Stub!"); + } + + public boolean onPictureInPictureRequested() { + throw new RuntimeException("Stub!"); + } + + public void requestFullscreenMode(int request, @Nullable OutcomeReceiver approvalCallback) { + throw new RuntimeException("Stub!"); + } + + public void setShouldDockBigOverlays(boolean shouldDockBigOverlays) { + throw new RuntimeException("Stub!"); + } + + public boolean shouldDockBigOverlays() { + throw new RuntimeException("Stub!"); + } + + public void onConfigurationChanged(@NonNull Configuration newConfig) { + throw new RuntimeException("Stub!"); + } + + public int getChangingConfigurations() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Object getLastNonConfigurationInstance() { + throw new RuntimeException("Stub!"); + } + + public Object onRetainNonConfigurationInstance() { + throw new RuntimeException("Stub!"); + } + + public void onLowMemory() { + throw new RuntimeException("Stub!"); + } + + public void onTrimMemory(int level) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public FragmentManager getFragmentManager() { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void onAttachFragment(Fragment fragment) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final Cursor managedQuery(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void startManagingCursor(Cursor c) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void stopManagingCursor(Cursor c) { + throw new RuntimeException("Stub!"); + } + + public T findViewById(int id) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public final T requireViewById(int id) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public ActionBar getActionBar() { + throw new RuntimeException("Stub!"); + } + + public void setActionBar(@Nullable Toolbar toolbar) { + throw new RuntimeException("Stub!"); + } + + public void setContentView(int layoutResID) { + throw new RuntimeException("Stub!"); + } + + public void setContentView(View view) { + throw new RuntimeException("Stub!"); + } + + public void setContentView(View view, ViewGroup.LayoutParams params) { + throw new RuntimeException("Stub!"); + } + + public void addContentView(View view, ViewGroup.LayoutParams params) { + throw new RuntimeException("Stub!"); + } + + public TransitionManager getContentTransitionManager() { + throw new RuntimeException("Stub!"); + } + + public void setContentTransitionManager(TransitionManager tm) { + throw new RuntimeException("Stub!"); + } + + public Scene getContentScene() { + throw new RuntimeException("Stub!"); + } + + public void setFinishOnTouchOutside(boolean finish) { + throw new RuntimeException("Stub!"); + } + + public final void setDefaultKeyMode(int mode) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyDown(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyLongPress(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyUp(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void onBackPressed() { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyShortcut(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onTouchEvent(MotionEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onTrackballEvent(MotionEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onGenericMotionEvent(MotionEvent event) { + throw new RuntimeException("Stub!"); + } + + public void onUserInteraction() { + throw new RuntimeException("Stub!"); + } + + public void onWindowAttributesChanged(WindowManager.LayoutParams params) { + throw new RuntimeException("Stub!"); + } + + public void onContentChanged() { + throw new RuntimeException("Stub!"); + } + + public void onWindowFocusChanged(boolean hasFocus) { + throw new RuntimeException("Stub!"); + } + + public void onAttachedToWindow() { + throw new RuntimeException("Stub!"); + } + + public void onDetachedFromWindow() { + throw new RuntimeException("Stub!"); + } + + public boolean hasWindowFocus() { + throw new RuntimeException("Stub!"); + } + + public boolean dispatchKeyEvent(KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean dispatchKeyShortcutEvent(KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean dispatchTouchEvent(MotionEvent ev) { + throw new RuntimeException("Stub!"); + } + + public boolean dispatchTrackballEvent(MotionEvent ev) { + throw new RuntimeException("Stub!"); + } + + public boolean dispatchGenericMotionEvent(MotionEvent ev) { + throw new RuntimeException("Stub!"); + } + + public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public View onCreatePanelView(int featureId) { + throw new RuntimeException("Stub!"); + } + + public boolean onCreatePanelMenu(int featureId, @NonNull Menu menu) { + throw new RuntimeException("Stub!"); + } + + public boolean onPreparePanel(int featureId, @Nullable View view, @NonNull Menu menu) { + throw new RuntimeException("Stub!"); + } + + public boolean onMenuOpened(int featureId, @NonNull Menu menu) { + throw new RuntimeException("Stub!"); + } + + public boolean onMenuItemSelected(int featureId, @NonNull MenuItem item) { + throw new RuntimeException("Stub!"); + } + + public void onPanelClosed(int featureId, @NonNull Menu menu) { + throw new RuntimeException("Stub!"); + } + + public void invalidateOptionsMenu() { + throw new RuntimeException("Stub!"); + } + + public boolean onCreateOptionsMenu(Menu menu) { + throw new RuntimeException("Stub!"); + } + + public boolean onPrepareOptionsMenu(Menu menu) { + throw new RuntimeException("Stub!"); + } + + public boolean onOptionsItemSelected(@NonNull MenuItem item) { + throw new RuntimeException("Stub!"); + } + + public boolean onNavigateUp() { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public boolean onNavigateUpFromChild(android.app.Activity child) { + throw new RuntimeException("Stub!"); + } + + public void onCreateNavigateUpTaskStack(TaskStackBuilder builder) { + throw new RuntimeException("Stub!"); + } + + public void onPrepareNavigateUpTaskStack(TaskStackBuilder builder) { + throw new RuntimeException("Stub!"); + } + + public void onOptionsMenuClosed(Menu menu) { + throw new RuntimeException("Stub!"); + } + + public void openOptionsMenu() { + throw new RuntimeException("Stub!"); + } + + public void closeOptionsMenu() { + throw new RuntimeException("Stub!"); + } + + public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { + throw new RuntimeException("Stub!"); + } + + public void registerForContextMenu(View view) { + throw new RuntimeException("Stub!"); + } + + public void unregisterForContextMenu(View view) { + throw new RuntimeException("Stub!"); + } + + public void openContextMenu(View view) { + throw new RuntimeException("Stub!"); + } + + public void closeContextMenu() { + throw new RuntimeException("Stub!"); + } + + public boolean onContextItemSelected(@NonNull MenuItem item) { + throw new RuntimeException("Stub!"); + } + + public void onContextMenuClosed(@NonNull Menu menu) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + protected Dialog onCreateDialog(int id) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + @Nullable + protected Dialog onCreateDialog(int id, Bundle args) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + protected void onPrepareDialog(int id, Dialog dialog) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + protected void onPrepareDialog(int id, Dialog dialog, Bundle args) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void showDialog(int id) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final boolean showDialog(int id, Bundle args) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void dismissDialog(int id) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void removeDialog(int id) { + throw new RuntimeException("Stub!"); + } + + public boolean onSearchRequested(@Nullable SearchEvent searchEvent) { + throw new RuntimeException("Stub!"); + } + + public boolean onSearchRequested() { + throw new RuntimeException("Stub!"); + } + + public final SearchEvent getSearchEvent() { + throw new RuntimeException("Stub!"); + } + + public void startSearch(@Nullable String initialQuery, boolean selectInitialQuery, @Nullable Bundle appSearchData, boolean globalSearch) { + throw new RuntimeException("Stub!"); + } + + public void triggerSearch(String query, @Nullable Bundle appSearchData) { + throw new RuntimeException("Stub!"); + } + + public void takeKeyEvents(boolean get) { + throw new RuntimeException("Stub!"); + } + + public final boolean requestWindowFeature(int featureId) { + throw new RuntimeException("Stub!"); + } + + public final void setFeatureDrawableResource(int featureId, int resId) { + throw new RuntimeException("Stub!"); + } + + public final void setFeatureDrawableUri(int featureId, Uri uri) { + throw new RuntimeException("Stub!"); + } + + public final void setFeatureDrawable(int featureId, Drawable drawable) { + throw new RuntimeException("Stub!"); + } + + public final void setFeatureDrawableAlpha(int featureId, int alpha) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public LayoutInflater getLayoutInflater() { + throw new RuntimeException("Stub!"); + } + + @NonNull + public MenuInflater getMenuInflater() { + throw new RuntimeException("Stub!"); + } + + public void setTheme(int resid) { + throw new RuntimeException("Stub!"); + } + + protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { + throw new RuntimeException("Stub!"); + } + + public final void requestPermissions(@NonNull String[] permissions, int requestCode) { + throw new RuntimeException("Stub!"); + } + + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + throw new RuntimeException("Stub!"); + } + + public boolean shouldShowRequestPermissionRationale(@NonNull String permission) { + throw new RuntimeException("Stub!"); + } + + public void startActivityForResult(Intent intent, int requestCode) { + throw new RuntimeException("Stub!"); + } + + public void startActivityForResult(Intent intent, int requestCode, @Nullable Bundle options) { + throw new RuntimeException("Stub!"); + } + + public boolean isActivityTransitionRunning() { + throw new RuntimeException("Stub!"); + } + + public void startIntentSenderForResult(IntentSender intent, int requestCode, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException { + throw new RuntimeException("Stub!"); + } + + public void startIntentSenderForResult(IntentSender intent, int requestCode, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, @Nullable Bundle options) throws IntentSender.SendIntentException { + throw new RuntimeException("Stub!"); + } + + public void startActivity(Intent intent) { + throw new RuntimeException("Stub!"); + } + + public void startActivity(Intent intent, @Nullable Bundle options) { + throw new RuntimeException("Stub!"); + } + + public void startActivities(Intent[] intents) { + throw new RuntimeException("Stub!"); + } + + public void startActivities(Intent[] intents, @Nullable Bundle options) { + throw new RuntimeException("Stub!"); + } + + public void startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException { + throw new RuntimeException("Stub!"); + } + + public void startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, @Nullable Bundle options) throws IntentSender.SendIntentException { + throw new RuntimeException("Stub!"); + } + + public boolean startActivityIfNeeded(@NonNull Intent intent, int requestCode) { + throw new RuntimeException("Stub!"); + } + + public boolean startActivityIfNeeded(@NonNull Intent intent, int requestCode, @Nullable Bundle options) { + throw new RuntimeException("Stub!"); + } + + public boolean startNextMatchingActivity(@NonNull Intent intent) { + throw new RuntimeException("Stub!"); + } + + public boolean startNextMatchingActivity(@NonNull Intent intent, @Nullable Bundle options) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void startActivityFromChild(@NonNull android.app.Activity child, Intent intent, int requestCode) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void startActivityFromChild(@NonNull android.app.Activity child, Intent intent, int requestCode, @Nullable Bundle options) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void startActivityFromFragment(@NonNull Fragment fragment, Intent intent, int requestCode) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void startActivityFromFragment(@NonNull Fragment fragment, Intent intent, int requestCode, @Nullable Bundle options) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void startIntentSenderFromChild(android.app.Activity child, IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void startIntentSenderFromChild(android.app.Activity child, IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, @Nullable Bundle options) throws IntentSender.SendIntentException { + throw new RuntimeException("Stub!"); + } + + public void overrideActivityTransition(int overrideType, int enterAnim, int exitAnim) { + throw new RuntimeException("Stub!"); + } + + public void overrideActivityTransition(int overrideType, int enterAnim, int exitAnim, int backgroundColor) { + throw new RuntimeException("Stub!"); + } + + public void clearOverrideActivityTransition(int overrideType) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void overridePendingTransition(int enterAnim, int exitAnim) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void overridePendingTransition(int enterAnim, int exitAnim, int backgroundColor) { + throw new RuntimeException("Stub!"); + } + + public final void setResult(int resultCode) { + throw new RuntimeException("Stub!"); + } + + public final void setResult(int resultCode, Intent data) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Uri getReferrer() { + throw new RuntimeException("Stub!"); + } + + public Uri onProvideReferrer() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public String getCallingPackage() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public ComponentName getCallingActivity() { + throw new RuntimeException("Stub!"); + } + + public int getLaunchedFromUid() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public String getLaunchedFromPackage() { + throw new RuntimeException("Stub!"); + } + + public void setVisible(boolean visible) { + throw new RuntimeException("Stub!"); + } + + public boolean isFinishing() { + throw new RuntimeException("Stub!"); + } + + public boolean isDestroyed() { + throw new RuntimeException("Stub!"); + } + + public boolean isChangingConfigurations() { + throw new RuntimeException("Stub!"); + } + + public void recreate() { + throw new RuntimeException("Stub!"); + } + + public void finish() { + throw new RuntimeException("Stub!"); + } + + public void finishAffinity() { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void finishFromChild(android.app.Activity child) { + throw new RuntimeException("Stub!"); + } + + public void finishAfterTransition() { + throw new RuntimeException("Stub!"); + } + + public void finishActivity(int requestCode) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void finishActivityFromChild(@NonNull android.app.Activity child, int requestCode) { + throw new RuntimeException("Stub!"); + } + + public void finishAndRemoveTask() { + throw new RuntimeException("Stub!"); + } + + public boolean releaseInstance() { + throw new RuntimeException("Stub!"); + } + + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + throw new RuntimeException("Stub!"); + } + + public void onActivityReenter(int resultCode, Intent data) { + throw new RuntimeException("Stub!"); + } + + public PendingIntent createPendingResult(int requestCode, @NonNull Intent data, int flags) { + throw new RuntimeException("Stub!"); + } + + public void setRequestedOrientation(int requestedOrientation) { + throw new RuntimeException("Stub!"); + } + + public int getRequestedOrientation() { + throw new RuntimeException("Stub!"); + } + + public int getTaskId() { + throw new RuntimeException("Stub!"); + } + + public boolean isTaskRoot() { + throw new RuntimeException("Stub!"); + } + + public boolean moveTaskToBack(boolean nonRoot) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public String getLocalClassName() { + throw new RuntimeException("Stub!"); + } + + public ComponentName getComponentName() { + throw new RuntimeException("Stub!"); + } + + public SharedPreferences getPreferences(int mode) { + throw new RuntimeException("Stub!"); + } + + public boolean isLaunchedFromBubble() { + throw new RuntimeException("Stub!"); + } + + public Object getSystemService(String name) { + throw new RuntimeException("Stub!"); + } + + public void setTitle(CharSequence title) { + throw new RuntimeException("Stub!"); + } + + public void setTitle(int titleId) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void setTitleColor(int textColor) { + throw new RuntimeException("Stub!"); + } + + public final CharSequence getTitle() { + throw new RuntimeException("Stub!"); + } + + public final int getTitleColor() { + throw new RuntimeException("Stub!"); + } + + protected void onTitleChanged(CharSequence title, int color) { + throw new RuntimeException("Stub!"); + } + + protected void onChildTitleChanged(android.app.Activity childActivity, CharSequence title) { + throw new RuntimeException("Stub!"); + } + + public void setTaskDescription(ActivityManager.TaskDescription taskDescription) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void setProgressBarVisibility(boolean visible) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void setProgressBarIndeterminateVisibility(boolean visible) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void setProgressBarIndeterminate(boolean indeterminate) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void setProgress(int progress) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public final void setSecondaryProgress(int secondaryProgress) { + throw new RuntimeException("Stub!"); + } + + public final void setVolumeControlStream(int streamType) { + throw new RuntimeException("Stub!"); + } + + public final int getVolumeControlStream() { + throw new RuntimeException("Stub!"); + } + + public final void setMediaController(MediaController controller) { + throw new RuntimeException("Stub!"); + } + + public final MediaController getMediaController() { + throw new RuntimeException("Stub!"); + } + + public final void runOnUiThread(Runnable action) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public View onCreateView(@NonNull String name, @NonNull Context context, @NonNull AttributeSet attrs) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public View onCreateView(@Nullable View parent, @NonNull String name, @NonNull Context context, @NonNull AttributeSet attrs) { + throw new RuntimeException("Stub!"); + } + + public void dump(@NonNull String prefix, @Nullable FileDescriptor fd, @NonNull PrintWriter writer, @Nullable String[] args) { + throw new RuntimeException("Stub!"); + } + + public boolean isImmersive() { + throw new RuntimeException("Stub!"); + } + + public boolean setTranslucent(boolean translucent) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public boolean requestVisibleBehind(boolean visible) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void onVisibleBehindCanceled() { + throw new RuntimeException("Stub!"); + } + + public void onEnterAnimationComplete() { + throw new RuntimeException("Stub!"); + } + + public void setImmersive(boolean i) { + throw new RuntimeException("Stub!"); + } + + public void setVrModeEnabled(boolean enabled, @NonNull ComponentName requestedComponent) throws PackageManager.NameNotFoundException { + throw new RuntimeException("Stub!"); + } + + @Nullable + public ActionMode startActionMode(ActionMode.Callback callback) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public ActionMode startActionMode(ActionMode.Callback callback, int type) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public ActionMode onWindowStartingActionMode(ActionMode.Callback callback) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public ActionMode onWindowStartingActionMode(ActionMode.Callback callback, int type) { + throw new RuntimeException("Stub!"); + } + + public void onActionModeStarted(ActionMode mode) { + throw new RuntimeException("Stub!"); + } + + public void onActionModeFinished(ActionMode mode) { + throw new RuntimeException("Stub!"); + } + + public boolean shouldUpRecreateTask(Intent targetIntent) { + throw new RuntimeException("Stub!"); + } + + public boolean navigateUpTo(Intent upIntent) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public boolean navigateUpToFromChild(android.app.Activity child, Intent upIntent) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Intent getParentActivityIntent() { + throw new RuntimeException("Stub!"); + } + + public void setEnterSharedElementCallback(SharedElementCallback callback) { + throw new RuntimeException("Stub!"); + } + + public void setExitSharedElementCallback(SharedElementCallback callback) { + throw new RuntimeException("Stub!"); + } + + public void postponeEnterTransition() { + throw new RuntimeException("Stub!"); + } + + public void startPostponedEnterTransition() { + throw new RuntimeException("Stub!"); + } + + public DragAndDropPermissions requestDragAndDropPermissions(DragEvent event) { + throw new RuntimeException("Stub!"); + } + + public void startLockTask() { + throw new RuntimeException("Stub!"); + } + + public void stopLockTask() { + throw new RuntimeException("Stub!"); + } + + public void showLockTaskEscapeMessage() { + throw new RuntimeException("Stub!"); + } + + public void setRecentsScreenshotEnabled(boolean enabled) { + throw new RuntimeException("Stub!"); + } + + public void setShowWhenLocked(boolean showWhenLocked) { + throw new RuntimeException("Stub!"); + } + + public void setInheritShowWhenLocked(boolean inheritShowWhenLocked) { + throw new RuntimeException("Stub!"); + } + + public void setTurnScreenOn(boolean turnScreenOn) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public OnBackInvokedDispatcher getOnBackInvokedDispatcher() { + throw new RuntimeException("Stub!"); + } + + public void registerScreenCaptureCallback(@NonNull Executor executor, @NonNull android.app.Activity.ScreenCaptureCallback callback) { + throw new RuntimeException("Stub!"); + } + + public void unregisterScreenCaptureCallback(@NonNull android.app.Activity.ScreenCaptureCallback callback) { + throw new RuntimeException("Stub!"); + } + + public interface ScreenCaptureCallback { + void onScreenCaptured(); + } +} diff --git a/src/app/src/main/java/wificar/MySurfaceView.java b/src/app/src/main/java/wificar/components/MySurfaceView.java similarity index 96% rename from src/app/src/main/java/wificar/MySurfaceView.java rename to src/app/src/main/java/wificar/components/MySurfaceView.java index 5c7acef..90648bf 100644 --- a/src/app/src/main/java/wificar/MySurfaceView.java +++ b/src/app/src/main/java/wificar/components/MySurfaceView.java @@ -1,47 +1,27 @@ -package wificar; -/*СRƼwww.xiao-r.com - * йFPV-WIFI˴⹤ңwww.wifi-robots.comԴԴӵȨ - * Դûѧϰ֮ãϽҵIJ - * 緢ȨΪСRƼͨ;ߣ - * */ +package wificar.components; import android.Manifest; import android.content.Context; import android.content.Intent; -import android.content.pm.PackageManager; -import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; -import android.graphics.ImageFormat; -import android.graphics.Matrix; import android.graphics.Paint; -import android.graphics.Rect; -import android.graphics.YuvImage; import android.graphics.drawable.BitmapDrawable; import android.net.Uri; -import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Message; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.Log; -import android.util.Size; import android.view.SurfaceHolder; import android.view.SurfaceHolder.Callback; import android.view.SurfaceView; -import android.widget.ImageView; import android.widget.Toast; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.core.app.ActivityCompat; -import androidx.lifecycle.LifecycleOwner; - import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -50,13 +30,19 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; -import java.nio.ByteBuffer; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; import my.wificar.R; +import wificar.Configuration; +import wificar.activity.ControlActivity; +import wificar.yolo.Box; +import wificar.yolo.Constant; +import wificar.yolo.KeyPoint; +import wificar.yolo.SimplePose; +import wificar.yolo.YOLOv5; import wseemann.media.FFmpegMediaMetadataRetriever; public class MySurfaceView extends SurfaceView implements Callback { @@ -74,12 +60,12 @@ public class MySurfaceView extends SurfaceView implements Callback { private Bitmap mBitmap; private boolean isThreadRunning = true; - private MyVideo activity; + private ControlActivity activity; private MySurfaceView floatingView; public MySurfaceView(Context context, AttributeSet attrs) { super(context, attrs); - activity = (MyVideo) context; + activity = (ControlActivity) context; Constant.context = context; initialize(); p = new Paint(); diff --git a/src/app/src/main/java/wificar/components/MyTextView.java b/src/app/src/main/java/wificar/components/MyTextView.java new file mode 100644 index 0000000..3bb6f52 --- /dev/null +++ b/src/app/src/main/java/wificar/components/MyTextView.java @@ -0,0 +1,1438 @@ +package wificar.components; + +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// +import android.content.Context; +import android.content.res.ColorStateList; +import android.content.res.Configuration; +import android.graphics.BlendMode; +import android.graphics.Canvas; +import android.graphics.PorterDuff; +import android.graphics.Rect; +import android.graphics.Typeface; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.os.LocaleList; +import android.os.Parcel; +import android.os.Parcelable; +import android.text.Editable; +import android.text.Highlights; +import android.text.InputFilter; +import android.text.Layout; +import android.text.PrecomputedText; +import android.text.Spannable; +import android.text.TextDirectionHeuristic; +import android.text.TextPaint; +import android.text.TextUtils; +import android.text.TextWatcher; +import android.text.method.KeyListener; +import android.text.method.MovementMethod; +import android.text.method.TransformationMethod; +import android.text.style.URLSpan; +import android.util.AttributeSet; +import android.view.ActionMode; +import android.view.ContentInfo; +import android.view.ContextMenu; +import android.view.DragEvent; +import android.view.KeyEvent; +import android.view.MotionEvent; +import android.view.PointerIcon; +import android.view.View; +import android.view.ViewTreeObserver; +import android.view.ViewDebug.CapturedViewProperty; +import android.view.ViewDebug.ExportedProperty; +import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityNodeInfo; +import android.view.autofill.AutofillValue; +import android.view.inputmethod.CompletionInfo; +import android.view.inputmethod.CorrectionInfo; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.ExtractedText; +import android.view.inputmethod.ExtractedTextRequest; +import android.view.inputmethod.InputConnection; +import android.view.textclassifier.TextClassifier; +import android.view.translation.ViewTranslationRequest; +import android.widget.RemoteViews.RemoteView; +import android.widget.Scroller; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Locale; +import java.util.function.Consumer; +import org.xmlpull.v1.XmlPullParserException; + +@RemoteView +public class MyTextView extends View implements ViewTreeObserver.OnPreDrawListener { + public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0; + public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1; + public static final int FOCUSED_SEARCH_RESULT_INDEX_NONE = -1; + + public MyTextView(Context context) { + super((Context)null); + throw new RuntimeException("Stub!"); + } + + public MyTextView(Context context, @Nullable AttributeSet attrs) { + super((Context)null); + throw new RuntimeException("Stub!"); + } + + public MyTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super((Context)null); + throw new RuntimeException("Stub!"); + } + + public MyTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super((Context)null); + throw new RuntimeException("Stub!"); + } + + public void setAutoSizeTextTypeWithDefaults(int autoSizeTextType) { + throw new RuntimeException("Stub!"); + } + + public void setAutoSizeTextTypeUniformWithConfiguration(int autoSizeMinTextSize, int autoSizeMaxTextSize, int autoSizeStepGranularity, int unit) { + throw new RuntimeException("Stub!"); + } + + public void setAutoSizeTextTypeUniformWithPresetSizes(@NonNull int[] presetSizes, int unit) { + throw new RuntimeException("Stub!"); + } + + public int getAutoSizeTextType() { + throw new RuntimeException("Stub!"); + } + + public int getAutoSizeStepGranularity() { + throw new RuntimeException("Stub!"); + } + + public int getAutoSizeMinTextSize() { + throw new RuntimeException("Stub!"); + } + + public int getAutoSizeMaxTextSize() { + throw new RuntimeException("Stub!"); + } + + public int[] getAutoSizeTextAvailableSizes() { + throw new RuntimeException("Stub!"); + } + + public void setEnabled(boolean enabled) { + throw new RuntimeException("Stub!"); + } + + public void setTypeface(@Nullable Typeface tf, int style) { + throw new RuntimeException("Stub!"); + } + + protected boolean getDefaultEditable() { + throw new RuntimeException("Stub!"); + } + + protected MovementMethod getDefaultMovementMethod() { + throw new RuntimeException("Stub!"); + } + + @CapturedViewProperty + public CharSequence getText() { + throw new RuntimeException("Stub!"); + } + + public int length() { + throw new RuntimeException("Stub!"); + } + + public Editable getEditableText() { + throw new RuntimeException("Stub!"); + } + + public int getLineHeight() { + throw new RuntimeException("Stub!"); + } + + public final Layout getLayout() { + throw new RuntimeException("Stub!"); + } + + public final KeyListener getKeyListener() { + throw new RuntimeException("Stub!"); + } + + public void setKeyListener(KeyListener input) { + throw new RuntimeException("Stub!"); + } + + public final MovementMethod getMovementMethod() { + throw new RuntimeException("Stub!"); + } + + public final void setMovementMethod(MovementMethod movement) { + throw new RuntimeException("Stub!"); + } + + public final TransformationMethod getTransformationMethod() { + throw new RuntimeException("Stub!"); + } + + public final void setTransformationMethod(TransformationMethod method) { + throw new RuntimeException("Stub!"); + } + + public int getCompoundPaddingTop() { + throw new RuntimeException("Stub!"); + } + + public int getCompoundPaddingBottom() { + throw new RuntimeException("Stub!"); + } + + public int getCompoundPaddingLeft() { + throw new RuntimeException("Stub!"); + } + + public int getCompoundPaddingRight() { + throw new RuntimeException("Stub!"); + } + + public int getCompoundPaddingStart() { + throw new RuntimeException("Stub!"); + } + + public int getCompoundPaddingEnd() { + throw new RuntimeException("Stub!"); + } + + public int getExtendedPaddingTop() { + throw new RuntimeException("Stub!"); + } + + public int getExtendedPaddingBottom() { + throw new RuntimeException("Stub!"); + } + + public int getTotalPaddingLeft() { + throw new RuntimeException("Stub!"); + } + + public int getTotalPaddingRight() { + throw new RuntimeException("Stub!"); + } + + public int getTotalPaddingStart() { + throw new RuntimeException("Stub!"); + } + + public int getTotalPaddingEnd() { + throw new RuntimeException("Stub!"); + } + + public int getTotalPaddingTop() { + throw new RuntimeException("Stub!"); + } + + public int getTotalPaddingBottom() { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawables(@Nullable Drawable left, @Nullable Drawable top, @Nullable Drawable right, @Nullable Drawable bottom) { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom) { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawablesWithIntrinsicBounds(@Nullable Drawable left, @Nullable Drawable top, @Nullable Drawable right, @Nullable Drawable bottom) { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawablesRelative(@Nullable Drawable start, @Nullable Drawable top, @Nullable Drawable end, @Nullable Drawable bottom) { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawablesRelativeWithIntrinsicBounds(int start, int top, int end, int bottom) { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawablesRelativeWithIntrinsicBounds(@Nullable Drawable start, @Nullable Drawable top, @Nullable Drawable end, @Nullable Drawable bottom) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public Drawable[] getCompoundDrawables() { + throw new RuntimeException("Stub!"); + } + + @NonNull + public Drawable[] getCompoundDrawablesRelative() { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawablePadding(int pad) { + throw new RuntimeException("Stub!"); + } + + public int getCompoundDrawablePadding() { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawableTintList(@Nullable ColorStateList tint) { + throw new RuntimeException("Stub!"); + } + + public ColorStateList getCompoundDrawableTintList() { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawableTintMode(@Nullable PorterDuff.Mode tintMode) { + throw new RuntimeException("Stub!"); + } + + public void setCompoundDrawableTintBlendMode(@Nullable BlendMode blendMode) { + throw new RuntimeException("Stub!"); + } + + public PorterDuff.Mode getCompoundDrawableTintMode() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public BlendMode getCompoundDrawableTintBlendMode() { + throw new RuntimeException("Stub!"); + } + + public void setPadding(int left, int top, int right, int bottom) { + throw new RuntimeException("Stub!"); + } + + public void setPaddingRelative(int start, int top, int end, int bottom) { + throw new RuntimeException("Stub!"); + } + + public void setFirstBaselineToTopHeight(int firstBaselineToTopHeight) { + throw new RuntimeException("Stub!"); + } + + public void setLastBaselineToBottomHeight(int lastBaselineToBottomHeight) { + throw new RuntimeException("Stub!"); + } + + public int getFirstBaselineToTopHeight() { + throw new RuntimeException("Stub!"); + } + + public int getLastBaselineToBottomHeight() { + throw new RuntimeException("Stub!"); + } + + public final int getAutoLinkMask() { + throw new RuntimeException("Stub!"); + } + + public void setTextSelectHandle(@NonNull Drawable textSelectHandle) { + throw new RuntimeException("Stub!"); + } + + public void setTextSelectHandle(int textSelectHandle) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Drawable getTextSelectHandle() { + throw new RuntimeException("Stub!"); + } + + public void setTextSelectHandleLeft(@NonNull Drawable textSelectHandleLeft) { + throw new RuntimeException("Stub!"); + } + + public void setTextSelectHandleLeft(int textSelectHandleLeft) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Drawable getTextSelectHandleLeft() { + throw new RuntimeException("Stub!"); + } + + public void setTextSelectHandleRight(@NonNull Drawable textSelectHandleRight) { + throw new RuntimeException("Stub!"); + } + + public void setTextSelectHandleRight(int textSelectHandleRight) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Drawable getTextSelectHandleRight() { + throw new RuntimeException("Stub!"); + } + + public void setTextCursorDrawable(@Nullable Drawable textCursorDrawable) { + throw new RuntimeException("Stub!"); + } + + public void setTextCursorDrawable(int textCursorDrawable) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Drawable getTextCursorDrawable() { + throw new RuntimeException("Stub!"); + } + + public void setTextAppearance(int resId) { + throw new RuntimeException("Stub!"); + } + + /** @deprecated */ + @Deprecated + public void setTextAppearance(Context context, int resId) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public Locale getTextLocale() { + throw new RuntimeException("Stub!"); + } + + @NonNull + public LocaleList getTextLocales() { + throw new RuntimeException("Stub!"); + } + + public void setTextLocale(@NonNull Locale locale) { + throw new RuntimeException("Stub!"); + } + + public void setTextLocales(@NonNull LocaleList locales) { + throw new RuntimeException("Stub!"); + } + + protected void onConfigurationChanged(Configuration newConfig) { + throw new RuntimeException("Stub!"); + } + + @ExportedProperty( + category = "text" + ) + public float getTextSize() { + throw new RuntimeException("Stub!"); + } + + public void setTextSize(float size) { + throw new RuntimeException("Stub!"); + } + + public void setTextSize(int unit, float size) { + throw new RuntimeException("Stub!"); + } + + public int getTextSizeUnit() { + throw new RuntimeException("Stub!"); + } + + public float getTextScaleX() { + throw new RuntimeException("Stub!"); + } + + public void setTextScaleX(float size) { + throw new RuntimeException("Stub!"); + } + + public void setTypeface(@Nullable Typeface tf) { + throw new RuntimeException("Stub!"); + } + + public Typeface getTypeface() { + throw new RuntimeException("Stub!"); + } + + public void setElegantTextHeight(boolean elegant) { + throw new RuntimeException("Stub!"); + } + + public void setFallbackLineSpacing(boolean enabled) { + throw new RuntimeException("Stub!"); + } + + public boolean isFallbackLineSpacing() { + throw new RuntimeException("Stub!"); + } + + public boolean isElegantTextHeight() { + throw new RuntimeException("Stub!"); + } + + public float getLetterSpacing() { + throw new RuntimeException("Stub!"); + } + + public void setLetterSpacing(float letterSpacing) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public String getFontFeatureSettings() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public String getFontVariationSettings() { + throw new RuntimeException("Stub!"); + } + + public void setBreakStrategy(int breakStrategy) { + throw new RuntimeException("Stub!"); + } + + public int getBreakStrategy() { + throw new RuntimeException("Stub!"); + } + + public void setHyphenationFrequency(int hyphenationFrequency) { + throw new RuntimeException("Stub!"); + } + + public int getHyphenationFrequency() { + throw new RuntimeException("Stub!"); + } + + public void setLineBreakStyle(int lineBreakStyle) { + throw new RuntimeException("Stub!"); + } + + public void setLineBreakWordStyle(int lineBreakWordStyle) { + throw new RuntimeException("Stub!"); + } + + public int getLineBreakStyle() { + throw new RuntimeException("Stub!"); + } + + public int getLineBreakWordStyle() { + throw new RuntimeException("Stub!"); + } + + @NonNull + public PrecomputedText.Params getTextMetricsParams() { + throw new RuntimeException("Stub!"); + } + + public void setTextMetricsParams(@NonNull PrecomputedText.Params params) { + throw new RuntimeException("Stub!"); + } + + public void setJustificationMode(int justificationMode) { + throw new RuntimeException("Stub!"); + } + + public int getJustificationMode() { + throw new RuntimeException("Stub!"); + } + + public void setFontFeatureSettings(@Nullable String fontFeatureSettings) { + throw new RuntimeException("Stub!"); + } + + public boolean setFontVariationSettings(@Nullable String fontVariationSettings) { + throw new RuntimeException("Stub!"); + } + + public void setTextColor(int color) { + throw new RuntimeException("Stub!"); + } + + public void setTextColor(ColorStateList colors) { + throw new RuntimeException("Stub!"); + } + + public final ColorStateList getTextColors() { + throw new RuntimeException("Stub!"); + } + + public final int getCurrentTextColor() { + throw new RuntimeException("Stub!"); + } + + public void setHighlightColor(int color) { + throw new RuntimeException("Stub!"); + } + + public int getHighlightColor() { + throw new RuntimeException("Stub!"); + } + + public final void setShowSoftInputOnFocus(boolean show) { + throw new RuntimeException("Stub!"); + } + + public final boolean getShowSoftInputOnFocus() { + throw new RuntimeException("Stub!"); + } + + public void setShadowLayer(float radius, float dx, float dy, int color) { + throw new RuntimeException("Stub!"); + } + + public float getShadowRadius() { + throw new RuntimeException("Stub!"); + } + + public float getShadowDx() { + throw new RuntimeException("Stub!"); + } + + public float getShadowDy() { + throw new RuntimeException("Stub!"); + } + + public int getShadowColor() { + throw new RuntimeException("Stub!"); + } + + public TextPaint getPaint() { + throw new RuntimeException("Stub!"); + } + + public final void setAutoLinkMask(int mask) { + throw new RuntimeException("Stub!"); + } + + public final void setLinksClickable(boolean whether) { + throw new RuntimeException("Stub!"); + } + + public final boolean getLinksClickable() { + throw new RuntimeException("Stub!"); + } + + public URLSpan[] getUrls() { + throw new RuntimeException("Stub!"); + } + + public final void setHintTextColor(int color) { + throw new RuntimeException("Stub!"); + } + + public final void setHintTextColor(ColorStateList colors) { + throw new RuntimeException("Stub!"); + } + + public final ColorStateList getHintTextColors() { + throw new RuntimeException("Stub!"); + } + + public final int getCurrentHintTextColor() { + throw new RuntimeException("Stub!"); + } + + public final void setLinkTextColor(int color) { + throw new RuntimeException("Stub!"); + } + + public final void setLinkTextColor(ColorStateList colors) { + throw new RuntimeException("Stub!"); + } + + public final ColorStateList getLinkTextColors() { + throw new RuntimeException("Stub!"); + } + + public void setGravity(int gravity) { + throw new RuntimeException("Stub!"); + } + + public int getGravity() { + throw new RuntimeException("Stub!"); + } + + public int getPaintFlags() { + throw new RuntimeException("Stub!"); + } + + public void setPaintFlags(int flags) { + throw new RuntimeException("Stub!"); + } + + public void setHorizontallyScrolling(boolean whether) { + throw new RuntimeException("Stub!"); + } + + public final boolean isHorizontallyScrollable() { + throw new RuntimeException("Stub!"); + } + + public void setMinLines(int minLines) { + throw new RuntimeException("Stub!"); + } + + public int getMinLines() { + throw new RuntimeException("Stub!"); + } + + public void setMinHeight(int minPixels) { + throw new RuntimeException("Stub!"); + } + + public int getMinHeight() { + throw new RuntimeException("Stub!"); + } + + public void setMaxLines(int maxLines) { + throw new RuntimeException("Stub!"); + } + + public int getMaxLines() { + throw new RuntimeException("Stub!"); + } + + public void setMaxHeight(int maxPixels) { + throw new RuntimeException("Stub!"); + } + + public int getMaxHeight() { + throw new RuntimeException("Stub!"); + } + + public void setLines(int lines) { + throw new RuntimeException("Stub!"); + } + + public void setHeight(int pixels) { + throw new RuntimeException("Stub!"); + } + + public void setMinEms(int minEms) { + throw new RuntimeException("Stub!"); + } + + public int getMinEms() { + throw new RuntimeException("Stub!"); + } + + public void setMinWidth(int minPixels) { + throw new RuntimeException("Stub!"); + } + + public int getMinWidth() { + throw new RuntimeException("Stub!"); + } + + public void setMaxEms(int maxEms) { + throw new RuntimeException("Stub!"); + } + + public int getMaxEms() { + throw new RuntimeException("Stub!"); + } + + public void setMaxWidth(int maxPixels) { + throw new RuntimeException("Stub!"); + } + + public int getMaxWidth() { + throw new RuntimeException("Stub!"); + } + + public void setEms(int ems) { + throw new RuntimeException("Stub!"); + } + + public void setWidth(int pixels) { + throw new RuntimeException("Stub!"); + } + + public void setLineSpacing(float add, float mult) { + throw new RuntimeException("Stub!"); + } + + public float getLineSpacingMultiplier() { + throw new RuntimeException("Stub!"); + } + + public float getLineSpacingExtra() { + throw new RuntimeException("Stub!"); + } + + public void setLineHeight(int lineHeight) { + throw new RuntimeException("Stub!"); + } + + public void setLineHeight(int unit, float lineHeight) { + throw new RuntimeException("Stub!"); + } + + public void setHighlights(@Nullable Highlights highlights) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public Highlights getHighlights() { + throw new RuntimeException("Stub!"); + } + + public void setSearchResultHighlights(@Nullable int... ranges) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public int[] getSearchResultHighlights() { + throw new RuntimeException("Stub!"); + } + + public void setFocusedSearchResultIndex(int index) { + throw new RuntimeException("Stub!"); + } + + public int getFocusedSearchResultIndex() { + throw new RuntimeException("Stub!"); + } + + public void setSearchResultHighlightColor(int color) { + throw new RuntimeException("Stub!"); + } + + public int getSearchResultHighlightColor() { + throw new RuntimeException("Stub!"); + } + + public void setFocusedSearchResultHighlightColor(int color) { + throw new RuntimeException("Stub!"); + } + + public int getFocusedSearchResultHighlightColor() { + throw new RuntimeException("Stub!"); + } + + public final void append(CharSequence text) { + throw new RuntimeException("Stub!"); + } + + public void append(CharSequence text, int start, int end) { + throw new RuntimeException("Stub!"); + } + + public void setFreezesText(boolean freezesText) { + throw new RuntimeException("Stub!"); + } + + public boolean getFreezesText() { + throw new RuntimeException("Stub!"); + } + + public final void setEditableFactory(Editable.Factory factory) { + throw new RuntimeException("Stub!"); + } + + public final void setSpannableFactory(Spannable.Factory factory) { + throw new RuntimeException("Stub!"); + } + + public final void setText(CharSequence text) { + throw new RuntimeException("Stub!"); + } + + public final void setTextKeepState(CharSequence text) { + throw new RuntimeException("Stub!"); + } + + public void setText(CharSequence text, android.widget.TextView.BufferType type) { + throw new RuntimeException("Stub!"); + } + + public final void setText(@NonNull char[] text, int start, int len) { + throw new RuntimeException("Stub!"); + } + + public final void setTextKeepState(CharSequence text, android.widget.TextView.BufferType type) { + throw new RuntimeException("Stub!"); + } + + public final void setText(int resid) { + throw new RuntimeException("Stub!"); + } + + public final void setText(int resid, android.widget.TextView.BufferType type) { + throw new RuntimeException("Stub!"); + } + + public final void setHint(CharSequence hint) { + throw new RuntimeException("Stub!"); + } + + public final void setHint(int resid) { + throw new RuntimeException("Stub!"); + } + + @CapturedViewProperty + public CharSequence getHint() { + throw new RuntimeException("Stub!"); + } + + public boolean isSingleLine() { + throw new RuntimeException("Stub!"); + } + + public void setInputType(int type) { + throw new RuntimeException("Stub!"); + } + + public void setRawInputType(int type) { + throw new RuntimeException("Stub!"); + } + + public String[] getAutofillHints() { + throw new RuntimeException("Stub!"); + } + + public int getInputType() { + throw new RuntimeException("Stub!"); + } + + public void setImeOptions(int imeOptions) { + throw new RuntimeException("Stub!"); + } + + public int getImeOptions() { + throw new RuntimeException("Stub!"); + } + + public void setImeActionLabel(CharSequence label, int actionId) { + throw new RuntimeException("Stub!"); + } + + public CharSequence getImeActionLabel() { + throw new RuntimeException("Stub!"); + } + + public int getImeActionId() { + throw new RuntimeException("Stub!"); + } + + public void setOnEditorActionListener(android.widget.TextView.OnEditorActionListener l) { + throw new RuntimeException("Stub!"); + } + + public void onEditorAction(int actionCode) { + throw new RuntimeException("Stub!"); + } + + public void setPrivateImeOptions(String type) { + throw new RuntimeException("Stub!"); + } + + public String getPrivateImeOptions() { + throw new RuntimeException("Stub!"); + } + + public void setInputExtras(int xmlResId) throws IOException, XmlPullParserException { + throw new RuntimeException("Stub!"); + } + + public Bundle getInputExtras(boolean create) { + throw new RuntimeException("Stub!"); + } + + public void setImeHintLocales(@Nullable LocaleList hintLocales) { + throw new RuntimeException("Stub!"); + } + + @Nullable + public LocaleList getImeHintLocales() { + throw new RuntimeException("Stub!"); + } + + public CharSequence getError() { + throw new RuntimeException("Stub!"); + } + + public void setError(CharSequence error) { + throw new RuntimeException("Stub!"); + } + + public void setError(CharSequence error, Drawable icon) { + throw new RuntimeException("Stub!"); + } + + protected boolean setFrame(int l, int t, int r, int b) { + throw new RuntimeException("Stub!"); + } + + public void setFilters(InputFilter[] filters) { + throw new RuntimeException("Stub!"); + } + + public InputFilter[] getFilters() { + throw new RuntimeException("Stub!"); + } + + public boolean onPreDraw() { + throw new RuntimeException("Stub!"); + } + + + public void onScreenStateChanged(int screenState) { + throw new RuntimeException("Stub!"); + } + + protected boolean isPaddingOffsetRequired() { + throw new RuntimeException("Stub!"); + } + + protected int getLeftPaddingOffset() { + throw new RuntimeException("Stub!"); + } + + protected int getTopPaddingOffset() { + throw new RuntimeException("Stub!"); + } + + protected int getBottomPaddingOffset() { + throw new RuntimeException("Stub!"); + } + + protected int getRightPaddingOffset() { + throw new RuntimeException("Stub!"); + } + + + public void invalidateDrawable(@NonNull Drawable drawable) { + throw new RuntimeException("Stub!"); + } + + public boolean hasOverlappingRendering() { + throw new RuntimeException("Stub!"); + } + + public boolean isTextSelectable() { + throw new RuntimeException("Stub!"); + } + + public void setTextIsSelectable(boolean selectable) { + throw new RuntimeException("Stub!"); + } + + protected int[] onCreateDrawableState(int extraSpace) { + throw new RuntimeException("Stub!"); + } + + protected void onDraw(Canvas canvas) { + throw new RuntimeException("Stub!"); + } + + public void getFocusedRect(Rect r) { + throw new RuntimeException("Stub!"); + } + + public int getLineCount() { + throw new RuntimeException("Stub!"); + } + + public int getLineBounds(int line, Rect bounds) { + throw new RuntimeException("Stub!"); + } + + public int getBaseline() { + throw new RuntimeException("Stub!"); + } + + public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyPreIme(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyDown(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyUp(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onCheckIsTextEditor() { + throw new RuntimeException("Stub!"); + } + + public InputConnection onCreateInputConnection(EditorInfo outAttrs) { + throw new RuntimeException("Stub!"); + } + + public boolean extractText(ExtractedTextRequest request, ExtractedText outText) { + throw new RuntimeException("Stub!"); + } + + public void setExtractedText(ExtractedText text) { + throw new RuntimeException("Stub!"); + } + + public void onCommitCompletion(CompletionInfo text) { + throw new RuntimeException("Stub!"); + } + + public void onCommitCorrection(CorrectionInfo info) { + throw new RuntimeException("Stub!"); + } + + public void beginBatchEdit() { + throw new RuntimeException("Stub!"); + } + + public void endBatchEdit() { + throw new RuntimeException("Stub!"); + } + + public void onBeginBatchEdit() { + throw new RuntimeException("Stub!"); + } + + public void onEndBatchEdit() { + throw new RuntimeException("Stub!"); + } + + public boolean onPrivateIMECommand(String action, Bundle data) { + throw new RuntimeException("Stub!"); + } + + public void setIncludeFontPadding(boolean includepad) { + throw new RuntimeException("Stub!"); + } + + public boolean getIncludeFontPadding() { + throw new RuntimeException("Stub!"); + } + + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + throw new RuntimeException("Stub!"); + } + + protected void onLayout(boolean changed, int left, int top, int right, int bottom) { + throw new RuntimeException("Stub!"); + } + + public boolean bringPointIntoView(int offset) { + throw new RuntimeException("Stub!"); + } + + public boolean bringPointIntoView(int offset, boolean requestRectWithoutFocus) { + throw new RuntimeException("Stub!"); + } + + public boolean moveCursorToVisibleOffset() { + throw new RuntimeException("Stub!"); + } + + public void computeScroll() { + throw new RuntimeException("Stub!"); + } + + public void debug(int depth) { + throw new RuntimeException("Stub!"); + } + + @ExportedProperty( + category = "text" + ) + public int getSelectionStart() { + throw new RuntimeException("Stub!"); + } + + @ExportedProperty( + category = "text" + ) + public int getSelectionEnd() { + throw new RuntimeException("Stub!"); + } + + public boolean hasSelection() { + throw new RuntimeException("Stub!"); + } + + public void setSingleLine() { + throw new RuntimeException("Stub!"); + } + + public void setAllCaps(boolean allCaps) { + throw new RuntimeException("Stub!"); + } + + public boolean isAllCaps() { + throw new RuntimeException("Stub!"); + } + + public void setSingleLine(boolean singleLine) { + throw new RuntimeException("Stub!"); + } + + public void setEllipsize(TextUtils.TruncateAt where) { + throw new RuntimeException("Stub!"); + } + + public void setMarqueeRepeatLimit(int marqueeLimit) { + throw new RuntimeException("Stub!"); + } + + public int getMarqueeRepeatLimit() { + throw new RuntimeException("Stub!"); + } + + @ExportedProperty + public TextUtils.TruncateAt getEllipsize() { + throw new RuntimeException("Stub!"); + } + + public void setSelectAllOnFocus(boolean selectAllOnFocus) { + throw new RuntimeException("Stub!"); + } + + public void setCursorVisible(boolean visible) { + throw new RuntimeException("Stub!"); + } + + public boolean isCursorVisible() { + throw new RuntimeException("Stub!"); + } + + protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) { + throw new RuntimeException("Stub!"); + } + + protected void onSelectionChanged(int selStart, int selEnd) { + throw new RuntimeException("Stub!"); + } + + public void addTextChangedListener(TextWatcher watcher) { + throw new RuntimeException("Stub!"); + } + + public void removeTextChangedListener(TextWatcher watcher) { + throw new RuntimeException("Stub!"); + } + + + public void onWindowFocusChanged(boolean hasWindowFocus) { + throw new RuntimeException("Stub!"); + } + + protected void onVisibilityChanged(View changedView, int visibility) { + throw new RuntimeException("Stub!"); + } + + + public void clearComposingText() { + throw new RuntimeException("Stub!"); + } + + public void setSelected(boolean selected) { + throw new RuntimeException("Stub!"); + } + + public boolean onTouchEvent(MotionEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean onGenericMotionEvent(MotionEvent event) { + throw new RuntimeException("Stub!"); + } + + protected void onCreateContextMenu(ContextMenu menu) { + throw new RuntimeException("Stub!"); + } + + public boolean showContextMenu() { + throw new RuntimeException("Stub!"); + } + + public boolean showContextMenu(float x, float y) { + throw new RuntimeException("Stub!"); + } + + public boolean didTouchFocusSelect() { + throw new RuntimeException("Stub!"); + } + + public void cancelLongPress() { + throw new RuntimeException("Stub!"); + } + + public boolean onTrackballEvent(MotionEvent event) { + throw new RuntimeException("Stub!"); + } + + public void setScroller(Scroller s) { + throw new RuntimeException("Stub!"); + } + + protected float getLeftFadingEdgeStrength() { + throw new RuntimeException("Stub!"); + } + + protected float getRightFadingEdgeStrength() { + throw new RuntimeException("Stub!"); + } + + protected int computeHorizontalScrollRange() { + throw new RuntimeException("Stub!"); + } + + protected int computeVerticalScrollRange() { + throw new RuntimeException("Stub!"); + } + + protected int computeVerticalScrollExtent() { + throw new RuntimeException("Stub!"); + } + + public void findViewsWithText(ArrayList outViews, CharSequence searched, int flags) { + throw new RuntimeException("Stub!"); + } + + public boolean onKeyShortcut(int keyCode, KeyEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean isAutoHandwritingEnabled() { + throw new RuntimeException("Stub!"); + } + + public CharSequence getAccessibilityClassName() { + throw new RuntimeException("Stub!"); + } + + public void autofill(AutofillValue value) { + throw new RuntimeException("Stub!"); + } + + public int getAutofillType() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public AutofillValue getAutofillValue() { + throw new RuntimeException("Stub!"); + } + + public void addExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo info, String extraDataKey, Bundle arguments) { + throw new RuntimeException("Stub!"); + } + + public void sendAccessibilityEventUnchecked(AccessibilityEvent event) { + throw new RuntimeException("Stub!"); + } + + public boolean isInputMethodTarget() { + throw new RuntimeException("Stub!"); + } + + public boolean onTextContextMenuItem(int id) { + throw new RuntimeException("Stub!"); + } + + public boolean performLongClick() { + throw new RuntimeException("Stub!"); + } + + protected void onScrollChanged(int horiz, int vert, int oldHoriz, int oldVert) { + throw new RuntimeException("Stub!"); + } + + public boolean isSuggestionsEnabled() { + throw new RuntimeException("Stub!"); + } + + public void setCustomSelectionActionModeCallback(ActionMode.Callback actionModeCallback) { + throw new RuntimeException("Stub!"); + } + + public ActionMode.Callback getCustomSelectionActionModeCallback() { + throw new RuntimeException("Stub!"); + } + + public void setCustomInsertionActionModeCallback(ActionMode.Callback actionModeCallback) { + throw new RuntimeException("Stub!"); + } + + public ActionMode.Callback getCustomInsertionActionModeCallback() { + throw new RuntimeException("Stub!"); + } + + public void setTextClassifier(@Nullable TextClassifier textClassifier) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public TextClassifier getTextClassifier() { + throw new RuntimeException("Stub!"); + } + + public int getOffsetForPosition(float x, float y) { + throw new RuntimeException("Stub!"); + } + + public boolean onDragEvent(DragEvent event) { + throw new RuntimeException("Stub!"); + } + + public void onRtlPropertiesChanged(int layoutDirection) { + throw new RuntimeException("Stub!"); + } + + @NonNull + public TextDirectionHeuristic getTextDirectionHeuristic() { + throw new RuntimeException("Stub!"); + } + + @Nullable + public ContentInfo onReceiveContent(@NonNull ContentInfo payload) { + throw new RuntimeException("Stub!"); + } + + public void onCreateViewTranslationRequest(@NonNull int[] supportedFormats, @NonNull Consumer requestsCollector) { + throw new RuntimeException("Stub!"); + } + + public static class SavedState extends View.BaseSavedState { + @NonNull + public static final Parcelable.Creator CREATOR = null; + + SavedState() { + super((Parcel)null); + throw new RuntimeException("Stub!"); + } + + public void writeToParcel(Parcel out, int flags) { + throw new RuntimeException("Stub!"); + } + + public String toString() { + throw new RuntimeException("Stub!"); + } + } + + public interface OnEditorActionListener { + boolean onEditorAction(android.widget.TextView var1, int var2, KeyEvent var3); + } + + public static enum BufferType { + NORMAL, + SPANNABLE, + EDITABLE; + + private BufferType() { + } + } +} diff --git a/src/app/src/main/java/wificar/RockerView.java b/src/app/src/main/java/wificar/components/RockerView.java similarity index 99% rename from src/app/src/main/java/wificar/RockerView.java rename to src/app/src/main/java/wificar/components/RockerView.java index ed48852..c57cd40 100644 --- a/src/app/src/main/java/wificar/RockerView.java +++ b/src/app/src/main/java/wificar/components/RockerView.java @@ -1,4 +1,4 @@ -package wificar; +package wificar.components; import android.app.Activity; import android.content.Context; diff --git a/src/app/src/main/java/wificar/entity/InfraredSensorData.java b/src/app/src/main/java/wificar/entity/InfraredSensorData.java new file mode 100644 index 0000000..b913891 --- /dev/null +++ b/src/app/src/main/java/wificar/entity/InfraredSensorData.java @@ -0,0 +1,14 @@ +package wificar.entity; + +import com.j256.ormlite.field.DatabaseField; +import com.j256.ormlite.table.DatabaseTable; + +@DatabaseTable +public class InfraredSensorData { + @DatabaseField(id = true) + public long id; + @DatabaseField + public long time; + @DatabaseField + public boolean status; +} diff --git a/src/app/src/main/java/wificar/entity/LivingFeatureData.java b/src/app/src/main/java/wificar/entity/LivingFeatureData.java new file mode 100644 index 0000000..8937909 --- /dev/null +++ b/src/app/src/main/java/wificar/entity/LivingFeatureData.java @@ -0,0 +1,16 @@ +package wificar.entity; + +import com.j256.ormlite.field.DatabaseField; +import com.j256.ormlite.table.DatabaseTable; + +@DatabaseTable +public class LivingFeatureData { + @DatabaseField(id = true) + public long id; + @DatabaseField + public long time; + @DatabaseField + public double distance; + @DatabaseField + public boolean status; +} diff --git a/src/app/src/main/java/wificar/entity/UltraSoundSensorData.java b/src/app/src/main/java/wificar/entity/UltraSoundSensorData.java new file mode 100644 index 0000000..2d92503 --- /dev/null +++ b/src/app/src/main/java/wificar/entity/UltraSoundSensorData.java @@ -0,0 +1,14 @@ +package wificar.entity; + +import com.j256.ormlite.field.DatabaseField; +import com.j256.ormlite.table.DatabaseTable; + +@DatabaseTable +public class UltraSoundSensorData { + @DatabaseField(id = true) + public long id; + @DatabaseField + public long time; + @DatabaseField + public double distance; +} diff --git a/src/app/src/main/java/wificar/SocketListener.java b/src/app/src/main/java/wificar/network/SocketListener.java similarity index 66% rename from src/app/src/main/java/wificar/SocketListener.java rename to src/app/src/main/java/wificar/network/SocketListener.java index be56b01..7fff34e 100644 --- a/src/app/src/main/java/wificar/SocketListener.java +++ b/src/app/src/main/java/wificar/network/SocketListener.java @@ -1,4 +1,4 @@ -package wificar; +package wificar.network; import android.app.Activity; import android.content.Intent; @@ -6,6 +6,7 @@ import android.graphics.Bitmap; import android.net.Uri; import android.os.AsyncTask; import android.os.Environment; +import android.se.omapi.Session; import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -18,16 +19,27 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.sql.SQLException; +import java.util.Calendar; import my.wificar.R; +import wificar.Configuration; +import wificar.Database; +import wificar.entity.InfraredSensorData; +import wificar.entity.UltraSoundSensorData; public class SocketListener { private Activity activity; private InputStream inputStream; + private Database database; - public SocketListener(Activity activity,InputStream inputStream) { + public void onOpen(Session session){} + public void onClose(Session session){} + + public SocketListener(Activity activity,Database database,InputStream inputStream) { this.activity = activity; this.inputStream = inputStream; + this.database = database; AsyncTask.execute(()->{ while (true) { @@ -42,6 +54,8 @@ public class SocketListener { } } catch (IOException e) { throw new RuntimeException(e); + } catch (SQLException e) { + throw new RuntimeException(e); } } }); @@ -51,14 +65,14 @@ public class SocketListener { try { Thread.sleep(1000); onMessage1(0); - } catch (InterruptedException e) { + } catch (InterruptedException | SQLException e) { throw new RuntimeException(e); } } }); } int count = 0; - private void onMessage1(int inputValue) { + private void onMessage1(int inputValue) throws SQLException { //TODO activity.runOnUiThread(()->{ TextView textComponent = activity.findViewById(R.id.showLive); @@ -79,11 +93,19 @@ public class SocketListener { redCircle.setVisibility(View.VISIBLE); } }); +// InfraredSensorData data = new InfraredSensorData(); +// data.time = Calendar.getInstance().getTimeInMillis(); +// data.status = (inputValue == 1); +// database.getDao(InfraredSensorData.class).create(data); } - private void onMessage2(int inputValue) { + private void onMessage2(int inputValue) throws SQLException { activity.runOnUiThread(()->{ TextView textView = activity.findViewById(R.id.distance); textView.setText(inputValue+""); }); +// UltraSoundSensorData data = new UltraSoundSensorData(); +// data.time = Calendar.getInstance().getTimeInMillis(); +// data.distance = inputValue; +// database.getDao(UltraSoundSensorData.class).create(data); } } diff --git a/src/app/src/main/java/wificar/SoundSocketListener.java b/src/app/src/main/java/wificar/network/SoundSocketListener.java similarity index 98% rename from src/app/src/main/java/wificar/SoundSocketListener.java rename to src/app/src/main/java/wificar/network/SoundSocketListener.java index baab1a5..7a0945e 100644 --- a/src/app/src/main/java/wificar/SoundSocketListener.java +++ b/src/app/src/main/java/wificar/network/SoundSocketListener.java @@ -1,4 +1,4 @@ -package wificar; +package wificar.network; import android.app.Activity; import android.os.AsyncTask; diff --git a/src/app/src/main/java/wificar/Box.java b/src/app/src/main/java/wificar/yolo/Box.java similarity index 98% rename from src/app/src/main/java/wificar/Box.java rename to src/app/src/main/java/wificar/yolo/Box.java index 8a1aaf3..ebff2d1 100644 --- a/src/app/src/main/java/wificar/Box.java +++ b/src/app/src/main/java/wificar/yolo/Box.java @@ -1,4 +1,4 @@ -package wificar; +package wificar.yolo; import android.graphics.Color; import android.graphics.RectF; diff --git a/src/app/src/main/java/wificar/Constant.java b/src/app/src/main/java/wificar/yolo/Constant.java similarity index 94% rename from src/app/src/main/java/wificar/Constant.java rename to src/app/src/main/java/wificar/yolo/Constant.java index 7fc268c..9413abe 100644 --- a/src/app/src/main/java/wificar/Constant.java +++ b/src/app/src/main/java/wificar/yolo/Constant.java @@ -1,4 +1,4 @@ -package wificar; +package wificar.yolo; /*СRƼwww.xiao-r.com * йFPV-WIFI˴⹤ңwww.wifi-robots.comԴԴӵȨ * Դûѧϰ֮ãϽҵIJ diff --git a/src/app/src/main/java/wificar/KeyPoint.java b/src/app/src/main/java/wificar/yolo/KeyPoint.java similarity index 98% rename from src/app/src/main/java/wificar/KeyPoint.java rename to src/app/src/main/java/wificar/yolo/KeyPoint.java index 74c59eb..11ce617 100644 --- a/src/app/src/main/java/wificar/KeyPoint.java +++ b/src/app/src/main/java/wificar/yolo/KeyPoint.java @@ -1,4 +1,4 @@ -package wificar; +package wificar.yolo; public class KeyPoint { diff --git a/src/app/src/main/java/wificar/SimplePose.java b/src/app/src/main/java/wificar/yolo/SimplePose.java similarity index 93% rename from src/app/src/main/java/wificar/SimplePose.java rename to src/app/src/main/java/wificar/yolo/SimplePose.java index 64e2e1d..251e701 100644 --- a/src/app/src/main/java/wificar/SimplePose.java +++ b/src/app/src/main/java/wificar/yolo/SimplePose.java @@ -1,4 +1,4 @@ -package wificar; +package wificar.yolo; import android.content.res.AssetManager; import android.graphics.Bitmap; diff --git a/src/app/src/main/java/wificar/YOLOv5.java b/src/app/src/main/java/wificar/yolo/YOLOv5.java similarity index 91% rename from src/app/src/main/java/wificar/YOLOv5.java rename to src/app/src/main/java/wificar/yolo/YOLOv5.java index fc3a75c..09b76d7 100644 --- a/src/app/src/main/java/wificar/YOLOv5.java +++ b/src/app/src/main/java/wificar/yolo/YOLOv5.java @@ -1,8 +1,10 @@ -package wificar; +package wificar.yolo; import android.content.res.AssetManager; import android.graphics.Bitmap; +import wificar.yolo.Box; + public class YOLOv5 { static { System.loadLibrary("yolov5"); diff --git a/src/app/src/main/res/layout/activity_settings.xml b/src/app/src/main/res/layout/activity_settings.xml index 82fb6f2..a11f9e0 100644 --- a/src/app/src/main/res/layout/activity_settings.xml +++ b/src/app/src/main/res/layout/activity_settings.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/settings_background" - tools:context="wificar.SettingsActivity"> + tools:context="wificar.activity.AboutActivity">