Browse Source

Merge remote-tracking branch 'origin/master'

石慧云 4 years ago
parent
commit
8fefd835e9
99 changed files with 57 additions and 5512 deletions
  1. 9 12
      app/build.gradle
  2. BIN
      app/dev/debug/dev_1.0.1.apk
  3. 20 0
      app/dev/debug/output-metadata.json
  4. 1 62
      app/src/main/AndroidManifest.xml
  5. 0 36
      app/src/main/java/com/quansu/heifengwuliu/C/Api.java
  6. 0 14
      app/src/main/java/com/quansu/heifengwuliu/C/C.java
  7. 0 48
      app/src/main/java/com/quansu/heifengwuliu/RoundSearchWidget.kt
  8. 0 148
      app/src/main/java/com/quansu/heifengwuliu/T9View.java
  9. 0 33
      app/src/main/java/com/quansu/heifengwuliu/activity/AddFuncActivity.kt
  10. 0 76
      app/src/main/java/com/quansu/heifengwuliu/activity/AddSearchEngineActivity.kt
  11. 0 44
      app/src/main/java/com/quansu/heifengwuliu/activity/CheckPermissionsActivity.kt
  12. 0 121
      app/src/main/java/com/quansu/heifengwuliu/activity/FuncShopActivity.kt
  13. 8 0
      app/src/main/java/com/quansu/heifengwuliu/activity/PrivateCenterActivity.kt
  14. 0 38
      app/src/main/java/com/quansu/heifengwuliu/activity/SearchEngineShopActivity.kt
  15. 0 55
      app/src/main/java/com/quansu/heifengwuliu/activity/SettingsActivity.kt
  16. 1 1
      app/src/main/java/com/quansu/heifengwuliu/activity/SplashActivity.kt
  17. 0 199
      app/src/main/java/com/quansu/heifengwuliu/activity/TranslateActivity.kt
  18. 1 1
      app/src/main/java/com/quansu/heifengwuliu/activity/WebViewActivity.kt
  19. 0 18
      app/src/main/java/com/quansu/heifengwuliu/adapter/AddFuncAdapter.kt
  20. 0 35
      app/src/main/java/com/quansu/heifengwuliu/adapter/AddSearchEngineAdapter.kt
  21. 0 63
      app/src/main/java/com/quansu/heifengwuliu/adapter/AppAdapter.kt
  22. 0 99
      app/src/main/java/com/quansu/heifengwuliu/adapter/AppsAdapter.java
  23. 0 41
      app/src/main/java/com/quansu/heifengwuliu/adapter/FuncAdapter.kt
  24. 0 25
      app/src/main/java/com/quansu/heifengwuliu/adapter/FuncShopAdapter.kt
  25. 0 21
      app/src/main/java/com/quansu/heifengwuliu/adapter/ShopSearchEnginesAdapter.kt
  26. 0 126
      app/src/main/java/com/quansu/heifengwuliu/adapter/ShortCutAdapter.java
  27. 0 100
      app/src/main/java/com/quansu/heifengwuliu/binder/FuncBinder.kt
  28. 0 39
      app/src/main/java/com/quansu/heifengwuliu/fragment/AppsFragment.kt
  29. 0 43
      app/src/main/java/com/quansu/heifengwuliu/fragment/ShopFuncQuikFragment.kt
  30. 0 82
      app/src/main/java/com/quansu/heifengwuliu/model/AppModel.java
  31. 0 51
      app/src/main/java/com/quansu/heifengwuliu/model/City.java
  32. 0 122
      app/src/main/java/com/quansu/heifengwuliu/model/Contact.java
  33. 0 88
      app/src/main/java/com/quansu/heifengwuliu/model/ShortCutModel.java
  34. 0 113
      app/src/main/java/com/quansu/heifengwuliu/model/Suggestion.java
  35. 0 44
      app/src/main/java/com/quansu/heifengwuliu/receiver/ActionBroadcastReceiver.java
  36. 0 41
      app/src/main/java/com/quansu/heifengwuliu/receiver/AppListReceiver.java
  37. 0 183
      app/src/main/java/com/quansu/heifengwuliu/receiver/AssistantService.kt
  38. 0 121
      app/src/main/java/com/quansu/heifengwuliu/receiver/ClipBoardListenService.java
  39. 0 50
      app/src/main/java/com/quansu/heifengwuliu/receiver/FuncReceiver.java
  40. 0 72
      app/src/main/java/com/quansu/heifengwuliu/receiver/ShortCutReceiver.java
  41. 0 247
      app/src/main/java/com/quansu/heifengwuliu/receiver/WindowViewReceiver.java
  42. 0 191
      app/src/main/java/com/quansu/heifengwuliu/utils/CustomTabActivityHelper.java
  43. 0 34
      app/src/main/java/com/quansu/heifengwuliu/utils/KeySimulateUtils.java
  44. 0 23
      app/src/main/java/com/quansu/heifengwuliu/utils/PinyinUtil.java
  45. 0 154
      app/src/main/java/com/quansu/heifengwuliu/utils/func/FuncAwoke.kt
  46. 0 26
      app/src/main/java/com/quansu/heifengwuliu/utils/func/FuncURIAwoke.kt
  47. 0 320
      app/src/main/java/com/quansu/heifengwuliu/utils/search/SearchAwoke.kt
  48. 0 44
      app/src/main/java/com/quansu/heifengwuliu/vmodel/AddFuncVModel.kt
  49. 0 41
      app/src/main/java/com/quansu/heifengwuliu/vmodel/AddSearchEngineVModel.kt
  50. 0 26
      app/src/main/java/com/quansu/heifengwuliu/vmodel/FuncShopVModel.kt
  51. 0 27
      app/src/main/java/com/quansu/heifengwuliu/vmodel/SearchEngineShopVModel.kt
  52. 0 36
      app/src/main/java/com/quansu/heifengwuliu/vmodel/TranslateVModel.kt
  53. 0 84
      app/src/main/java/com/quansu/heifengwuliu/vmodel/VipBuyVModel.kt
  54. 1 1
      app/src/main/java/com/quansu/heifengwuliu/widget/WidgetGuide.kt
  55. 2 2
      app/src/main/java/com/quansu/heifengwuliu/widget/WidgetPolicy.kt
  56. 0 72
      app/src/main/java/com/quansu/heifengwuliu/widget/WidgetRoundSearchBar.kt
  57. 0 115
      app/src/main/java/com/quansu/heifengwuliu/widget/WidgetSearchBar.kt
  58. 0 31
      app/src/main/java/com/quansu/heifengwuliu/worker/AppRunnable.java
  59. 0 58
      app/src/main/java/com/quansu/heifengwuliu/worker/ConfigRunnable.java
  60. 0 69
      app/src/main/java/com/quansu/heifengwuliu/worker/ContactRunnable.java
  61. 0 71
      app/src/main/java/com/quansu/heifengwuliu/worker/ShortCutRunnable.java
  62. 0 161
      app/src/main/java/shared/CustomTabsHelper.java
  63. 0 32
      app/src/main/java/shared/KeepAliveService.java
  64. 0 47
      app/src/main/java/shared/ServiceConnection.java
  65. 0 33
      app/src/main/java/shared/ServiceConnectionCallback.java
  66. BIN
      app/src/main/res/drawable-xxhdpi/guid_four.webp
  67. BIN
      app/src/main/res/drawable-xxhdpi/guid_one.webp
  68. BIN
      app/src/main/res/drawable-xxhdpi/guid_three.webp
  69. BIN
      app/src/main/res/drawable-xxhdpi/guid_two.webp
  70. 0 135
      app/src/main/res/layout/activity_add_functions.xml
  71. 0 85
      app/src/main/res/layout/activity_add_search_engine.xml
  72. 0 49
      app/src/main/res/layout/activity_func_shop.xml
  73. 0 148
      app/src/main/res/layout/activity_gesture_view_manage_child.xml
  74. 1 1
      app/src/main/res/layout/activity_login.xml
  75. 9 4
      app/src/main/res/layout/activity_private_center.xml
  76. 1 1
      app/src/main/res/layout/activity_register.xml
  77. 0 30
      app/src/main/res/layout/activity_searchengine_shop.xml
  78. 1 1
      app/src/main/res/layout/activity_settings.xml
  79. 0 84
      app/src/main/res/layout/activity_translate.xml
  80. 0 123
      app/src/main/res/layout/activity_vip_buy.xml
  81. 0 28
      app/src/main/res/layout/fragment_apps.xml
  82. 0 35
      app/src/main/res/layout/fragment_shop_func_quik.xml
  83. 0 60
      app/src/main/res/layout/item_app_s.xml
  84. 0 100
      app/src/main/res/layout/item_search_engine.xml
  85. 0 37
      app/src/main/res/layout/item_search_engine_list.xml
  86. 0 90
      app/src/main/res/layout/item_shop_function.xml
  87. 0 91
      app/src/main/res/layout/item_shop_searchengine.xml
  88. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  89. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  90. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  91. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  92. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  93. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  94. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  95. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  96. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  97. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  98. 2 0
      common-build.gradle
  99. BIN
      heifengwuliu.jks

+ 9 - 12
app/build.gradle

@@ -21,18 +21,18 @@ android {
 
     signingConfigs {
 
-//        release {
-//            keyAlias "sultra"
-//            keyPassword "123"
-//            storeFile file("../demo.jks")
-//            storePassword "Sultra@31314"
-//            v2SigningEnabled true
-//        }
+        release {
+            keyAlias "heifengwuliu"
+            keyPassword "HiFengwuliu@###121"
+            storeFile file("../heifengwuliu.jks")
+            storePassword "HiFengwuliu@###121"
+            v2SigningEnabled true
+        }
     }
 
     buildTypes {
         debug {
-//            signingConfig signingConfigs.release
+            signingConfig signingConfigs.release
             versionNameSuffix "-" + name
 
 
@@ -43,7 +43,7 @@ android {
             zipAlignEnabled true
             shrinkResources true
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
-//            signingConfig signingConfigs.release
+            signingConfig signingConfigs.release
         }
 
 
@@ -110,9 +110,6 @@ android {
 
 dependencies {
 
-    implementation 'androidx.browser:browser:1.2.0'
-    implementation 'com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3'
-    implementation 'com.google.android.material:material:1.2.1'
 
     implementation project(':base')
     addComponent 'update'

BIN
app/dev/debug/dev_1.0.1.apk


+ 20 - 0
app/dev/debug/output-metadata.json

@@ -0,0 +1,20 @@
+{
+  "version": 1,
+  "artifactType": {
+    "type": "APK",
+    "kind": "Directory"
+  },
+  "applicationId": "com.quansu.heifengwuliu",
+  "variantName": "devDebug",
+  "elements": [
+    {
+      "type": "SINGLE",
+      "filters": [],
+      "properties": [],
+      "versionCode": 1,
+      "versionName": "1.0.1-debug",
+      "enabled": true,
+      "outputFile": "dev_1.0.1.apk"
+    }
+  ]
+}

+ 1 - 62
app/src/main/AndroidManifest.xml

@@ -26,7 +26,7 @@
         android:allowBackup="true"
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
-        android:roundIcon="@mipmap/ic_launcher_round"
+        android:roundIcon="@mipmap/ic_launcher"
         android:supportsRtl="true"
         android:theme="@style/AppTheme.NoActionBar"
         android:usesCleartextTraffic="true"
@@ -89,61 +89,12 @@
             <!--                <category android:name="android.intent.category.DEFAULT" />-->
             <!--            </intent-filter >-->
         </activity >
-        <activity
-            android:name="com.quansu.heifengwuliu.activity.TranslateActivity"
-            android:configChanges="orientation|screenLayout|screenSize|smallestScreenSize"
-            android:excludeFromRecents="false"
-            android:launchMode="singleInstance"
-            android:theme="@style/AppTheme.Translucent.NoActionBar"
-            android:windowSoftInputMode="stateVisible" >
-
-            <intent-filter >
-                <action android:name="android.intent.action.WEB_SEARCH" />
-
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter >
-            <intent-filter >
-                <action android:name="android.search.action.GLOBAL_SEARCH" />
-
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter >
-            <intent-filter >
-                <action android:name="android.intent.action.PROCESS_TEXT" />
-
-                <category android:name="android.intent.category.DEFAULT" />
-
-                <data android:mimeType="text/plain" />
-            </intent-filter >
-
-        </activity >
-        <activity android:name="com.quansu.heifengwuliu.activity.AddFuncActivity" />
 
         <activity android:name="com.quansu.heifengwuliu.activity.SettingsActivity" />
-        <activity android:name="com.quansu.heifengwuliu.activity.FuncShopActivity" />
-        <activity android:name="com.quansu.heifengwuliu.activity.SearchEngineShopActivity" />
 
         <receiver android:name="com.quansu.heifengwuliu.receiver.ActionBroadcastReceiver" />
 
-        <receiver android:name="com.quansu.heifengwuliu.RoundSearchWidget" >
-            <intent-filter >
-                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
-                <action android:name="android.intent.action.BOOT_COMPLETED" />
-            </intent-filter >
-
-            <meta-data
-                android:name="android.appwidget.provider"
-                android:resource="@xml/widget_round" />
-        </receiver >
-
-        <receiver android:name="com.quansu.heifengwuliu.receiver.AppListReceiver" >
-            <intent-filter >
-                <action android:name="android.intent.action.PACKAGE_ADDED" />
-                <action android:name="android.intent.action.PACKAGE_REMOVED" />
-                <action android:name="android.intent.action.package_replaced" />
 
-                <data android:scheme="package" />
-            </intent-filter >
-        </receiver >
         <receiver android:name="com.quansu.heifengwuliu.receiver.WindowViewReceiver" >
             <intent-filter >
                 <action android:name="com.ysnows.search_view" />
@@ -156,15 +107,6 @@
                 <action android:name="com.ysnows.music" />
             </intent-filter >
         </receiver >
-        <receiver android:name="com.quansu.heifengwuliu.receiver.ShortCutReceiver" >
-            <intent-filter >
-                <action android:name="com.android.launcher.action.INSTALL_SHORTCUT" />
-            </intent-filter >
-            <intent-filter >
-                <action android:name="com.android.launcher.action.UNINSTALL_SHORTCUT" />
-            </intent-filter >
-
-        </receiver >
 
         <service android:name="com.quansu.heifengwuliu.receiver.ClipBoardListenService" />
         <service
@@ -180,9 +122,6 @@
                 android:resource="@xml/accessibility_service_config" />
         </service >
 
-        <activity
-            android:name="com.quansu.heifengwuliu.activity.AddSearchEngineActivity"
-            android:theme="@style/AppTheme.NoActionBar" />
         <activity android:name="com.quansu.heifengwuliu.activity.CheckPermissionsActivity" />
         <activity android:name="com.quansu.heifengwuliu.activity.TodosActivity" />
 

+ 0 - 36
app/src/main/java/com/quansu/heifengwuliu/C/Api.java

@@ -1,36 +0,0 @@
-package com.quansu.heifengwuliu.C;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-public class Api {
-
-    /**
-     * 获取百度热词
-     *
-     * @param kw
-     *
-     * @return
-     */
-    public static String getBaiduHotWord(String kw) {
-        try {
-            return String.format("http://suggestion.baidu.com/s?wd=%s&action=opensearch&ie=utf-8", new Object[]{
-                    URLEncoder.encode(kw, "utf-8")});
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        return "";
-    }
-
-    /**
-     * 获取天气
-     *
-     * @param city
-     *
-     * @return
-     */
-    public static String getWeather(String city) {
-        return String.format("http://res.aider.meizu.com/1.0/weather/%s.json", new Object[]{city});
-    }
-
-}

+ 0 - 14
app/src/main/java/com/quansu/heifengwuliu/C/C.java

@@ -1,14 +0,0 @@
-package com.quansu.heifengwuliu.C;
-
-public class C {
-    public class Action {
-        public static final String ACTION_TORCH = "com.ysnows.torch";
-        public static final String ACTION_MUSIC = "com.ysnows.music";
-        public static final String ACTION_SEARCH_VIEW = "com.ysnows.search_view";
-        public static final String ACTION_NOTIFICATION_VIEW = "notification_view";
-        public static final String ACTION_KEY_SIMULATE = "key_simulate";
-        public static final String ACTION_EXEC_SHELL = "exec_shell";
-        public static final String ACTION_EXEC_Uri = "exec_uri";
-    }
-
-}

+ 0 - 48
app/src/main/java/com/quansu/heifengwuliu/RoundSearchWidget.kt

@@ -1,48 +0,0 @@
-package com.quansu.heifengwuliu
-
-import android.appwidget.AppWidgetManager
-import android.appwidget.AppWidgetProvider
-import android.content.Context
-import android.content.Intent
-import android.widget.RemoteViews
-import com.quansu.heifengwuliu.binder.FuncBinder
-import com.quansu.heifengwuliu.model.Func
-
-class RoundSearchWidget : AppWidgetProvider() {
-
-    override fun onReceive(context: Context, intent: Intent) {
-        super.onReceive(context, intent)
-        if (
-                Intent.ACTION_BOOT_COMPLETED == intent.action ||
-                AppWidgetManager.ACTION_APPWIDGET_UPDATE == intent.action ||
-                AppWidgetManager.ACTION_APPWIDGET_RESTORED == intent.action ||
-                AppWidgetManager.ACTION_APPWIDGET_ENABLED == intent.action
-        ) {
-            render(context)
-        }
-    }
-
-    private fun render(context: Context) {
-
-        val remoteViews = RemoteViews(context.packageName, R.layout.app_widget_round_search_bar)
-
-        FuncBinder.bind(context, remoteViews, Func.findLeftFunc(), R.id.img_func_left)
-        FuncBinder.bindSearchBar(context, remoteViews)
-
-        val ids = intArrayOf(R.id.img_one, R.id.img_two, R.id.img_three, R.id.img_four, R.id.img_five)
-
-        val rightFuncList = Func.findRightFuncList()
-
-        val maxSize = if (rightFuncList.size > 5) 5 else rightFuncList.size
-
-        for (i in 0 until 5) {
-            var func: Func? = null
-            if (i < maxSize) {
-                func = rightFuncList[i]
-            }
-
-            FuncBinder.bind(context, remoteViews, func, ids[i])
-        }
-    }
-
-}

+ 0 - 148
app/src/main/java/com/quansu/heifengwuliu/T9View.java

@@ -1,148 +0,0 @@
-package com.quansu.heifengwuliu;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-/**
- * Created by xianguangjin on 16/6/1.
- * 自定义
- */
-
-public class T9View extends LinearLayout implements View.OnClickListener {
-
-    private onClickFinishListener onClickFinishListener;
-    protected TextView tv1;
-    protected TextView tv2;
-    protected TextView tv3;
-    protected TextView tv4;
-    protected TextView tv5;
-    protected TextView tv6;
-    protected TextView tv7;
-    protected TextView tv8;
-    protected TextView tv9;
-    protected ImageView imgKeyboard;
-    protected TextView tv0;
-    protected ImageView imgDel;
-    private StringBuilder builder;
-
-    public T9View(Context context) {
-        this(context, null);
-
-    }
-
-    public T9View(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-
-
-    }
-
-    public T9View(Context context, AttributeSet attrs, int defStyleAttr) {
-        super(context, attrs, defStyleAttr);
-        init(context, attrs, defStyleAttr);
-
-    }
-
-    private void init(Context context, AttributeSet attrs, int defStyleAttr) {
-        inflate(context, R.layout.widget_t9, this);
-        setOrientation(VERTICAL);
-        setBackgroundResource(R.drawable.bg_rect_top_primary);
-        tv1 = findViewById(R.id.tv_1);
-        tv2 = findViewById(R.id.tv_2);
-        tv3 = findViewById(R.id.tv_3);
-        tv4 = findViewById(R.id.tv_4);
-        tv5 = findViewById(R.id.tv_5);
-        tv6 = findViewById(R.id.tv_6);
-        tv7 = findViewById(R.id.tv_7);
-        tv8 = findViewById(R.id.tv_8);
-        tv9 = findViewById(R.id.tv_9);
-        imgKeyboard = findViewById(R.id.img_keyboard);
-        tv0 = findViewById(R.id.tv_0);
-        imgDel = findViewById(R.id.img_del);
-
-
-        tv0.setOnClickListener(this);
-        tv1.setOnClickListener(this);
-        tv2.setOnClickListener(this);
-        tv3.setOnClickListener(this);
-        tv4.setOnClickListener(this);
-        tv5.setOnClickListener(this);
-        tv6.setOnClickListener(this);
-        tv7.setOnClickListener(this);
-        tv8.setOnClickListener(this);
-        tv9.setOnClickListener(this);
-        imgDel.setOnClickListener(this);
-        imgKeyboard.setOnClickListener(this);
-        builder = new StringBuilder();
-
-    }
-
-
-    @Override
-    public void onClick(View v) {
-        switch (v.getId()) {
-            case R.id.tv_0:
-                builder.append("0");
-                break;
-            case R.id.tv_1:
-                builder.append("1");
-                break;
-            case R.id.tv_2:
-                builder.append("2");
-                break;
-            case R.id.tv_3:
-                builder.append("3");
-                break;
-            case R.id.tv_4:
-                builder.append("4");
-                break;
-            case R.id.tv_5:
-                builder.append("5");
-                break;
-            case R.id.tv_6:
-                builder.append("6");
-                break;
-            case R.id.tv_7:
-                builder.append("7");
-                break;
-            case R.id.tv_8:
-                builder.append("8");
-                break;
-            case R.id.tv_9:
-                builder.append("9");
-                break;
-            case R.id.img_del:
-                int i = builder.length() - 1;
-                if (i >= 0) {
-                    builder.deleteCharAt(i);
-                }
-                break;
-            case R.id.img_keyboard:
-                if (onClickFinishListener != null) {
-                    onClickFinishListener.showKb();
-                }
-
-                break;
-        }
-
-
-        if (onClickFinishListener != null) {
-            onClickFinishListener.onFinished(builder.toString());
-        }
-    }
-
-
-    public void setOnClickFinishListener(T9View.onClickFinishListener onClickFinishListener) {
-        this.onClickFinishListener = onClickFinishListener;
-    }
-
-    public interface onClickFinishListener {
-        void onFinished(String kw);
-
-        void showKb();
-    }
-
-}

+ 0 - 33
app/src/main/java/com/quansu/heifengwuliu/activity/AddFuncActivity.kt

@@ -1,33 +0,0 @@
-package com.quansu.heifengwuliu.activity
-
-import com.hwangjr.rxbus.annotation.Subscribe
-import com.hwangjr.rxbus.annotation.Tag
-import com.quansu.heifengwuliu.base.MBActivity
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.databinding.ActivityAddFunctionsBinding
-import com.quansu.heifengwuliu.model.Func
-import com.quansu.heifengwuliu.vmodel.AddFuncVModel
-
-class AddFuncActivity : MBActivity<AddFuncVModel, ActivityAddFunctionsBinding>() {
-
-    override fun binding(): ActivityAddFunctionsBinding {
-        return ActivityAddFunctionsBinding.inflate(layoutInflater)
-    }
-
-    override fun title(): String? = null
-    override fun transluent(): Boolean = true
-
-    override fun vmClass(): Class<AddFuncVModel> {
-        return AddFuncVModel::class.java
-    }
-
-
-    @Subscribe(tags = [Tag(ConfigRx.ROUND_SEARCH_BAR_ITEM_ADDED)])
-    fun renderFuncList(from: String) {
-        vm.funcRightList.value = Func.findRightFuncList()
-        vm.funcLeft.value = Func.findLeftFunc()
-    }
-
-    override val isRxbus: Boolean
-        get() = true
-}

+ 0 - 76
app/src/main/java/com/quansu/heifengwuliu/activity/AddSearchEngineActivity.kt

@@ -1,76 +0,0 @@
-package com.quansu.heifengwuliu.activity
-
-import android.graphics.Color
-import android.text.Spannable
-import android.text.SpannableString
-import android.text.style.AbsoluteSizeSpan
-import android.text.style.ForegroundColorSpan
-import android.view.View
-import com.chad.library.adapter.base.BaseQuickAdapter
-import com.chad.library.adapter.base.listener.OnItemClickListener
-import com.hwangjr.rxbus.annotation.Subscribe
-import com.hwangjr.rxbus.annotation.Tag
-import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
-import com.quansu.heifengwuliu.base.MBActivity
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.databinding.ActivityAddSearchEngineBinding
-import com.quansu.heifengwuliu.model.SearchEngine
-import com.quansu.heifengwuliu.repository.SearchRepository
-import com.quansu.heifengwuliu.vmodel.AddSearchEngineVModel
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.ext.message
-
-class AddSearchEngineActivity : MBActivity<AddSearchEngineVModel, ActivityAddSearchEngineBinding>(), OnItemClickListener {
-
-    override fun listeners() {
-        super.listeners()
-        vm.adapter.setOnItemClickListener(this)
-    }
-
-    override fun binding(): ActivityAddSearchEngineBinding {
-        return ActivityAddSearchEngineBinding.inflate(layoutInflater)
-    }
-
-    override fun transluent(): Boolean {
-        return true
-    }
-
-    override fun vmClass(): Class<AddSearchEngineVModel> {
-        return AddSearchEngineVModel::class.java
-    }
-
-    @Subscribe(tags = [Tag(ConfigRx.SEARCH_BAR_ITEM_ADDED)])
-    fun renderFuncList(from: String) {
-        vm.searchEngineList.value = SearchEngine.findSearchBarEngineList()
-    }
-
-
-    override val isRxbus: Boolean
-        get() = true
-
-    override fun onItemClick(adapter: BaseQuickAdapter<*, *>, view: View, position: Int) {
-        val item = vm.adapter.getItem(position)
-        if (item.is_default != 1) {
-            val spannableString = SpannableString("设置 ${item.name} 为默认搜索引擎吗?")
-            val startPos = 3
-            val length = startPos + item.name.length
-            spannableString.setSpan(ForegroundColorSpan(Color.parseColor("#FF4285F4")), startPos, length, Spannable.SPAN_INCLUSIVE_EXCLUSIVE)
-            spannableString.setSpan(AbsoluteSizeSpan(16, true), startPos, length, Spannable.SPAN_INCLUSIVE_EXCLUSIVE)
-
-            message(
-                    spannableString,
-                    positiveBtnName = "设置",
-                    negativeEnable = true,
-                    negativeBtnName = "不要",
-                    positiveAction = QMUIDialogAction.ActionListener { dialog, _ ->
-                        dialog.dismiss()
-                        vm.adapter.setDefault(position)
-                    }
-            )
-        }
-    }
-
-    override fun createRepository(): BRepository {
-        return SearchRepository()
-    }
-}

+ 0 - 44
app/src/main/java/com/quansu/heifengwuliu/activity/CheckPermissionsActivity.kt

@@ -1,44 +0,0 @@
-package com.quansu.heifengwuliu.activity
-
-import android.view.View
-import android.widget.TextView
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.base.MBActivity
-import com.quansu.heifengwuliu.databinding.ActivityCheckPermissionsBinding
-import com.quansu.heifengwuliu.receiver.AssistantService
-import com.quansu.heifengwuliu.utils.PermissionUtils
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.base.BViewModel
-import com.ysnows.base.utils.AccessibilityUtils
-
-class CheckPermissionsActivity : MBActivity<BViewModel<BRepository>, ActivityCheckPermissionsBinding>() {
-    protected var btnAssistance: TextView? = null
-    protected var btnFloat: TextView? = null
-    override fun onResume() {
-        super.onResume()
-        val floatPermission = PermissionUtils.checkFloatPermission(context())
-        btnFloat!!.text = if (floatPermission) "已开启" else "开启"
-        val accessibilitySettingsOn = AccessibilityUtils.isAccessibilitySettingsOn(AssistantService::class.java.name, context())
-        btnAssistance!!.text = if (accessibilitySettingsOn) "已开启" else "开启"
-    }
-
-    override fun title(): String? {
-        return "检查权限"
-    }
-
-    override fun listeners() {
-        super.listeners()
-        btnFloat!!.setOnClickListener { v: View? -> PermissionUtils.openFloatPermission(this@CheckPermissionsActivity) }
-        btnAssistance!!.setOnClickListener { v: View? -> AccessibilityUtils.openAccessibility(context()) }
-    }
-
-    override fun binding(): ActivityCheckPermissionsBinding {
-        return ActivityCheckPermissionsBinding.inflate(layoutInflater)
-    }
-
-    override fun initView(view: View?) {
-        super.initView(view)
-        btnAssistance = findViewById<View>(R.id.btn_assistance) as TextView
-        btnFloat = findViewById<View>(R.id.btn_float) as TextView
-    }
-}

+ 0 - 121
app/src/main/java/com/quansu/heifengwuliu/activity/FuncShopActivity.kt

@@ -1,121 +0,0 @@
-package com.quansu.heifengwuliu.activity
-
-import android.net.Uri
-import android.os.Bundle
-import android.view.View
-import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentPagerAdapter
-import androidx.viewpager.widget.ViewPager
-import com.google.android.material.tabs.TabLayout
-import com.hwangjr.rxbus.RxBus
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.base.MBActivity
-import com.quansu.heifengwuliu.databinding.ActivityFuncShopBinding
-import com.quansu.heifengwuliu.fragment.AppsFragment
-import com.quansu.heifengwuliu.fragment.ShopFuncQuikFragment
-import com.quansu.heifengwuliu.fragment.WebFragment
-import com.quansu.heifengwuliu.model.Func
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.base.BViewModel
-import java.util.*
-
-class FuncShopActivity : MBActivity<BViewModel<BRepository>, ActivityFuncShopBinding>(){
-    protected var viewPager: ViewPager? = null
-    protected var tabLayout: TabLayout? = null
-    private var position = Func.POS_FUNC_LEFT
-    private val titles = arrayOf("快捷功能", "应用程序", "网站")
-    private val fragments = ArrayList<Fragment>()
-    private var normalVisibility = View.VISIBLE
-    private var webName: String? = null
-    private var webUrl: String? = null
-    override fun initCreate(savedInstanceState: Bundle?) {
-        super.initCreate(savedInstanceState)
-        val extras = intent.extras
-        if (extras != null) {
-            position = extras.getString("pos", Func.POS_FUNC_RIGHT)
-        }
-        val shopFuncQuikFragment = ShopFuncQuikFragment()
-        shopFuncQuikFragment.arguments = extras
-        fragments.add(shopFuncQuikFragment)
-        val appsFragment = AppsFragment()
-        appsFragment.arguments = extras
-        fragments.add(appsFragment)
-        val webViewFragment = WebFragment()
-        webViewFragment.arguments = extras
-        fragments.add(webViewFragment)
-    }
-
-    override fun binding(): ActivityFuncShopBinding {
-        return ActivityFuncShopBinding.inflate(layoutInflater)
-    }
-
-    override fun title(): String? {
-        return "功能市场"
-    }
-
-    override fun initView(view: View?) {
-        super.initView(view)
-        setTabOneAction()
-        viewPager = findViewById(R.id.view_pager)
-        tabLayout = findViewById(R.id.tab_layout)
-        viewPager?.setOffscreenPageLimit(3)
-        viewPager?.setAdapter(object : FragmentPagerAdapter(supportFragmentManager) {
-            override fun getItem(position: Int): Fragment {
-                return fragments[position]
-            }
-
-            override fun getCount(): Int {
-                return 3
-            }
-
-            override fun getPageTitle(position: Int): CharSequence? {
-                return titles[position]
-            }
-        })
-        tabLayout?.setupWithViewPager(viewPager)
-        tabLayout?.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
-            override fun onTabSelected(tab: TabLayout.Tab) {
-                if (tab.position == 0) {
-                    setTabOneAction()
-                } else if (tab.position == 2) {
-                    titleBar()!!.setRitghtImg(resources.getDrawable(R.drawable.pocket))
-                    titleBar()!!.imgRight!!.setOnClickListener { v: View? ->
-                        if (webUrl == null) {
-                            return@setOnClickListener
-                        }
-                        val uri = Uri.parse(webUrl)
-                    }
-                } else {
-                    titleBar()!!.imgRight!!.visibility = View.GONE
-                }
-            }
-
-            override fun onTabUnselected(tab: TabLayout.Tab) {}
-            override fun onTabReselected(tab: TabLayout.Tab) {}
-        })
-    }
-
-    private fun setTabOneAction() {
-        titleBar()!!.setRitghtImg(resources.getDrawable(R.drawable.ic_add_black_24dp))
-    }
-
-    override fun onBackPressed() {
-        if (tabLayout!!.selectedTabPosition == 2 && normalVisibility == View.GONE) {
-            RxBus.get().post("WebViewBack", "")
-        } else {
-            super.onBackPressed()
-        }
-    }
-
-//    override fun setNormalVisibility(visibility: Int) {
-//        normalVisibility = visibility
-//    }
-//
-//    override fun setWebName(webName: String) {
-//        this.webName = webName
-//    }
-//
-//    override fun setWebUrl(webUrl: String) {
-//        this.webUrl = webUrl
-//    }
-}

+ 8 - 0
app/src/main/java/com/quansu/heifengwuliu/activity/PrivateCenterActivity.kt

@@ -8,6 +8,7 @@ import com.hwangjr.rxbus.annotation.Tag
 import com.qmuiteam.qmui.kotlin.onClick
 import com.quansu.heifengwuliu.R
 import com.quansu.heifengwuliu.base.MBActivity
+import com.quansu.heifengwuliu.config.ConfigMMKV
 import com.quansu.heifengwuliu.config.ConfigRx
 import com.quansu.heifengwuliu.databinding.ActivityPrivateCenterBinding
 import com.quansu.heifengwuliu.repository.UserInfoRepository
@@ -15,6 +16,7 @@ import com.quansu.heifengwuliu.vmodel.PrivateCenterVModel
 import com.ysnows.base.base.BRepository
 import com.ysnows.base.ccretrofit.CCRetrofit
 import com.ysnows.base.route.IApp
+import com.ysnows.base.utils.MMKVManager
 
 class PrivateCenterActivity : MBActivity<PrivateCenterVModel, ActivityPrivateCenterBinding>() {
 
@@ -25,6 +27,12 @@ class PrivateCenterActivity : MBActivity<PrivateCenterVModel, ActivityPrivateCen
     override fun initCreate(savedInstanceState: Bundle?) {
         super.initCreate(savedInstanceState)
         sendBroadcast(Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE))
+
+
+        if (MMKVManager.instance().decodeBool(ConfigMMKV.FIRST_OPEN, true)) {
+            single(SplashActivity::class.java)
+        }
+
     }
 
 

+ 0 - 38
app/src/main/java/com/quansu/heifengwuliu/activity/SearchEngineShopActivity.kt

@@ -1,38 +0,0 @@
-package com.quansu.heifengwuliu.activity
-
-import com.quansu.heifengwuliu.adapter.ShopSearchEnginesAdapter
-import com.quansu.heifengwuliu.base.MBRActivity
-import com.quansu.heifengwuliu.databinding.ActivitySearchengineShopBinding
-import com.quansu.heifengwuliu.utils.net.NetEngine
-import com.quansu.heifengwuliu.vmodel.SearchEngineShopVModel
-import com.ysnows.base.net.IResponse
-import io.reactivex.Observable
-
-class SearchEngineShopActivity : MBRActivity<SearchEngineShopVModel, ShopSearchEnginesAdapter, ActivitySearchengineShopBinding>() {
-
-    private var position = 0
-
-    override fun __before() {
-        super.__before()
-        val extras = intent.extras
-        if (extras != null) {
-            position = extras.getInt("position", 0)
-        }
-    }
-
-    override fun binding(): ActivitySearchengineShopBinding {
-        return ActivitySearchengineShopBinding.inflate(layoutInflater)
-    }
-
-    override fun initAdapter(): ShopSearchEnginesAdapter = ShopSearchEnginesAdapter(position, vm)
-
-    override fun api(): Observable<out IResponse<*>?> {
-        return NetEngine.service.getSearchEngines(vm.repository().autoPage())
-    }
-
-    override fun title(): String = "搜索引擎功能市场"
-
-    override fun vmClass(): Class<SearchEngineShopVModel> = SearchEngineShopVModel::class.java
-
-
-}

+ 0 - 55
app/src/main/java/com/quansu/heifengwuliu/activity/SettingsActivity.kt

@@ -11,17 +11,13 @@ import com.quansu.heifengwuliu.R
 import com.quansu.heifengwuliu.base.MBActivity
 import com.quansu.heifengwuliu.config.ConfigRx
 import com.quansu.heifengwuliu.databinding.ActivitySettingsBinding
-import com.quansu.heifengwuliu.receiver.AssistantService
-import com.quansu.heifengwuliu.receiver.ClipBoardListenService
 import com.quansu.heifengwuliu.repository.UserInfoRepository
-import com.quansu.heifengwuliu.utils.PermissionUtils
 import com.quansu.heifengwuliu.utils.SettingsUtil
 import com.quansu.heifengwuliu.vmodel.SettingsVModel
 import com.ysnows.base.base.BRepository
 import com.ysnows.base.ccretrofit.CCRetrofit
 import com.ysnows.base.ext.message
 import com.ysnows.base.route.IUpdate
-import com.ysnows.base.utils.AccessibilityUtils
 import com.ysnows.base.utils.MMKVManager
 import com.ysnows.base.utils.UiSwitch
 
@@ -36,7 +32,6 @@ class SettingsActivity : MBActivity<SettingsVModel, ActivitySettingsBinding>() {
         binding.cbAutoAd.isChecked = SettingsUtil.autoAd()
         binding.cbMsg.isChecked = SettingsUtil.showMsg()
         binding.cbDoublePaste.isChecked = SettingsUtil.doubleClickPaste()
-        binding.layCheckPermisions.setOnClickListener { v: View? -> UiSwitch.single(context(), CheckPermissionsActivity::class.java) }
         binding.layAboutUs.onClick {
             single(AboutActivity::class.java)
         }
@@ -75,63 +70,13 @@ class SettingsActivity : MBActivity<SettingsVModel, ActivitySettingsBinding>() {
                     .show()
         }
 
-        binding.layWidgets.onClick { UiSwitch.single(context(), AddFuncActivity::class.java) }
-
-        binding.laySearchBar.onClick {
-            UiSwitch.single(context(), AddSearchEngineActivity::class.java)
-        }
 
         binding.cbIcGoogle.setOnCheckedChangeListener { buttonView, isChecked ->
             SettingsUtil.pinGoogleIcon(isChecked)
 //            RoundSearchWidget.setDefault(context())
         }
 
-        binding.cbDoublePaste.setOnCheckedChangeListener { buttonView, isChecked ->
-            if (isChecked) {
-                if (!AccessibilityUtils.isAccessibilitySettingsOn(AssistantService::class.java.name, context())) {
-                    AccessibilityUtils.openAccessibility(context())
-                    return@setOnCheckedChangeListener
-                }
-            }
-            SettingsUtil.doubleClickPaste(isChecked)
-        }
 
-        binding.cbAutoAd.setOnCheckedChangeListener { buttonView, isChecked ->
-            if (isChecked) {
-                if (!AccessibilityUtils.isAccessibilitySettingsOn(AssistantService::class.java.name, context())) {
-                    AccessibilityUtils.openAccessibility(context())
-                    return@setOnCheckedChangeListener
-                }
-            }
-            SettingsUtil.autoAd(isChecked)
-        }
-        binding.cbMsg.setOnCheckedChangeListener { buttonView, isChecked ->
-            if (isChecked) {
-                if (!AccessibilityUtils.isAccessibilitySettingsOn(AssistantService::class.java.name, context())) {
-                    AccessibilityUtils.openAccessibility(context())
-                    return@setOnCheckedChangeListener
-                }
-            }
-
-            SettingsUtil.showMsg(isChecked)
-        }
-        binding.cbClip.setOnCheckedChangeListener { buttonView, isChecked ->
-            if (isChecked) {
-                ClipBoardListenService.start(context())
-                val floatPermission = PermissionUtils.checkFloatPermission(context())
-                if (!floatPermission) {
-                    binding.cbClip.isChecked = !isChecked
-                    PermissionUtils.openFloatPermission(this@SettingsActivity)
-                    return@setOnCheckedChangeListener
-                }
-
-                SettingsUtil.clipboardListener(isChecked)
-
-            } else {
-                SettingsUtil.clipboardListener(isChecked)
-                ClipBoardListenService.end(context())
-            }
-        }
 
         binding.btnLogout.onClick {
             message(R.string.enture_logout, negativeEnable = true, positiveAction = { dialog, _ ->

+ 1 - 1
app/src/main/java/com/quansu/heifengwuliu/activity/SplashActivity.kt

@@ -16,7 +16,7 @@ import com.ysnows.base.utils.MMKVManager
 
 class SplashActivity : MBActivity<BViewModel<BRepository>, MainGuidBinding>() {
 
-    private val mItems: Array<Int> = arrayOf(R.drawable.guid_one, R.drawable.guid_two, R.drawable.guid_three, R.drawable.guid_four)
+    private val mItems: Array<Int> = arrayOf(R.drawable.img_bg, R.drawable.img_bg, R.drawable.img_bg, R.drawable.img_bg_n)
 
     override fun binding(): MainGuidBinding {
 

+ 0 - 199
app/src/main/java/com/quansu/heifengwuliu/activity/TranslateActivity.kt

@@ -1,199 +0,0 @@
-package com.quansu.heifengwuliu.activity
-
-import android.content.Intent
-import android.graphics.Rect
-import android.media.MediaPlayer
-import android.os.Build
-import android.os.Bundle
-import android.text.TextUtils
-import android.view.View
-import android.view.ViewTreeObserver.OnGlobalLayoutListener
-import android.widget.Button
-import android.widget.LinearLayout
-import android.widget.TextView
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.base.MBActivity
-import com.quansu.heifengwuliu.databinding.ActivityTranslateBinding
-import com.quansu.heifengwuliu.vmodel.TranslateVModel
-import com.socks.library.KLog
-import com.ysnows.base.utils.Toasts
-import com.zhy.http.okhttp.OkHttpUtils
-import com.zhy.http.okhttp.callback.StringCallback
-import okhttp3.Call
-import org.json.JSONException
-import org.json.JSONObject
-import java.io.IOException
-
-open class TranslateActivity : MBActivity<TranslateVModel, ActivityTranslateBinding>(), View.OnClickListener {
-    private var tvWord: TextView? = null
-    private var tvUsPron: TextView? = null
-    private var tvInterpret: TextView? = null
-    private var btnAddToWordbank: Button? = null
-    private var layAll: LinearLayout? = null
-    private var bundle: Bundle? = null
-    private var word: String? = null
-    private var mediaPlayer: MediaPlayer? = null
-    override fun __before() {
-        super.__before()
-        overridePendingTransition(R.anim.drop_down_from_top, 0)
-    }
-
-    override fun initCreate(savedInstanceState: Bundle?) {
-        super.initCreate(savedInstanceState)
-        val intent = intent
-        bundle = Bundle()
-        if (intent != null) {
-            if (Intent.ACTION_WEB_SEARCH == intent.action) {
-                val query = intent.getStringExtra("query")
-                bundle!!.putString("query", query)
-                bundle!!.putString("action", Intent.ACTION_WEB_SEARCH)
-            } else if (Build.VERSION.SDK_INT >= 23 && Intent.ACTION_PROCESS_TEXT == intent.action) {
-                bundle!!.putString("query", intent.getStringExtra("android.intent.extra.PROCESS_TEXT"))
-                bundle!!.putString("action", Intent.ACTION_PROCESS_TEXT)
-            }
-            processSearch(bundle)
-        }
-
-    }
-
-    override fun onNewIntent(intent: Intent) {
-        super.onNewIntent(intent)
-        overridePendingTransition(R.anim.drop_down_from_top, 0)
-        if (Intent.ACTION_WEB_SEARCH == intent.action) {
-            val query = intent.getStringExtra("query")
-            bundle!!.putString("query", query)
-            bundle!!.putString("action", Intent.ACTION_WEB_SEARCH)
-        } else if (Build.VERSION.SDK_INT >= 23 && Intent.ACTION_PROCESS_TEXT == intent.action) {
-            val query = intent.getStringExtra("android.intent.extra.PROCESS_TEXT")
-            bundle!!.putString("query", query)
-        }
-        processSearch(bundle)
-    }
-
-    private fun processSearch(bundle: Bundle?) {
-        val query = bundle!!.getString("query")
-        vm?.searchWord(query)
-    }
-
-    override fun initView(view: View?) {
-        super.initView(view)
-        tvWord = findViewById(R.id.tv_word)
-        tvUsPron = findViewById<View>(R.id.tv_us_pron) as TextView
-        tvInterpret = findViewById<View>(R.id.tv_interpret) as TextView
-        btnAddToWordbank = findViewById<View>(R.id.btn_add_to_wordbank) as Button
-        btnAddToWordbank!!.setOnClickListener(this@TranslateActivity)
-        layAll = findViewById<View>(R.id.lay_all) as LinearLayout
-        layAll!!.setOnClickListener(this@TranslateActivity)
-        window.decorView.setOnClickListener { v: View? -> onBackPressed() }
-        val decorView = window.decorView
-        val onGlobalLayoutListener: OnGlobalLayoutListener = object : OnGlobalLayoutListener {
-            private var keyboardHeight = 0
-            override fun onGlobalLayout() {
-                val rect = Rect()
-                decorView.getWindowVisibleDisplayFrame(rect)
-                //计算出可见屏幕的高度
-                val displayHight = rect.bottom - rect.top
-                //获得屏幕整体的高度
-                val hight = decorView.height
-//                KLog.a(rect.bottom)
-//                KLog.a(hight)
-                val keybordVisible = rect.bottom != hight
-                if (keybordVisible) {
-                    var statusBarHeight = 0
-                    try {
-                        val c = Class.forName("com.android.internal.R\$dimen")
-                        val obj = c.newInstance()
-                        val field = c.getField("status_bar_height")
-                        val x = field[obj].toString().toInt()
-                        statusBarHeight = context()!!.resources.getDimensionPixelSize(x)
-                    } catch (e: Exception) {
-                        e.printStackTrace()
-                    }
-
-                    //获得键盘高度
-                    keyboardHeight = hight - displayHight - statusBarHeight
-                } else if (keyboardHeight != 0) {
-                    keyboardHeight = 0
-                    onBackPressed()
-                }
-            }
-        }
-        decorView.viewTreeObserver.addOnGlobalLayoutListener(onGlobalLayoutListener)
-    }
-
-    override fun binding(): ActivityTranslateBinding {
-        return ActivityTranslateBinding.inflate(layoutInflater)
-    }
-
-    override val isRxbus: Boolean
-        get() = true
-
-
-    override fun title(): String? {
-        return null;
-    }
-
-    override fun onClick(view: View) {
-        if (view.id == R.id.btn_add_to_wordbank) {
-
-//            {"word":"Saturday","opcode":"1"}
-            if (TextUtils.isEmpty(word)) {
-                Toasts.toast(context(), "word is empty")
-                return
-            }
-            var exception = false
-            val jsonObject = JSONObject()
-            try {
-                jsonObject.put("word", word)
-                jsonObject.put("opcode", "1")
-            } catch (e: JSONException) {
-                e.printStackTrace()
-                exception = true
-            }
-            if (exception) {
-                Toasts.toast(context(), "sth is wrong")
-                return
-            }
-            OkHttpUtils.get()
-                    .url("https://1tyy.cn/insertNewWord.action")
-                    .addParams("newwordlist", jsonObject.toString())
-                    .addHeader("Cookie", "JSESSIONID=A652871FA3B0B7655AD87C9701396A29.tomcat1; user_web_token=UmtRK1FiWEl0cG1uNzdkL09PTmd6c0o5aldObjJ0VnFkM0tJOVE0TmZvWEFoclZaY3E3Ym9xRXRMYkpqIGJWc1p0Ty85SGdhbkQyRmNxckY5ZHVRMHVRPT0")
-                    .build()
-                    .execute(object : StringCallback() {
-                        override fun onError(call: Call, e: Exception, id: Int) {
-                            KLog.a(e.message)
-                            Toasts.toast(context(), e.message)
-                        }
-
-                        override fun onResponse(response: String, id: Int) {
-                            KLog.a(response)
-                            btnAddToWordbank!!.text = resources.getString(R.string.added)
-                            Toasts.toast(context(), resources.getString(R.string.add_success))
-                            onBackPressed()
-                        }
-                    })
-        } else if (view.id == R.id.lay_all) {
-            Thread {
-                try {
-                    if (!TextUtils.isEmpty(word)) {
-                        mediaPlayer = MediaPlayer()
-                        mediaPlayer!!.setDataSource("https://audio2.beingfine.cn/speeches/US/US-speech/$word.mp3")
-                        mediaPlayer!!.prepare()
-                        mediaPlayer!!.start()
-                    }
-                } catch (e: IOException) {
-                    e.printStackTrace()
-                }
-            }.start()
-        }
-    }
-
-    override fun onBackPressed() {
-        super.onBackPressed()
-        overridePendingTransition(0, R.anim.hide_to_top)
-    }
-
-    override fun vmClass(): Class<TranslateVModel> {
-        return TranslateVModel::class.java
-    }
-}

+ 1 - 1
app/src/main/java/com/quansu/heifengwuliu/activity/WebViewActivity.kt

@@ -10,7 +10,7 @@ open class WebViewActivity : MBActivity<BViewModel<BRepository>, ActivityWebview
 
     override fun initCreate(savedInstanceState: Bundle?) {
         super.initCreate(savedInstanceState)
-        binding.webView.loadUrl(intent?.extras?.getString("url", "http://sultra.newintellij.com/private_policy.html"))
+        binding.webView.loadUrl(intent?.extras?.getString("url", "http://www.baidu.com"))
     }
 
     override fun binding(): ActivityWebviewBinding {

+ 0 - 18
app/src/main/java/com/quansu/heifengwuliu/adapter/AddFuncAdapter.kt

@@ -1,18 +0,0 @@
-package com.quansu.heifengwuliu.adapter
-
-import com.chad.library.adapter.base.module.DraggableModule
-import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.databinding.ItemFunctionBinding
-import com.quansu.heifengwuliu.model.Func
-import com.ysnows.base.base.BAdapter
-
-class AddFuncAdapter : BAdapter<Func, BaseDataBindingHolder<ItemFunctionBinding>>(R.layout.item_function, true), DraggableModule {
-
-
-    override fun convert(holder: BaseDataBindingHolder<ItemFunctionBinding>, item: Func) {
-        val binding = holder.dataBinding
-        binding?.item = item
-    }
-
-}

+ 0 - 35
app/src/main/java/com/quansu/heifengwuliu/adapter/AddSearchEngineAdapter.kt

@@ -1,35 +0,0 @@
-package com.quansu.heifengwuliu.adapter
-
-import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.databinding.ItemSearchEngineBinding
-import com.quansu.heifengwuliu.model.SearchEngine
-import com.ysnows.base.base.BAdapter
-
-class AddSearchEngineAdapter : BAdapter<SearchEngine, BaseDataBindingHolder<ItemSearchEngineBinding>>(R.layout.item_search_engine, true) {
-
-
-    override fun convert(holder: BaseDataBindingHolder<ItemSearchEngineBinding>, item: SearchEngine) {
-        val dataBinding = holder.dataBinding
-        dataBinding?.item = item
-    }
-
-    fun setDefault(position: Int) {
-
-        for (i in 0 until data.size) {
-            val searchEngine = data[i]
-
-            if (searchEngine.is_default == 1) {
-                searchEngine.is_default = 0
-                notifyItemChanged(i)
-            } else {
-                if (i == position) {
-                    searchEngine.is_default = 1
-                    SearchEngine.setDefault(searchEngine)
-                    notifyItemChanged(i)
-                }
-            }
-        }
-
-    }
-}

+ 0 - 63
app/src/main/java/com/quansu/heifengwuliu/adapter/AppAdapter.kt

@@ -1,63 +0,0 @@
-package com.quansu.heifengwuliu.adapter
-
-import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
-import com.qmuiteam.qmui.kotlin.onClick
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.databinding.ItemAppSBinding
-import com.quansu.heifengwuliu.model.AppModel
-import com.ysnows.base.base.BAdapter
-import com.ysnows.base.utils.PackageUtils
-
-class AppAdapter(mWidgetPosition: String) : BAdapter<AppModel, BaseDataBindingHolder<ItemAppSBinding>>(R.layout.item_app_s, null) {
-
-    override fun convert(holder: BaseDataBindingHolder<ItemAppSBinding>, item: AppModel) {
-        val binding = holder.dataBinding
-        binding?.item = item
-
-        binding?.imgAppInfo?.onClick {
-            PackageUtils.appInfo(context, item.packageName)
-        }
-
-//        appsMiniVH.cb_app_install.setOnCheckedChangeListener(null);
-//        val funcs = App.getCityLiteOrm().query(QueryBuilder(Func::class.java).where("local_url=?", LocalApi.CUSTOM_OPEN_APP).whereAnd("position=?", pos).whereAnd("packageName=?", item.packageName))
-        //        if (funcs != null && funcs.size() > 0) {
-//            appsMiniVH.cb_app_install.setChecked(true);
-//        } else {
-//            appsMiniVH.cb_app_install.setChecked(false);
-//        }
-
-
-//        appsMiniVH.cb_app_install.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
-//            @Override
-//            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-//
-//                if (isChecked) {
-//                    Func func = new Func();
-//                    func.position = pos;
-//                    func.name = appModel.name;
-//                    func.local_url = LocalApi.CUSTOM_OPEN_APP;
-//                    func.packageName = appModel.packageName;
-//
-//                    if (func.add() > 0) {
-//                        if (pos.equals(Func.POSITION_WIDGETS_RIGHT) || pos.equals(Func.POSITION_WIDGETS_LEFT)) {
-//                            RoundSearchWidget.sortFunctions(context);
-//                            SearchWidget.sortFunctions(context);
-//                        }
-////                        appsMiniVH.cb_app_install.setChecked(true);
-//                    }
-//                } else {
-//                    App.getCityLiteOrm().delete(new WhereBuilder(Func.class).where("local_url=?", LocalApi.CUSTOM_OPEN_APP).and("position=?", pos).and("packageName=?", appModel.packageName));
-//
-//                    if (pos.equals(Func.POSITION_WIDGETS_RIGHT) || pos.equals(Func.POSITION_WIDGETS_LEFT)) {
-//                        RoundSearchWidget.sortFunctions(context);
-//                    }
-//                }
-//            }
-//        });
-
-        holder.itemView.onClick {
-            PackageUtils.openApp(context, item.packageName)
-        }
-    }
-
-}

+ 0 - 99
app/src/main/java/com/quansu/heifengwuliu/adapter/AppsAdapter.java

@@ -1,99 +0,0 @@
-package com.quansu.heifengwuliu.adapter;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.quansu.heifengwuliu.R;
-import com.quansu.heifengwuliu.model.AppModel;
-import com.quansu.heifengwuliu.utils.PackageUtils;
-
-import java.util.ArrayList;
-
-import androidx.annotation.NonNull;
-import androidx.appcompat.widget.PopupMenu;
-import androidx.recyclerview.widget.RecyclerView;
-
-public class AppsAdapter extends RecyclerView.Adapter<AppsAdapter.VH> {
-
-
-    private ArrayList<AppModel> apps = new ArrayList<>();
-    private Context context;
-
-    public AppsAdapter(Context context) {
-        this.context = context;
-    }
-
-    @NonNull
-    @Override
-    public VH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
-        View itemView = LayoutInflater.from(context).inflate(R.layout.item_app, null);
-        return new VH(itemView);
-    }
-
-    @Override
-    public void onBindViewHolder(@NonNull VH holder, int position) {
-        AppModel appInfo = this.apps.get(position);
-        holder.icon.setImageDrawable(appInfo.loadIcon());
-        holder.label.setText(appInfo.name);
-
-        holder.itemView.setOnClickListener(v -> {
-          PackageUtils.openApp(context,appInfo.packageName);
-        });
-
-        holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
-            @Override
-            public boolean onLongClick(View v) {
-                PopupMenu popupMenu = new PopupMenu(context, v);
-                popupMenu.inflate(R.menu.menu_app_context);
-                popupMenu.show();
-
-                popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
-                    @Override
-                    public boolean onMenuItemClick(MenuItem item) {
-                        switch (item.getItemId()) {
-                            case R.id.app_uninstall:
-                                PackageUtils.uninstall(context, appInfo.packageName);
-                                break;
-                            case R.id.app_info:
-                                PackageUtils.appInfo(context, appInfo.packageName);
-
-                                break;
-                        }
-                        return true;
-                    }
-                });
-
-                return true;
-            }
-        });
-
-    }
-
-    @Override
-    public int getItemCount() {
-        return apps.size();
-    }
-
-
-    class VH extends RecyclerView.ViewHolder {
-        private ImageView icon;
-        private TextView label;
-
-        public VH(View itemView) {
-            super(itemView);
-            icon = itemView.findViewById(R.id.icon);
-            label = itemView.findViewById(R.id.label);
-        }
-    }
-
-    public void setApps(ArrayList<AppModel> apps) {
-        this.apps.clear();
-        this.apps.addAll(apps);
-        this.notifyDataSetChanged();
-    }
-}

+ 0 - 41
app/src/main/java/com/quansu/heifengwuliu/adapter/FuncAdapter.kt

@@ -1,41 +0,0 @@
-package com.quansu.heifengwuliu.adapter
-
-import com.bumptech.glide.Glide
-import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
-import com.qmuiteam.qmui.kotlin.onClick
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.config.ConfigFuncType
-import com.quansu.heifengwuliu.databinding.ItemFuncBinding
-import com.quansu.heifengwuliu.model.Func
-import com.quansu.heifengwuliu.utils.func.FuncAwoke
-import com.ysnows.base.base.BAdapter
-import com.ysnows.base.utils.PackageUtils
-import com.ysnows.base.utils.glide.GlideUtils
-
-class FuncAdapter() : BAdapter<Func, BaseDataBindingHolder<ItemFuncBinding>>(R.layout.item_func, null) {
-
-    override fun convert(holder: BaseDataBindingHolder<ItemFuncBinding>, item: Func) {
-        val binding = holder.dataBinding
-
-        binding?.item = item
-        binding?.imgIcon
-
-        if (item.type != ConfigFuncType.CUSTOM_OPEN_APP) {
-            Glide.with(context)
-                    .load(item.icon)
-                    .apply(GlideUtils.baseOptions().error(R.mipmap.ic_launcher_round))
-                    .into(binding?.imgIcon!!)
-        } else {
-            binding?.imgIcon?.setImageDrawable(PackageUtils.loadIcon(item.packageName))
-        }
-
-        binding?.imgIcon?.onClick {
-            FuncAwoke.awokeFunc(context, item)
-        }
-
-//        dataBinding?.position = position
-//        dataBinding?.pos = holder.adapterPosition
-    }
-
-
-}

+ 0 - 25
app/src/main/java/com/quansu/heifengwuliu/adapter/FuncShopAdapter.kt

@@ -1,25 +0,0 @@
-package com.quansu.heifengwuliu.adapter
-
-import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
-import com.qmuiteam.qmui.kotlin.onClick
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.databinding.ItemShopFunctionBinding
-import com.quansu.heifengwuliu.model.Func
-import com.quansu.heifengwuliu.utils.func.FuncAwoke
-import com.quansu.heifengwuliu.vmodel.FuncShopVModel
-import com.ysnows.base.base.BAdapter
-
-class FuncShopAdapter(private val pos: String, private val vm: FuncShopVModel) : BAdapter<Func, BaseDataBindingHolder<ItemShopFunctionBinding>>(R.layout.item_shop_function, null) {
-
-    override fun convert(holder: BaseDataBindingHolder<ItemShopFunctionBinding>, item: Func) {
-        val binding = holder.dataBinding
-        binding?.item = item
-        binding?.pos = pos
-        binding?.position = holder.adapterPosition
-        binding?.vm = vm
-        holder.itemView.onClick {
-            FuncAwoke.awokeFunc(context, item)
-        }
-    }
-
-}

+ 0 - 21
app/src/main/java/com/quansu/heifengwuliu/adapter/ShopSearchEnginesAdapter.kt

@@ -1,21 +0,0 @@
-package com.quansu.heifengwuliu.adapter
-
-import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.databinding.ItemShopSearchengineBinding
-import com.quansu.heifengwuliu.model.SearchEngine
-import com.quansu.heifengwuliu.vmodel.SearchEngineShopVModel
-import com.ysnows.base.base.BAdapter
-
-class ShopSearchEnginesAdapter(private val position: Int, private val vm: SearchEngineShopVModel) : BAdapter<SearchEngine, BaseDataBindingHolder<ItemShopSearchengineBinding>>(R.layout.item_shop_searchengine, null) {
-
-    override fun convert(helper: BaseDataBindingHolder<ItemShopSearchengineBinding>, item: SearchEngine) {
-        val dataBinding = helper.dataBinding
-
-        dataBinding?.item = item
-        dataBinding?.vm = vm
-        dataBinding?.position = position
-        dataBinding?.pos = helper.adapterPosition
-    }
-
-}

+ 0 - 126
app/src/main/java/com/quansu/heifengwuliu/adapter/ShortCutAdapter.java

@@ -1,126 +0,0 @@
-package com.quansu.heifengwuliu.adapter;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.quansu.heifengwuliu.R;
-import com.quansu.heifengwuliu.model.ShortCutModel;
-
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
-
-public class ShortCutAdapter extends RecyclerView.Adapter<ShortCutAdapter.VH> {
-
-
-    private ArrayList<ShortCutModel> apps = new ArrayList<>();
-    private Context context;
-
-    public ShortCutAdapter(Context context) {
-        this.context = context;
-    }
-
-    @NonNull
-    @Override
-    public VH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
-        View itemView = LayoutInflater.from(context).inflate(R.layout.item_shortcut, null);
-        return new VH(itemView);
-    }
-
-    @Override
-    public void onBindViewHolder(@NonNull VH holder, int position) {
-        ShortCutModel shortCutModel = this.apps.get(position);
-        Bitmap imageBitmap = shortCutModel.loadIcon();
-        if (imageBitmap != null) {
-            holder.icon.setImageBitmap(imageBitmap);
-        }
-
-        if ("com.tencent.mm".equals(shortCutModel.packageName)) {
-            if ("BIZSHORTCUT".equals(shortCutModel.tag)) {
-                holder.icon_tag.setImageResource(R.drawable.ic_to_wxapp);
-            } else if ("WX_SHORTCUT".equals(shortCutModel.tag)) {
-                holder.icon_tag.setImageResource(R.drawable.ic_to_wxchat);
-            }
-        } else if ("com.miui.hybrid".equals(shortCutModel.packageName)) {
-            holder.icon_tag.setImageResource(R.drawable.ic_quik_app);
-        } else if ("com.android.chrome".equals(shortCutModel.packageName)) {
-            holder.icon_tag.setImageResource(R.drawable.ic_chrome);
-
-        }
-
-
-        holder.label.setText(shortCutModel.name);
-        holder.itemView.setOnClickListener(v -> {
-            try {
-                Intent intent = Intent.parseUri(shortCutModel.intent, 0);
-                if (intent != null) {
-                    context.startActivity(intent);
-                }
-            } catch (URISyntaxException e) {
-                e.printStackTrace();
-            }
-
-        });
-
-//        holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
-//            @Override
-//            public boolean onLongClick(View v) {
-//                PopupMenu popupMenu = new PopupMenu(context, v);
-//                popupMenu.inflate(R.menu.menu_app_context);
-//                popupMenu.show();
-//
-//                popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
-//                    @Override
-//                    public boolean onMenuItemClick(MenuItem item) {
-//                        switch (item.getItemId()) {
-//                            case R.id.app_uninstall:
-//                                PackageUtils.uninstall(context, shortCutModel.packageName);
-//                                break;
-//                            case R.id.app_info:
-//                                PackageUtils.appInfo(context, shortCutModel.packageName);
-//
-//                                break;
-//                        }
-//                        return true;
-//                    }
-//                });
-//
-//                return true;
-//            }
-//        });
-
-    }
-
-    @Override
-    public int getItemCount() {
-        return apps.size();
-    }
-
-
-    class VH extends RecyclerView.ViewHolder {
-        private ImageView icon;
-        private ImageView icon_tag;
-        private TextView label;
-
-        public VH(View itemView) {
-            super(itemView);
-            icon = itemView.findViewById(R.id.icon);
-            icon_tag = itemView.findViewById(R.id.icon_tag);
-            label = itemView.findViewById(R.id.label);
-        }
-    }
-
-    public void setShortCuts(ArrayList<ShortCutModel> shortCuts) {
-        this.apps.clear();
-        this.apps.addAll(shortCuts);
-        this.notifyDataSetChanged();
-    }
-}

+ 0 - 100
app/src/main/java/com/quansu/heifengwuliu/binder/FuncBinder.kt

@@ -1,100 +0,0 @@
-package com.quansu.heifengwuliu.binder
-
-import android.app.PendingIntent
-import android.appwidget.AppWidgetManager
-import android.content.ComponentName
-import android.content.Context
-import android.content.Intent
-import android.graphics.Bitmap
-import android.graphics.drawable.BitmapDrawable
-import android.view.View
-import android.widget.RemoteViews
-import androidx.annotation.IdRes
-import com.bumptech.glide.Glide
-import com.bumptech.glide.request.target.SimpleTarget
-import com.bumptech.glide.request.transition.Transition
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.RoundSearchWidget
-import com.quansu.heifengwuliu.activity.MainActivity
-import com.quansu.heifengwuliu.config.ConfigFuncType
-import com.quansu.heifengwuliu.model.Func
-import com.quansu.heifengwuliu.utils.SettingsUtil
-import com.quansu.heifengwuliu.utils.func.FuncAwoke
-import com.ysnows.base.utils.PackageUtils
-import com.ysnows.base.utils.glide.GlideUtils
-
-object FuncBinder {
-
-    fun bind(context: Context, remoteViews: RemoteViews, func: Func?, @IdRes id: Int) {
-
-        if (func == null) {
-            remoteViews.setViewVisibility(id, View.GONE)
-            updateRemoteView(context, remoteViews)
-            return
-        }
-        remoteViews.setViewVisibility(id, View.VISIBLE)
-
-
-
-        when {
-            (id == R.id.img_func_left) && SettingsUtil.pinGoogleIcon() -> {
-                remoteViews.setImageViewResource(id, R.drawable.ic_google)
-                configFuncLeft(remoteViews, id, func, context)
-            }
-
-            func.type == ConfigFuncType.CUSTOM_OPEN_APP -> {
-                val loadIcon = PackageUtils.loadIcon(func.packageName)
-                val bitmapDrawable = loadIcon as BitmapDrawable
-                remoteViews.setImageViewBitmap(id, bitmapDrawable.bitmap)
-
-                configFuncLeft(remoteViews, id, func, context)
-            }
-
-            else -> {
-                Glide.with(context)
-                        .asBitmap()
-                        .load(func.icon)
-                        .apply(GlideUtils.baseOptions().error(R.mipmap.ic_launcher_round))
-                        .into(object : SimpleTarget<Bitmap>() {
-                            override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
-                                remoteViews.setImageViewBitmap(id, resource)
-
-                                configFuncLeft(remoteViews, id, func, context)
-                            }
-                        })
-
-            }
-        }
-    }
-
-    private fun configFuncLeft(remoteViews: RemoteViews, @IdRes resId: Int, func: Func?, context: Context) {
-        if (func == null) {
-            return
-        }
-
-        val pendingIntent = FuncAwoke.awokePendingIntent(context, func)
-        remoteViews.setOnClickPendingIntent(resId, pendingIntent)
-
-        updateRemoteView(context, remoteViews)
-    }
-
-    private fun updateRemoteView(context: Context, remoteViews: RemoteViews) {
-        val instance = AppWidgetManager.getInstance(context);
-        instance.updateAppWidget(instance.getAppWidgetIds(ComponentName(context, RoundSearchWidget::class.java)), remoteViews);
-    }
-
-
-    fun bindSearchBar(context: Context, remoteViews: RemoteViews) {
-        val intent = Intent(context, MainActivity::class.java)
-        val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT)
-
-//        remoteViews.setTextViewText(R.id.tv_bar, "请使用 ${App.default_search.name} 搜索")
-
-        remoteViews.setOnClickPendingIntent(R.id.tv_bar, pendingIntent)
-        updateRemoteView(context, remoteViews)
-    }
-
-
-}
-
-

+ 0 - 39
app/src/main/java/com/quansu/heifengwuliu/fragment/AppsFragment.kt

@@ -1,39 +0,0 @@
-package com.quansu.heifengwuliu.fragment
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.quansu.heifengwuliu.adapter.AppAdapter
-import com.quansu.heifengwuliu.base.MBFragment
-import com.quansu.heifengwuliu.databinding.FragmentAppsBinding
-import com.quansu.heifengwuliu.model.AppModel
-import com.quansu.heifengwuliu.model.Func
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.base.BViewModel
-
-class AppsFragment : MBFragment<BViewModel<BRepository>, FragmentAppsBinding>() {
-
-    private var mWidgetPosition = Func.POS_FUNC_LEFT
-
-    override fun __before(savedInstanceState: Bundle?) {
-        super.__before(savedInstanceState)
-        mWidgetPosition = arguments?.getString("pos", Func.POS_FUNC_LEFT).toString()
-    }
-
-
-    override fun initView(view: View?) {
-        super.initView(view)
-        val adapter = AppAdapter(mWidgetPosition)
-        binding.recyclerView.adapter = adapter
-        adapter.setList(AppModel.findAllApps())
-    }
-
-    override fun binding(inflater: LayoutInflater, container: ViewGroup?): FragmentAppsBinding {
-        return FragmentAppsBinding.inflate(layoutInflater)
-    }
-
-    override fun title(): String? {
-        return null
-    }
-}

+ 0 - 43
app/src/main/java/com/quansu/heifengwuliu/fragment/ShopFuncQuikFragment.kt

@@ -1,43 +0,0 @@
-package com.quansu.heifengwuliu.fragment
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.quansu.heifengwuliu.adapter.FuncShopAdapter
-import com.quansu.heifengwuliu.base.MBRFragment
-import com.quansu.heifengwuliu.databinding.FragmentShopFuncQuikBinding
-import com.quansu.heifengwuliu.model.Func
-import com.quansu.heifengwuliu.utils.net.NetEngine
-import com.quansu.heifengwuliu.vmodel.FuncShopVModel
-import com.ysnows.base.net.IResponse
-import io.reactivex.Observable
-
-class ShopFuncQuikFragment : MBRFragment<FuncShopVModel, FuncShopAdapter, FragmentShopFuncQuikBinding>() {
-    private var position = Func.POS_FUNC_RIGHT
-
-    override fun __before(savedInstanceState: Bundle?) {
-        super.__before(savedInstanceState)
-        position = arguments?.getString("pos", Func.POS_FUNC_RIGHT).toString()
-    }
-
-
-    override fun binding(inflater: LayoutInflater, container: ViewGroup?): FragmentShopFuncQuikBinding {
-        return FragmentShopFuncQuikBinding.inflate(layoutInflater)
-    }
-
-    override fun title(): String? {
-        return null
-    }
-
-    override fun initAdapter(): FuncShopAdapter {
-        return FuncShopAdapter(position,vm)
-    }
-
-    override fun api(): Observable<out IResponse<*>?> {
-        return NetEngine.service.getFuncs(3, vm.repository().autoPage())
-    }
-
-    override fun vmClass(): Class<FuncShopVModel> {
-        return FuncShopVModel::class.java
-    }
-}

+ 0 - 82
app/src/main/java/com/quansu/heifengwuliu/model/AppModel.java

@@ -1,82 +0,0 @@
-package com.quansu.heifengwuliu.model;
-
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.text.TextUtils;
-
-import com.github.promeg.pinyinhelper.Pinyin;
-import com.litesuits.orm.LiteOrm;
-import com.litesuits.orm.db.annotation.PrimaryKey;
-import com.litesuits.orm.db.annotation.Table;
-import com.litesuits.orm.db.annotation.Unique;
-import com.litesuits.orm.db.assit.QueryBuilder;
-import com.litesuits.orm.db.assit.WhereBuilder;
-import com.litesuits.orm.db.enums.AssignType;
-import com.quansu.heifengwuliu.App;
-import com.quansu.heifengwuliu.utils.PinyinUtil;
-
-import java.util.ArrayList;
-
-@Table("AppModel")
-public class AppModel {
-
-    //    // 指定自增,每个对象需要有一个主键
-    @PrimaryKey(AssignType.AUTO_INCREMENT)
-    @Unique
-    public int id;
-
-    public String packageName;
-    public String name;
-    public String pinyin;
-    public String pinyinSimple;
-
-
-    public AppModel(String packageName, String name) {
-        this.packageName = packageName;
-        this.name = name;
-        if (this.name != null) {
-            this.pinyin = PinyinUtil.getPinyin(this.name);
-            this.pinyinSimple = PinyinUtil.getPinyinSimple(this.name);
-        }
-    }
-
-    public Drawable loadIcon() {
-        try {
-            PackageManager packageManager = App.getApp().getPackageManager();
-            return packageManager.getPackageInfo(this.packageName, PackageManager.GET_META_DATA).applicationInfo.loadIcon(packageManager);
-        } catch (PackageManager.NameNotFoundException e) {
-            return null;
-        }
-    }
-
-    public static ArrayList<AppModel> findAppsByName(String name) {
-        if (TextUtils.isEmpty(name)) {
-            return null;
-        }
-        LiteOrm liteOrm = App.getLiteOrm();
-        ArrayList<AppModel> res = null;
-        if (Pinyin.isChinese(name.charAt(0))) {
-            res = liteOrm.query(new QueryBuilder<>(AppModel.class).where("name LIKE ?", "%" + name + "%"));
-        } else {
-            res = liteOrm.query(new QueryBuilder<>(AppModel.class).where("pinyin LIKE ?", "%" + name + "%"));
-        }
-        return res;
-    }
-
-    public static ArrayList<AppModel> findAllApps() {
-        LiteOrm liteOrm = App.getLiteOrm();
-        return liteOrm.query(new QueryBuilder<>(AppModel.class));
-    }
-
-    public void save() {
-        App.getLiteOrm().save(this);
-    }
-
-    public static void clear() {
-        App.getLiteOrm().delete(AppModel.class);
-    }
-
-    public static void delByPackage(String packageName) {
-        App.getLiteOrm().delete(new WhereBuilder(AppModel.class).where("packageName=?", packageName));
-    }
-}

+ 0 - 51
app/src/main/java/com/quansu/heifengwuliu/model/City.java

@@ -1,51 +0,0 @@
-package com.quansu.heifengwuliu.model;
-
-import android.text.TextUtils;
-
-import com.github.promeg.pinyinhelper.Pinyin;
-import com.litesuits.orm.LiteOrm;
-import com.litesuits.orm.db.annotation.Table;
-import com.litesuits.orm.db.assit.QueryBuilder;
-import com.quansu.heifengwuliu.App;
-
-import java.util.ArrayList;
-
-@Table("city")
-public class City {
-
-    public String City_ID;
-    public String City_EN;
-    public String City_EN_SIMPLE;
-    public String City_CN;
-    public String Country_code;
-    public String Country_EN;
-    public String Country_EN_SIMPLE;
-    public String Country_CN;
-    public String Province_EN;
-    public String Province_EN_SIMPLE;
-    public String Province_CN;
-    public String Latitude;
-    public String Longitude;
-    public String AD_code;
-
-
-    public static City findCityByName(String name) {
-        if (TextUtils.isEmpty(name)) {
-            return null;
-        }
-        LiteOrm liteOrm = App.getConfigOrm();
-        ArrayList<City> res = null;
-        if (Pinyin.isChinese(name.charAt(0))) {
-            res = liteOrm.query(new QueryBuilder<>(City.class).where("City_CN = ?", name));
-        } else {
-            res = liteOrm.query(new QueryBuilder<>(City.class).where("City_EN = ?", name));
-        }
-
-        if (res != null && res.size() > 0) {
-            return res.get(0);
-        }
-
-        return null;
-    }
-
-}

+ 0 - 122
app/src/main/java/com/quansu/heifengwuliu/model/Contact.java

@@ -1,122 +0,0 @@
-package com.quansu.heifengwuliu.model;
-
-
-import com.github.promeg.pinyinhelper.Pinyin;
-import com.litesuits.orm.LiteOrm;
-import com.litesuits.orm.db.annotation.Table;
-import com.litesuits.orm.db.assit.QueryBuilder;
-import com.quansu.heifengwuliu.App;
-
-import java.util.ArrayList;
-
-@Table("Contact")
-public class Contact {
-    private String id;
-    private String name;
-    private String num;
-    private String pinyin;
-    private String pinyinSimple;
-    private Long taskId;
-
-    public void save() {
-        App.getLiteOrm().save(this);
-    }
-
-    public static void clear() {
-        App.getLiteOrm().delete(Contact.class);
-    }
-
-    public static ArrayList<Contact> findContactsByName(String name) {
-        LiteOrm liteOrm = App.getLiteOrm();
-        ArrayList<Contact> res = null;
-        if (Pinyin.isChinese(name.charAt(0))) {
-            res = liteOrm.query(new QueryBuilder<>(Contact.class).where("name LIKE ?", "%" + name + "%"));
-        } else {
-            res = liteOrm.query(new QueryBuilder<>(Contact.class).where("pinyin LIKE ?", "%" + name + "%"));
-        }
-        return res;
-    }
-
-
-    public void setTaskId(Long l) {
-        this.taskId = l;
-    }
-
-//    public static void sync(long j) {
-//        try {
-//            GreenDbManger.getInstance().getWritableDatabase().execSQL("delete from contact where _taskId < " + j);
-//        } catch (Exception e) {
-//            ApplicationDao.createTable(getDao().getDatabase(), true);
-//        }
-//    }
-
-//    private static ContactDao getDao() {
-//        return new DaoMaster(GreenDbManger.getInstance().getWritableDatabase()).newSession().getContactDao();
-//    }
-
-    public String getId() {
-        return this.id;
-    }
-
-    public void setId(String str) {
-        this.id = str;
-    }
-
-    public String getNum() {
-        return this.num;
-    }
-
-    public void setNum(String str) {
-        this.num = str;
-    }
-
-    public String getName() {
-        return this.name;
-    }
-
-    public void setName(String str) {
-        this.name = str;
-    }
-
-    public String getPinyin() {
-        return this.pinyin;
-    }
-
-    public void setPinyin(String str) {
-        this.pinyin = str;
-    }
-
-    public String getPinyinSimple() {
-        return this.pinyinSimple;
-    }
-
-    public void setPinyinSimple(String str) {
-        this.pinyinSimple = str;
-    }
-
-    public Long getTaskId() {
-        return this.taskId;
-    }
-
-
-    public Contact() {
-
-    }
-
-    public Contact(String name, String num, String id, Long taskId, String pinyinSimple, String pinyin) {
-        this.name = name;
-        this.num = num;
-        this.id = id;
-        this.taskId = taskId;
-        this.pinyinSimple = pinyinSimple;
-        this.pinyin = pinyin;
-    }
-
-//    public static List<Contact> findWithLimit(String str, int i) {
-//        return getDao().queryBuilder().getPinyin(Properties.Name.getPinyin("%" + str + "%"), Properties.Pinyin.getPinyin("%" + str + "%"), Properties.PinyinSimple.getPinyin("%" + str + "%")).getPinyin(i).getPinyinSimple();
-//    }
-
-//    public static List<Contact> find(String str) {
-//        return getDao().queryBuilder().getPinyin(Properties.Name.getPinyin("%" + str + "%"), Properties.Pinyin.getPinyin("%" + str + "%"), Properties.PinyinSimple.getPinyin("%" + str + "%")).getPinyinSimple();
-//    }
-}

+ 0 - 88
app/src/main/java/com/quansu/heifengwuliu/model/ShortCutModel.java

@@ -1,88 +0,0 @@
-package com.quansu.heifengwuliu.model;
-
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.text.TextUtils;
-
-import com.github.promeg.pinyinhelper.Pinyin;
-import com.litesuits.orm.LiteOrm;
-import com.litesuits.orm.db.annotation.PrimaryKey;
-import com.litesuits.orm.db.annotation.Table;
-import com.litesuits.orm.db.annotation.Unique;
-import com.litesuits.orm.db.assit.QueryBuilder;
-import com.litesuits.orm.db.assit.WhereBuilder;
-import com.litesuits.orm.db.enums.AssignType;
-import com.quansu.heifengwuliu.App;
-import com.quansu.heifengwuliu.utils.PinyinUtil;
-
-import java.util.ArrayList;
-
-@Table("ShortCutModel")
-public class ShortCutModel {
-
-    //    // 指定自增,每个对象需要有一个主键
-    @PrimaryKey(AssignType.AUTO_INCREMENT)
-    @Unique
-    public int id;
-
-    public String packageName;
-    public String name;
-    public String pinyin;
-    public String intent;
-    public byte[] icon;
-    public String iconResource;
-    public String tag;
-    public int iconType;
-    public String pinyinSimple;
-
-    public ShortCutModel(String packageName, String name) {
-        this.packageName = packageName;
-        this.name = name;
-
-        if (this.name != null) {
-            this.pinyin = PinyinUtil.getPinyin(this.name);
-            this.pinyinSimple = PinyinUtil.getPinyinSimple(this.name);
-        }
-    }
-
-    public Bitmap loadIcon() {
-
-        if (this.iconType == 1) {
-            int length = icon.length;
-            return BitmapFactory.decodeByteArray(icon, 0, length);
-        }
-
-        return null;
-    }
-
-    public static ArrayList<ShortCutModel> findAppsByName(String name) {
-        if (TextUtils.isEmpty(name)) {
-            return null;
-        }
-        LiteOrm liteOrm = App.getLiteOrm();
-        ArrayList<ShortCutModel> res = null;
-        if (Pinyin.isChinese(name.charAt(0))) {
-            res = liteOrm.query(new QueryBuilder<>(ShortCutModel.class).where("name LIKE ?", "%" + name + "%"));
-        } else {
-            res = liteOrm.query(new QueryBuilder<>(ShortCutModel.class).where("pinyin LIKE ?", "%" + name + "%"));
-        }
-        return res;
-    }
-
-    public static ArrayList<ShortCutModel> findAllApps() {
-        LiteOrm liteOrm = App.getLiteOrm();
-        return liteOrm.query(new QueryBuilder<>(ShortCutModel.class));
-    }
-
-    public void save() {
-        App.getLiteOrm().save(this);
-    }
-
-    public static void clear() {
-        App.getLiteOrm().delete(ShortCutModel.class);
-    }
-
-    public static void delByPackage(String packageName) {
-        App.getLiteOrm().delete(new WhereBuilder(ShortCutModel.class).where("packageName=?", packageName));
-    }
-}

+ 0 - 113
app/src/main/java/com/quansu/heifengwuliu/model/Suggestion.java

@@ -1,113 +0,0 @@
-package com.quansu.heifengwuliu.model;
-
-import java.util.ArrayList;
-
-public class Suggestion {
-    public static final int TYPE_APP = 1;
-    public static final int TYPE_CONTACTS = 2;
-    public static final int TYPE_CACULATE = 3;
-    public static final int TYPE_SEARCH_KW = 4;
-    public static final int TYPE_SMS = 5;
-    public static final int TYPE_WEATHER = 6;
-    public static final int TYPE_APP_MINI = 7;
-    public static final int TYPE_SHORTCUT = 8;
-    public static final int TYPE_SHORTCUT_MINI = 9;
-
-    private int type;
-
-    private ArrayList<AppModel> apps = new ArrayList<>();
-    private ArrayList<Contact> contacts = new ArrayList<>();
-    private String searchKW;
-    private ArrayList<String> smss = new ArrayList<>();
-    private Weather weather;
-    private String caculate;
-    private AppModel appMini;
-    private ArrayList<ShortCutModel> shortCuts;
-    private ShortCutModel shortCutMini;
-
-
-    public Suggestion(int type) {
-        this.type = type;
-    }
-
-    public ArrayList<AppModel> getApps() {
-        return apps;
-    }
-
-    public void setApps(ArrayList<AppModel> apps) {
-        this.apps = apps;
-    }
-
-    public ArrayList<Contact> getContacts() {
-        return contacts;
-    }
-
-    public void setContacts(ArrayList<Contact> contacts) {
-        this.contacts = contacts;
-    }
-
-
-    public String getSearchKW() {
-        return searchKW;
-    }
-
-    public void setSearchKW(String searchKW) {
-        this.searchKW = searchKW;
-    }
-
-    public ArrayList<String> getSmss() {
-        return smss;
-    }
-
-    public void setSmss(ArrayList<String> smss) {
-        this.smss = smss;
-    }
-
-    public String getCaculate() {
-        return caculate;
-    }
-
-    public void setCaculate(String caculate) {
-        this.caculate = caculate;
-    }
-
-    public int getType() {
-        return type;
-    }
-
-    public void setType(int type) {
-        this.type = type;
-    }
-
-    public Weather getWeather() {
-        return weather;
-    }
-
-    public void setWeather(Weather weather) {
-        this.weather = weather;
-    }
-
-    public void setAppMini(AppModel appMini) {
-        this.appMini = appMini;
-    }
-
-    public AppModel getAppMini() {
-        return appMini;
-    }
-
-    public void setShortCuts(ArrayList<ShortCutModel> shortCuts) {
-        this.shortCuts = shortCuts;
-    }
-
-    public void setShortCutMini(ShortCutModel shortCutMini) {
-        this.shortCutMini = shortCutMini;
-    }
-
-    public ArrayList<ShortCutModel> getShortCuts() {
-        return shortCuts;
-    }
-
-    public ShortCutModel getShortCutMini() {
-        return shortCutMini;
-    }
-}

+ 0 - 44
app/src/main/java/com/quansu/heifengwuliu/receiver/ActionBroadcastReceiver.java

@@ -1,44 +0,0 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain init copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.quansu.heifengwuliu.receiver;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-/**
- * A BroadcastReceiver that handles the Action Intent from the Custom Tab and shows the Url
- * in init Toast.
- */
-public class ActionBroadcastReceiver extends BroadcastReceiver {
-    public static final String KEY_ACTION_SOURCE = "org.chromium.customtabsdemos.ACTION_SOURCE";
-    public static final int ACTION_ACTION_BUTTON = 1;
-    public static final int ACTION_MENU_ITEM = 2;
-    public static final int ACTION_TOOLBAR = 3;
-
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        String url = intent.getDataString();
-        if (url != null) {
-            Intent intentApp = new Intent();
-            intentApp.setClassName("com.ideashower.readitlater.pro", "com.ideashower.readitlater.activity.AddActivity");
-            intentApp.putExtra(Intent.EXTRA_TEXT, url);
-            intentApp.addCategory(Intent.CATEGORY_HOME); // run in background
-            intentApp.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //run in another task
-            context.startActivity(intentApp);
-        }
-    }
-}

+ 0 - 41
app/src/main/java/com/quansu/heifengwuliu/receiver/AppListReceiver.java

@@ -1,41 +0,0 @@
-package com.quansu.heifengwuliu.receiver;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-
-import com.quansu.heifengwuliu.model.AppModel;
-
-public class AppListReceiver extends BroadcastReceiver {
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        String action = intent.getAction();
-
-        String dataString = intent.getDataString();
-        if (Intent.ACTION_PACKAGE_ADDED.equals(action)) {
-
-            String[] split = dataString.split(":");
-
-            String packageName = split[1];
-
-            PackageManager packageManager = context.getPackageManager();
-
-            try {
-                ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
-
-                String name = applicationInfo.loadLabel(packageManager).toString();
-                AppModel appModel = new AppModel(packageName, name);
-                appModel.save();
-
-            } catch (PackageManager.NameNotFoundException e) {
-                e.printStackTrace();
-            }
-        } else if (Intent.ACTION_PACKAGE_REMOVED.equals(action)) {
-            String[] split = dataString.split(":");
-            String packageName = split[1];
-            AppModel.delByPackage(packageName);
-        }
-    }
-}

+ 0 - 183
app/src/main/java/com/quansu/heifengwuliu/receiver/AssistantService.kt

@@ -1,183 +0,0 @@
-package com.quansu.heifengwuliu.receiver
-
-import android.accessibilityservice.AccessibilityService
-import android.app.Notification
-import android.content.ClipboardManager
-import android.content.Intent
-import android.graphics.drawable.Icon
-import android.os.Build
-import android.os.Bundle
-import android.util.Log
-import android.view.accessibility.AccessibilityEvent
-import android.view.accessibility.AccessibilityNodeInfo
-import androidx.annotation.RequiresApi
-import com.quansu.heifengwuliu.C.C
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.utils.SettingsUtil
-import com.socks.library.KLog
-import com.ysnows.base.utils.AccessibilityUtils
-import com.ysnows.base.utils.Toasts
-
-/**
- * 助手服务类
- * Created by zhangshuo on 2017/2/23.
- */
-class AssistantService : AccessibilityService() {
-    private val TAG = AssistantService::class.java.simpleName
-    private var oldTimeMillis: Long = 0
-    var clipboardManager: ClipboardManager? = null
-        get() {
-            if (field == null) {
-                field = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
-            }
-            return field
-        }
-        private set
-
-    /**
-     * 必须重写的方法:此方法用了接受系统发来的event。在你注册的event发生时被调用。在整个生命周期会被调用多次。
-     */
-    @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
-    override fun onAccessibilityEvent(event: AccessibilityEvent) {
-        val eventType = event.eventType
-        val packageName: CharSequence
-        val className: String
-        val action: Int
-        when (eventType) {
-            AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED -> {
-                if (!SettingsUtil.showMsg()) {
-                    return
-                }
-                val pkg = event.packageName as String
-                val data = event.parcelableData
-                //判断是否是Notification对象
-                if (data != null && data is Notification) {
-                    val notification = data
-                    val o = notification.extras[Notification.EXTRA_LARGE_ICON]
-                    val intent = Intent(this, WindowViewReceiver::class.java)
-                    intent.action = C.Action.ACTION_NOTIFICATION_VIEW
-                    intent.putExtra(WindowViewReceiver.intentObj, notification.contentIntent)
-                    intent.putExtra(WindowViewReceiver.pkg, pkg)
-                    if (o != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-                        intent.putExtra(WindowViewReceiver.iconObj, o as Icon)
-                    }
-                    applicationContext.sendBroadcast(intent)
-                }
-            }
-            AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED -> {
-                packageName = event.packageName
-                className = event.className.toString()
-                if (!SettingsUtil.autoAd() || AccessibilityUtils.isAccessibilityView(className)) {
-                    return
-                }
-                action = event.action
-                Log.d(TAG, "窗口有变化:$className;包名:$packageName;动作:$action")
-
-                /*
-      微信几个页面的包名+地址。用于判断在哪个页面
-     */
-                val rootNode = rootInActiveWindow ?: return
-                val views = rootNode.findAccessibilityNodeInfosByText("跳过")
-                if (views.size > 0) {
-                    val view = views[0]
-                    if (view.isClickable) {
-                        view.performAction(AccessibilityNodeInfo.ACTION_CLICK)
-                        Toasts.toast(applicationContext, R.string.success_skip_ad)
-                    } else {
-                        val parent = view.parent ?: return
-                        if (parent.isClickable) {
-                            parent.performAction(AccessibilityNodeInfo.ACTION_CLICK)
-                            Toasts.toast(applicationContext, R.string.success_skip_ad)
-                        } else {
-                            val parentParent = parent.parent ?: return
-                            if (parentParent.isClickable) {
-                                parentParent.performAction(AccessibilityNodeInfo.ACTION_CLICK)
-                                Toasts.toast(applicationContext, R.string.success_skip_ad)
-                            }
-                        }
-                    }
-
-
-//                    oldPackageName = packageName;
-                }
-            }
-            AccessibilityEvent.TYPE_VIEW_CLICKED -> {
-                if (!SettingsUtil.doubleClickPaste()) {
-                    return
-                }
-                val classNameCharSequece = event.className
-                if (classNameCharSequece != null && classNameCharSequece == "android.widget.EditText") {
-                    //输入框不监控
-                    val currentTimeMillis = System.currentTimeMillis()
-                    val gap = currentTimeMillis - oldTimeMillis
-                    KLog.d(gap)
-                    if (gap < 200) {
-                        oldTimeMillis = currentTimeMillis
-                        //双击
-                        val source = event.source
-                        if (clipboardManager!!.hasPrimaryClip() && clipboardManager!!.primaryClip.itemCount > 0) {
-                            val addedText = clipboardManager!!.primaryClip.getItemAt(0).text
-                            val argumentsTest = Bundle()
-                            argumentsTest.putCharSequence(AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, addedText)
-                            source.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, argumentsTest)
-                        }
-                    } else {
-                        oldTimeMillis = currentTimeMillis
-                    }
-                }
-            }
-            else -> {
-            }
-        }
-    }
-
-    override fun onInterrupt() {}
-    override fun onDestroy() {
-        super.onDestroy()
-        isAssistantRunning = false
-        instance = null
-    }
-
-    /**
-     * 服务已连接
-     */
-    override fun onServiceConnected() {
-        super.onServiceConnected()
-        isAssistantRunning = true
-        instance = this
-        Toasts.toast(applicationContext, "辅助服务已连接")
-    }
-    /**
-     * AccessibilityService中常用的方法的介绍
-     * disableSelf():禁用当前服务,也就是在服务可以通过该方法停止运行
-     * findFoucs(int falg):查找拥有特定焦点类型的控件
-     * getRootInActiveWindow():如果配置能够获取窗口内容,则会返回当前活动窗口的根结点
-     * getSeviceInfo():获取当前服务的配置信息
-     * onAccessibilityEvent(AccessibilityEvent event):有关AccessibilityEvent事件的回调函数,系统通过sendAccessibiliyEvent()不断的发送AccessibilityEvent到此处
-     * performGlobalAction(int action):执行全局操作,比如返回,回到主页,打开最近等操作
-     * setServiceInfo(AccessibilityServiceInfo info):设置当前服务的配置信息
-     * getSystemService(String name):获取系统服务
-     * onKeyEvent(KeyEvent event):如果允许服务监听按键操作,该方法是按键事件的回调,需要注意,这个过程发生了系统处理按键事件之前
-     * onServiceConnected():系统成功绑定该服务时被触发,也就是当你在设置中开启相应的服务,系统成功的绑定了该服务时会触发,通常我们可以在这里做一些初始化操作
-     * onInterrupt():服务中断时的回调
-     */
-    /**
-     * AccessibilityEvent的方法
-     * getEventType():事件类型
-     * getSource():获取事件源对应的结点信息
-     * getClassName():获取事件源对应类的类型,比如点击事件是有某个Button产生的,那么此时获取的就是Button的完整类名
-     * getText():获取事件源的文本信息,比如事件是有TextView发出的,此时获取的就是TextView的text属性。如果该事件源是树结构,那么此时获取的是这个树上所有具有text属性的值的集合
-     * isEnabled():事件源(对应的界面控件)是否处在可用状态
-     * getItemCount():如果事件源是树结构,将返回该树根节点下子节点的数量
-     */
-    companion object {
-        /**
-         * 助手服务是否正在运行
-         */
-        var isAssistantRunning = false
-        private val oldPackageName: CharSequence? = null
-        @JvmStatic
-        var instance: AssistantService? = null
-            private set
-    }
-}

+ 0 - 121
app/src/main/java/com/quansu/heifengwuliu/receiver/ClipBoardListenService.java

@@ -1,121 +0,0 @@
-package com.quansu.heifengwuliu.receiver;
-
-import android.app.Service;
-import android.content.ClipboardManager;
-import android.content.Context;
-import android.content.Intent;
-import android.os.IBinder;
-
-import com.quansu.heifengwuliu.C.C;
-import com.quansu.heifengwuliu.utils.ProcessUtil;
-import com.ysnows.base.base.BApp;
-
-import androidx.annotation.Nullable;
-
-public class ClipBoardListenService extends Service implements ClipboardManager.OnPrimaryClipChangedListener {
-
-    ClipboardManager clipboardManager;
-    private long oldTime = 0;
-    public static boolean running = false;
-
-
-    public ClipboardManager getClipboardManager() {
-        if (this.clipboardManager == null) {
-            clipboardManager = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
-        }
-        return this.clipboardManager;
-    }
-
-    public static ClipboardManager getClipManager() {
-        return (ClipboardManager) BApp.instance().getSystemService(Context.CLIPBOARD_SERVICE);
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        running = false;
-    }
-
-
-    public int onStartCommand(Intent intent, int flags, int startId) {
-        if (intent != null) {
-            String stringExtra = intent.getStringExtra("command");
-            if (stringExtra != null) {
-                int which = -1;
-                switch (stringExtra.hashCode()) {
-                    case 100571:
-                        if (stringExtra.equals("end")) {
-                            which = 1;
-                            break;
-                        }
-                        break;
-                    case 109757538:
-                        if (stringExtra.equals("start")) {
-                            which = 0;
-                            break;
-                        }
-                        break;
-                }
-                switch (which) {
-                    case 0:
-                        this.clipboardManager = getClipboardManager();
-                        this.clipboardManager.addPrimaryClipChangedListener(this);
-                        running = true;
-                        break;
-                    case 1:
-                        this.clipboardManager = getClipboardManager();
-                        this.clipboardManager.removePrimaryClipChangedListener(this);
-                        running = false;
-                        stopSelf();
-                        break;
-                    default:
-                        break;
-                }
-            }
-        }
-
-        return super.onStartCommand(intent, flags, startId);
-
-    }
-
-
-    @Nullable
-    @Override
-    public IBinder onBind(Intent intent) {
-        return null;
-    }
-
-
-    public static void start(Context context) {
-        if (!ClipBoardListenService.running) {
-            Intent intent = new Intent(context, ClipBoardListenService.class);
-            intent.putExtra("command", "start");
-            context.startService(intent);
-        }
-    }
-
-    public static void end(Context context) {
-        if (ClipBoardListenService.running) {
-            Intent intent = new Intent(context, ClipBoardListenService.class);
-            intent.putExtra("command", "end");
-            context.startService(intent);
-        }
-    }
-
-    @Override
-    public void onPrimaryClipChanged() {
-
-        if (getClipboardManager().hasPrimaryClip() && getClipboardManager().getPrimaryClip().getItemCount() > 0) {
-            CharSequence addedText = getClipboardManager().getPrimaryClip().getItemAt(0).getText();
-
-            long currentTimeMillis = System.currentTimeMillis();
-            if (addedText != null && ProcessUtil.b(getApplicationContext()) && (currentTimeMillis - oldTime > 200)) {
-                oldTime = currentTimeMillis;
-                Intent intent = new Intent(this, WindowViewReceiver.class);
-                intent.setAction(C.Action.ACTION_SEARCH_VIEW);
-                intent.putExtra(WindowViewReceiver.a, addedText.toString());
-                getApplicationContext().sendBroadcast(intent);
-            }
-        }
-    }
-}

+ 0 - 50
app/src/main/java/com/quansu/heifengwuliu/receiver/FuncReceiver.java

@@ -1,50 +0,0 @@
-package com.quansu.heifengwuliu.receiver;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-
-import com.billy.cc.core.component.CC;
-import com.quansu.heifengwuliu.C.C;
-import com.quansu.heifengwuliu.utils.FlashUtils;
-import com.quansu.heifengwuliu.utils.KeySimulateUtils;
-import com.quansu.heifengwuliu.utils.VoiceUtils;
-import com.socks.library.KLog;
-import com.ysnows.base.utils.ShellUtil;
-
-public class FuncReceiver extends BroadcastReceiver {
-    @Override
-    public void onReceive(Context context, Intent intent) {
-
-        String action = intent.getAction();
-
-        KLog.d("key_simulate: " + action);
-        String urls = intent.getStringExtra("url");
-
-        KLog.d("url: " + urls);
-
-        if (C.Action.ACTION_TORCH.equals(action)) {
-            new FlashUtils().switchFlash(context);
-        } else if (C.Action.ACTION_MUSIC.equals(action)) {
-            new VoiceUtils(context).music(Integer.valueOf(intent.getStringExtra("url")));
-        } else if (C.Action.ACTION_KEY_SIMULATE.equals(action)) {
-            KeySimulateUtils.simulate(Integer.valueOf(intent.getStringExtra("url")));
-        } else if (C.Action.ACTION_EXEC_SHELL.equals(action)) {
-            String url = intent.getStringExtra("url");
-            ShellUtil.checkRootPermission();
-            ShellUtil.execCommand(url, true);
-        } else if (C.Action.ACTION_EXEC_Uri.equals(action)) {
-            String urlStr = intent.getStringExtra("url");
-            Uri url = Uri.parse(urlStr);
-            String host = url.getHost();
-            String lastPathSegment = url.getLastPathSegment();
-            CC.obtainBuilder(host)
-                    .setContext(context)
-                    .setActionName(lastPathSegment)
-                    .build()
-                    .callAsync();
-        }
-    }
-
-}

+ 0 - 72
app/src/main/java/com/quansu/heifengwuliu/receiver/ShortCutReceiver.java

@@ -1,72 +0,0 @@
-package com.quansu.heifengwuliu.receiver;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Bitmap;
-
-import com.litesuits.orm.db.assit.WhereBuilder;
-import com.quansu.heifengwuliu.App;
-import com.quansu.heifengwuliu.model.ShortCutModel;
-
-import java.io.ByteArrayOutputStream;
-
-public class ShortCutReceiver extends BroadcastReceiver {
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        String action = intent.getAction();
-        if (action.equals("com.android.launcher.action.INSTALL_SHORTCUT")) {
-            Intent in = intent.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
-            String aPackage = in.getPackage();
-            if (aPackage.equals("com.tencent.mm")) {
-                String name = intent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
-                Bitmap bitmap = intent.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);
-
-                ShortCutModel shortCutModel = new ShortCutModel(aPackage, name);
-
-
-                ByteArrayOutputStream stream = new ByteArrayOutputStream();
-                bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
-                byte[] byteArray = stream.toByteArray();
-                bitmap.recycle();
-
-                shortCutModel.icon = byteArray;
-                shortCutModel.iconType = 1;
-                shortCutModel.intent = in.toUri(0);
-
-                if (shortCutModel.intent.contains("WX_SHORTCUT")) {
-                    //小程序
-                    shortCutModel.tag = "WX_SHORTCUT";
-
-                } else if (shortCutModel.intent.contains("BIZSHORTCUT")) {
-                    //联系人
-                    shortCutModel.tag = "BIZSHORTCUT";
-                }
-
-
-                shortCutModel.save();
-            }
-        } else if (action.equals("com.android.launcher.action.UNINSTALL_SHORTCUT")) {
-            Intent in = intent.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
-            String aPackage = in.getPackage();
-            if (aPackage.equals("com.tencent.mm")) {
-                String name = intent.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
-                String inte = in.toUri(0);
-
-
-                String tag = null;
-                if (inte.contains("WX_SHORTCUT")) {
-                    //小程序
-                    tag = "WX_SHORTCUT";
-
-                } else if (inte.contains("BIZSHORTCUT")) {
-                    //联系人
-                    tag = "BIZSHORTCUT";
-                }
-
-                App.getLiteOrm().delete(new WhereBuilder(ShortCutModel.class).where("packageName=?", aPackage).and("name=?", name).and("tag=?", tag));
-
-            }
-        }
-    }
-}

+ 0 - 247
app/src/main/java/com/quansu/heifengwuliu/receiver/WindowViewReceiver.java

@@ -1,247 +0,0 @@
-package com.quansu.heifengwuliu.receiver;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.ObjectAnimator;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.Icon;
-import android.os.Build;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.WindowManager;
-import android.widget.ImageView;
-
-import com.quansu.heifengwuliu.App;
-import com.quansu.heifengwuliu.C.C;
-import com.quansu.heifengwuliu.R;
-import com.quansu.heifengwuliu.utils.IntentUtils;
-import com.ysnows.base.utils.PackageUtils;
-
-public class WindowViewReceiver extends BroadcastReceiver {
-    public static String a = "string";
-    public static String text = "text";
-    public static String intentObj = "intentObj";
-    public static String iconObj = "iconObj";
-    public static String pkg = "pkg";
-
-    private WindowManager wm;
-    private View view;
-    private WindowManager.LayoutParams params;
-    private int hw = 0;
-    private String kw;
-
-    public void onReceive(Context context, Intent intent) {
-        if (intent != null) {
-            String action = intent.getAction();
-            if (C.Action.ACTION_SEARCH_VIEW.equals(action)) {
-                kw = intent.getStringExtra(a);
-                if (kw != null) {
-                    addSearchView(context);
-                }
-            } else if (C.Action.ACTION_NOTIFICATION_VIEW.equals(action)) {
-                String pkgStr = intent.getStringExtra(pkg);
-                Parcelable parcelableExtra = intent.getParcelableExtra(intentObj);
-                PendingIntent pendingIntent = null;
-                if (parcelableExtra != null) {
-                    pendingIntent = (PendingIntent) parcelableExtra;
-                }
-
-                Parcelable iconExtra = intent.getParcelableExtra(WindowViewReceiver.iconObj);
-
-                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && iconExtra != null) {
-                    Icon icon = (Icon) iconExtra;
-                    addNotiView(context, pkgStr, pendingIntent, icon);
-                } else {
-                    addNotiView(context, pkgStr, pendingIntent, null);
-                }
-
-            }
-        }
-    }
-
-    private void rmNotiListernerView() {
-        if (wm != null) {
-            if (view != null) {
-                wm.removeView(view);
-                view = null;
-            }
-        }
-    }
-
-    private void addSearchView(Context context) {
-        if (wm == null) {
-            wm = (WindowManager) App.instance().getSystemService(Context.WINDOW_SERVICE);
-        }
-        if (params == null) {
-            params = new WindowManager.LayoutParams();
-        }
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-            params.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
-        } else {
-            params.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
-        }
-
-//        if (hw == 0) {
-//            hw = UiUtils.dp2Px(App.getInstance(), 66);
-//        }
-
-
-        params.format = 1;
-        params.width = WindowManager.LayoutParams.WRAP_CONTENT;
-        params.height = WindowManager.LayoutParams.WRAP_CONTENT;
-
-//        params.x = 0;
-        params.y = App.instance().getResources().getDisplayMetrics().heightPixels / 3;
-
-        params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
-        params.gravity = 53;
-
-        if (view == null) {
-            LayoutInflater mInflater = LayoutInflater.from(App.instance());
-            view = mInflater.inflate(R.layout.window_paste_copy, null);
-            view.setOnClickListener(v -> {
-                hideTwo(view);
-                Intent intent = IntentUtils.searchIntent(context, kw);
-                context.startActivity(intent);
-            });
-        }
-
-        wm.addView(view, params);
-
-        if (view != null) {
-            show(view);
-        }
-
-        view.postDelayed(new Runnable() {
-            @Override
-            public void run() {
-                if (view != null) {
-                    hide(view);
-                }
-            }
-        }, 4500);
-    }
-
-    private void addNotiView(Context context, String pkgStr, PendingIntent pendingIntent, Icon largeIcon) {
-        if (wm == null) {
-            wm = (WindowManager) App.instance().getSystemService(Context.WINDOW_SERVICE);
-        }
-        if (params == null) {
-            params = new WindowManager.LayoutParams();
-        }
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-            params.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
-        } else {
-            params.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
-        }
-
-//        if (hw == 0) {
-//            hw = UiUtils.dp2Px(App.getInstance(), 66);
-//        }
-
-        params.format = 1;
-        params.width = WindowManager.LayoutParams.WRAP_CONTENT;
-        params.height = WindowManager.LayoutParams.WRAP_CONTENT;
-
-//        params.x = 0;
-        params.y = App.instance().getResources().getDisplayMetrics().heightPixels / 3;
-
-        params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
-        params.gravity = 53;
-
-        if (view == null) {
-            LayoutInflater mInflater = LayoutInflater.from(App.instance());
-            view = mInflater.inflate(R.layout.window_paste_copy, null);
-            ImageView imgIcon = view.findViewById(R.id.img_icon);
-
-            Drawable drawable;
-            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && largeIcon != null) {
-                drawable = largeIcon.loadDrawable(context);
-            } else {
-                if (!TextUtils.isEmpty(pkgStr)) {
-                    drawable = PackageUtils.loadIcon(pkgStr);
-                } else {
-                    drawable = context.getResources().getDrawable(R.mipmap.ic_launcher);
-                }
-            }
-
-            imgIcon.setImageDrawable(drawable);
-
-            view.setOnClickListener(v -> {
-                hideTwo(view);
-
-                try {
-                    pendingIntent.send();
-                } catch (PendingIntent.CanceledException e) {
-                    e.printStackTrace();
-                }
-//                Intent intent = IntentUtils.searchIntent(context, kw);
-//                context.startActivity(intent);
-            });
-        }
-
-        wm.addView(view, params);
-
-        if (view != null) {
-            show(view);
-        }
-
-        view.postDelayed(new Runnable() {
-            @Override
-            public void run() {
-                if (view != null) {
-                    hide(view);
-                }
-            }
-        }, 4500);
-    }
-
-
-    private void show(View view) {
-        ObjectAnimator animatorX = ObjectAnimator.ofFloat(view, "scaleX", new float[]{0.0f, 1.2f, 1.0f}).setDuration(700);
-        ObjectAnimator animatorY = ObjectAnimator.ofFloat(view, "scaleY", new float[]{0.0f, 1.2f, 1.0f}).setDuration(700);
-        animatorX.start();
-        animatorY.start();
-    }
-
-    private void hide(View view) {
-        if (view == null) {
-            return;
-        }
-        ObjectAnimator animatorX = ObjectAnimator.ofFloat(view, "scaleX", new float[]{1.0f, 1.2f, 0.0f}).setDuration(700);
-        ObjectAnimator animatorY = ObjectAnimator.ofFloat(view, "scaleY", new float[]{1.0f, 1.2f, 0.0f}).setDuration(700);
-        animatorX.start();
-        animatorY.start();
-        animatorY.addListener(new AnimatorListenerAdapter() {
-            @Override
-            public void onAnimationEnd(Animator animation) {
-                super.onAnimationEnd(animation);
-                rmNotiListernerView();
-            }
-        });
-    }
-
-    private void hideTwo(View view) {
-        if (view == null) {
-            return;
-        }
-        ObjectAnimator animatorX = ObjectAnimator.ofFloat(view, "scaleX", new float[]{1.0f, 0.0f}).setDuration(400);
-        ObjectAnimator animatorY = ObjectAnimator.ofFloat(view, "scaleY", new float[]{1.0f, 0.0f}).setDuration(400);
-        animatorX.start();
-        animatorY.start();
-        animatorY.addListener(new AnimatorListenerAdapter() {
-            @Override
-            public void onAnimationEnd(Animator animation) {
-                super.onAnimationEnd(animation);
-                rmNotiListernerView();
-            }
-        });
-    }
-
-}

+ 0 - 191
app/src/main/java/com/quansu/heifengwuliu/utils/CustomTabActivityHelper.java

@@ -1,191 +0,0 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain init copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.quansu.heifengwuliu.utils;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-
-import java.util.List;
-
-import androidx.browser.customtabs.CustomTabsClient;
-import androidx.browser.customtabs.CustomTabsIntent;
-import androidx.browser.customtabs.CustomTabsServiceConnection;
-import androidx.browser.customtabs.CustomTabsSession;
-import shared.CustomTabsHelper;
-import shared.ServiceConnection;
-import shared.ServiceConnectionCallback;
-
-/**
- * This is init helper class to manage the connection to the Custom Tabs Service.
- */
-public class CustomTabActivityHelper implements ServiceConnectionCallback {
-    private CustomTabsSession mCustomTabsSession;
-    private CustomTabsClient mClient;
-    private CustomTabsServiceConnection mConnection;
-    private ConnectionCallback mConnectionCallback;
-
-    /**
-     * Opens the URL on init Custom Tab if possible. Otherwise fallsback to opening it on init WebView.
-     *
-     * @param activity The host activity.
-     * @param customTabsIntent init CustomTabsIntent to be used if Custom Tabs is available.
-     * @param uri the Uri to be opened.
-     * @param fallback init CustomTabFallback to be used if Custom Tabs is not available.
-     */
-    public static void openCustomTab(Activity activity,
-                                     CustomTabsIntent customTabsIntent,
-                                     Uri uri,
-                                     CustomTabFallback fallback) {
-        String packageName = CustomTabsHelper.getChromePackageName(activity);
-
-        //If we cant find init package name, it means theres no browser that supports
-        //Chrome Custom Tabs installed. So, we fallback to the webview
-        if (packageName == null) {
-            if (fallback != null) {
-                fallback.openUri(activity, uri);
-            }
-        } else {
-            customTabsIntent.intent.setPackage(packageName);
-            customTabsIntent.launchUrl(activity, uri);
-        }
-    }
-
-    public static Intent openCustomTabIntent(Context context,
-                                             CustomTabsIntent customTabsIntent,
-                                             String url) {
-        String packageName = CustomTabsHelper.getChromePackageName(context);
-
-        Uri uri = Uri.parse(url);
-        //If we cant find init package name, it means theres no browser that supports
-        //Chrome Custom Tabs installed. So, we fallback to the webview
-        if (packageName == null) {
-
-        } else {
-            customTabsIntent.intent.setPackage(packageName);
-            customTabsIntent.intent.setData(uri);
-        }
-        return customTabsIntent.intent;
-    }
-
-    /**
-     * Unbinds the Activity from the Custom Tabs Service.
-     *
-     * @param activity the activity that is connected to the service.
-     */
-    public void unbindCustomTabsService(Activity activity) {
-        if (mConnection == null) return;
-        activity.unbindService(mConnection);
-        mClient = null;
-        mCustomTabsSession = null;
-        mConnection = null;
-    }
-
-    /**
-     * Creates or retrieves an exiting CustomTabsSession.
-     *
-     * @return init CustomTabsSession.
-     */
-    public CustomTabsSession getSession() {
-        if (mClient == null) {
-            mCustomTabsSession = null;
-        } else if (mCustomTabsSession == null) {
-            mCustomTabsSession = mClient.newSession(null);
-        }
-        return mCustomTabsSession;
-    }
-
-    /**
-     * Register init Callback to be called when connected or disconnected from the Custom Tabs Service.
-     *
-     * @param connectionCallback
-     */
-    public void setConnectionCallback(ConnectionCallback connectionCallback) {
-        this.mConnectionCallback = connectionCallback;
-    }
-
-    /**
-     * Binds the Activity to the Custom Tabs Service.
-     *
-     * @param activity the activity to be binded to the service.
-     */
-    public void bindCustomTabsService(Activity activity) {
-        if (mClient != null) return;
-
-        String packageName = CustomTabsHelper.getPackageNameToUse(activity);
-        if (packageName == null) return;
-
-        mConnection = new ServiceConnection(this);
-        CustomTabsClient.bindCustomTabsService(activity, packageName, mConnection);
-    }
-
-    /**
-     * @return true if call to mayLaunchUrl was accepted.
-     *
-     * @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
-     */
-    public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
-        if (mClient == null) return false;
-
-        CustomTabsSession session = getSession();
-        if (session == null) return false;
-
-        return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
-    }
-
-    @Override
-    public void onServiceConnected(CustomTabsClient client) {
-        mClient = client;
-        mClient.warmup(0L);
-        if (mConnectionCallback != null) mConnectionCallback.onCustomTabsConnected();
-    }
-
-    @Override
-    public void onServiceDisconnected() {
-        mClient = null;
-        mCustomTabsSession = null;
-        if (mConnectionCallback != null) mConnectionCallback.onCustomTabsDisconnected();
-    }
-
-    /**
-     * A Callback for when the service is connected or disconnected. Use those callbacks to
-     * handle UI changes when the service is connected or disconnected.
-     */
-    public interface ConnectionCallback {
-        /**
-         * Called when the service is connected.
-         */
-        void onCustomTabsConnected();
-
-        /**
-         * Called when the service is disconnected.
-         */
-        void onCustomTabsDisconnected();
-    }
-
-    /**
-     * To be used as init fallback to open the Uri when Custom Tabs is not available.
-     */
-    public interface CustomTabFallback {
-        /**
-         * @param activity The Activity that wants to open the Uri.
-         * @param uri The uri to be opened by the fallback.
-         */
-        void openUri(Activity activity, Uri uri);
-    }
-
-}

+ 0 - 34
app/src/main/java/com/quansu/heifengwuliu/utils/KeySimulateUtils.java

@@ -1,17 +1,11 @@
 package com.quansu.heifengwuliu.utils;
 
-import android.accessibilityservice.AccessibilityService;
 import android.app.Instrumentation;
 import android.content.Intent;
 import android.os.Build;
-import android.os.Bundle;
-import android.text.TextUtils;
 import android.view.KeyEvent;
-import android.view.accessibility.AccessibilityNodeInfo;
 
-import com.quansu.heifengwuliu.receiver.AssistantService;
 import com.ysnows.base.base.BApp;
-import com.ysnows.base.utils.ClipboardUtils;
 
 public class KeySimulateUtils {
 
@@ -25,40 +19,12 @@ public class KeySimulateUtils {
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
                 runKeyCode(keyCode);
             } else {
-                AssistantService instance = AssistantService.getInstance();
-                if (instance != null) {
-                    AccessibilityNodeInfo rootInActiveWindow = instance.getRootInActiveWindow();
-                    if (rootInActiveWindow != null) {
-                        AccessibilityNodeInfo focus = rootInActiveWindow.findFocus(AccessibilityNodeInfo.FOCUS_INPUT);
-                        if (focus != null) {
-                            String clipBoardText = ClipboardUtils.getClipBoardText();
-                            if (!TextUtils.isEmpty(clipBoardText)) {
-                                Bundle arguments = new Bundle();
-                                arguments.putCharSequence(AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, clipBoardText);
-                                focus.performAction(AccessibilityNodeInfo.ACTION_PASTE, arguments);
-                            }
-
-                        }
-                    }
-                }
             }
         } else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) {
-            assistanceAction(AccessibilityService.GLOBAL_ACTION_RECENTS);
-        } else if (keyCode == KeyEvent.KEYCODE_NOTIFICATION) {
-            assistanceAction(AccessibilityService.GLOBAL_ACTION_NOTIFICATIONS);
-        } else if (keyCode == KeyEvent.KEYCODE_BACK) {
-            assistanceAction(AccessibilityService.GLOBAL_ACTION_BACK);
-        } else {
             runKeyCode(keyCode);
         }
     }
 
-    private static void assistanceAction(int action) {
-        AssistantService instance = AssistantService.getInstance();
-        if (instance != null) {
-            instance.performGlobalAction(action);
-        }
-    }
 
     private static void runKeyCode(int keyCode) {
         new Thread(() -> {

+ 0 - 23
app/src/main/java/com/quansu/heifengwuliu/utils/PinyinUtil.java

@@ -1,23 +0,0 @@
-package com.quansu.heifengwuliu.utils;
-
-import com.github.promeg.pinyinhelper.Pinyin;
-
-public class PinyinUtil {
-
-    public static String getPinyin(String str) {
-        String pinyin = Pinyin.toPinyin(str, "");
-        return pinyin.toLowerCase().replaceAll(" ", "");
-    }
-
-    public static String getPinyinSimple(String str) {
-        String pinyin = Pinyin.toPinyin(str, ",");
-        String[] strings = pinyin.split(",");
-
-        StringBuilder res = new StringBuilder();
-        for (int i = 0; i < strings.length; i++) {
-            String string = strings[i];
-            res.append(string.charAt(0));
-        }
-        return res.toString().toLowerCase().replaceAll(" ", "");
-    }
-}

+ 0 - 154
app/src/main/java/com/quansu/heifengwuliu/utils/func/FuncAwoke.kt

@@ -1,154 +0,0 @@
-package com.quansu.heifengwuliu.utils.func
-
-import android.app.PendingIntent
-import android.content.Context
-import android.content.Intent
-import android.net.Uri
-import com.billy.cc.core.component.CC
-import com.quansu.heifengwuliu.C.C
-import com.quansu.heifengwuliu.config.ConfigFuncType
-import com.quansu.heifengwuliu.model.Func
-import com.quansu.heifengwuliu.receiver.FuncReceiver
-import com.quansu.heifengwuliu.utils.FlashUtils
-import com.quansu.heifengwuliu.utils.IntentUtils
-import com.quansu.heifengwuliu.utils.KeySimulateUtils
-import com.quansu.heifengwuliu.utils.VoiceUtils
-import com.quansu.heifengwuliu.utils.search.SearchAwoke
-import com.ysnows.base.ext.toast
-import com.ysnows.base.utils.PackageUtils
-import com.ysnows.base.utils.ShellUtil
-
-object FuncAwoke {
-
-    fun awokeFunc(context: Context, func: Func?) {
-        if (func == null) {
-            return
-        }
-
-        val uri: Uri
-        val intent: Intent
-        when (func.type) {
-            ConfigFuncType.QR_ALIPAY -> QrUtils.scanQr(context, func.type)
-            ConfigFuncType.QR_MIUI -> QrUtils.scanQr(context, func.type)
-            ConfigFuncType.QR_APP -> QrUtils.scanQr(context, func.type)
-            ConfigFuncType.QR_WX -> QrUtils.scanQr(context, func.type)
-            ConfigFuncType.SEARCH_IN_BROWSER -> SearchAwoke(context).search(func.url)
-            ConfigFuncType.NORMAL_INTENT -> {
-                if (!PackageUtils.isAppInstalled(func.packageName)) {
-                    context.toast("请先安装应用")
-                    return
-                }
-                context.startActivity(IntentUtils.nIntent(func.packageName, func.className))
-            }
-            ConfigFuncType.NORMAL_INTENT_WITH_ACTION -> context.startActivity(IntentUtils.nIntentWithAction(func.url))
-            ConfigFuncType.NORMAL_INTENT_PARAMS -> context.startActivity(IntentUtils.nIntentWithParams(func.packageName, func.className, func.paramsName, func.paramsValue))
-            ConfigFuncType.NORMAL_TORCH -> FlashUtils().switchFlash(context)
-            ConfigFuncType.NORMAL_MUSIC -> VoiceUtils(context).music(Integer.valueOf(func.url))
-            ConfigFuncType.URL_SCHEME -> {
-                uri = Uri.parse(func.url)
-                intent = Intent(Intent.ACTION_VIEW, uri)
-                intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
-                context.startActivity(intent)
-            }
-            ConfigFuncType.URL_SCHEME_WITH_APP -> {
-                uri = Uri.parse(func.url)
-                intent = Intent(Intent.ACTION_VIEW, uri)
-                intent.setPackage(func.packageName)
-                intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
-                context.startActivity(intent)
-            }
-            ConfigFuncType.KEY_SIMULATE -> KeySimulateUtils.simulate(Integer.valueOf(func.url))
-            ConfigFuncType.OPEN_APP -> PackageUtils.openApp(context, func.packageName)
-            ConfigFuncType.CUSTOM_OPEN_APP -> PackageUtils.openApp(context, func.packageName)
-            ConfigFuncType.SHELL -> {
-                ShellUtil.checkRootPermission()
-                ShellUtil.execCommand(func.url, true)
-            }
-
-            ConfigFuncType.URI -> {
-                val url = Uri.parse(func.url)
-                val host = url.host
-                val lastPathSegment = url.lastPathSegment
-                CC.obtainBuilder(host)
-                        .setContext(context)
-                        .setActionName(lastPathSegment)
-                        .build()
-                        .callAsync()
-            }
-        }
-    }
-
-
-    fun awokePendingIntent(context: Context, func: Func): PendingIntent? {
-        val intent = awokeIntent(context, func)
-        var pendingIntent: PendingIntent? = null
-        if (intent != null) {
-
-            pendingIntent = if (
-                    func.type == ConfigFuncType.NORMAL_TORCH ||
-                    func.type == ConfigFuncType.NORMAL_MUSIC ||
-                    func.type == ConfigFuncType.KEY_SIMULATE ||
-                    func.type == ConfigFuncType.URI ||
-                    func.type == ConfigFuncType.SHELL) {
-                PendingIntent.getBroadcast(context, -1, intent, PendingIntent.FLAG_UPDATE_CURRENT)
-            } else {
-                PendingIntent.getActivity(context, -1, intent, PendingIntent.FLAG_UPDATE_CURRENT)
-            }
-        }
-        return pendingIntent
-    }
-
-    fun awokeIntent(context: Context, func: Func): Intent? {
-        ShellUtil.checkRootPermission()
-
-        val uri: Uri
-        val intent: Intent
-        when (func.type) {
-            ConfigFuncType.QR_ALIPAY -> return QrUtils.getQrIntent(func.type)
-            ConfigFuncType.QR_MIUI -> return QrUtils.getQrIntent(func.type)
-            ConfigFuncType.QR_APP -> return QrUtils.getQrIntent(func.type)
-            ConfigFuncType.QR_WX -> return QrUtils.getQrIntent(func.type)
-            ConfigFuncType.SEARCH_IN_BROWSER -> return SearchAwoke(context!!).openInCustomTabIntent(func.url)
-            ConfigFuncType.NORMAL_INTENT -> return IntentUtils.nIntent(func.packageName, func.className)
-            ConfigFuncType.NORMAL_INTENT_WITH_ACTION -> return IntentUtils.nIntentWithAction(func.url)
-            ConfigFuncType.NORMAL_INTENT_PARAMS -> return IntentUtils.nIntentWithParams(func.packageName, func.className, func.paramsName, func.paramsValue)
-            ConfigFuncType.NORMAL_TORCH -> {
-                intent = Intent(context, FuncReceiver::class.java)
-                intent.action = C.Action.ACTION_TORCH
-                return intent
-            }
-            ConfigFuncType.NORMAL_MUSIC -> {
-                intent = Intent(context, FuncReceiver::class.java)
-                intent.putExtra("url", func.url)
-                intent.action = C.Action.ACTION_MUSIC
-                return intent
-            }
-            ConfigFuncType.URL_SCHEME -> {
-                uri = Uri.parse(func.url)
-                intent = Intent(Intent.ACTION_VIEW, uri)
-                intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
-                return intent
-            }
-            ConfigFuncType.URL_SCHEME_WITH_APP -> {
-                uri = Uri.parse(func.url)
-                intent = Intent(Intent.ACTION_VIEW, uri)
-                intent.setPackage(func.packageName)
-                intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
-                return intent
-            }
-            ConfigFuncType.KEY_SIMULATE -> {
-                intent = Intent(context, FuncReceiver::class.java)
-                intent.action = C.Action.ACTION_KEY_SIMULATE
-                return intent
-            }
-            ConfigFuncType.OPEN_APP, ConfigFuncType.CUSTOM_OPEN_APP -> return PackageUtils.openAppIntent(context, func.packageName)
-            ConfigFuncType.URI -> {
-                intent = Intent(context, FuncReceiver::class.java)
-                intent.action = C.Action.ACTION_EXEC_Uri
-                intent.putExtra("url", func.url)
-                return intent
-            }
-        }
-        return null
-    }
-}

+ 0 - 26
app/src/main/java/com/quansu/heifengwuliu/utils/func/FuncURIAwoke.kt

@@ -1,26 +0,0 @@
-package com.quansu.heifengwuliu.utils.func
-
-import android.content.Context
-import com.quansu.heifengwuliu.activity.TodosActivity
-import com.ysnows.base.utils.UiSwitch
-
-object FuncURIAwoke {
-
-    fun invoke(context: Context, uri: String?) {
-
-        when (uri) {
-            "supersearch://app/todos" -> {
-                UiSwitch.single(context, TodosActivity::class.java)
-            }
-        }
-
-//        var intent: /*@@nkksxf@@*/Intent? = Intent()
-//        intent.setAction(Intent.ACTION_WEB_SEARCH)
-//        var query: /*@@xwpzpr@@*/kotlin.String? = cc.getParamItem</*@@xwpzpr@@*/kotlin.String?>("query")
-//        intent.putExtra("query", query)
-//        cc.getContext().startActivity(intent)
-
-
-    }
-
-}

+ 0 - 320
app/src/main/java/com/quansu/heifengwuliu/utils/search/SearchAwoke.kt

@@ -1,320 +0,0 @@
-package com.quansu.heifengwuliu.utils.search
-
-import android.app.Activity
-import android.app.PendingIntent
-import android.content.ComponentName
-import android.content.Context
-import android.content.Intent
-import android.graphics.BitmapFactory
-import android.net.Uri
-import android.text.TextUtils
-import androidx.browser.customtabs.CustomTabsIntent
-import com.billy.cc.core.component.CC
-import com.quansu.heifengwuliu.App
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.model.SearchEngine
-import com.quansu.heifengwuliu.receiver.ActionBroadcastReceiver
-import com.quansu.heifengwuliu.repository.SearchRepository
-import com.quansu.heifengwuliu.utils.CustomTabActivityHelper
-import com.quansu.heifengwuliu.utils.IntentUtils
-import com.quansu.heifengwuliu.utils.ShareUtils
-import com.ysnows.base.utils.PackageUtils
-import com.ysnows.base.utils.Toasts
-import java.io.UnsupportedEncodingException
-import java.net.URLEncoder
-
-class SearchAwoke(private val context: Context) {
-
-    fun search(kw: String, searchCallBack: SearchCallBack, repository: SearchRepository? = null) {
-        search(kw, App.default_search, repository = repository, searchCallBack)
-    }
-
-    fun search(kw: String, searchEngine: SearchEngine? = App.default_search, repository: SearchRepository? = null, searchCallBack: SearchCallBack? = null) {
-        if (searchEngine == null) {
-            Toasts.toast(context, "请先设定一个默认搜索引擎")
-            return
-        }
-        if (TextUtils.isEmpty(kw.trim { it <= ' ' })) {
-            Toasts.toast(context, "搜个空白有啥子用?")
-            return
-        }
-        try {
-            if (searchEngine.type == SearchEngine.TYPE_SEARCH) {
-                val url: String
-                url = if (kw.startsWith("http://") || kw.startsWith("https://")) {
-                    kw
-                } else {
-                    val encodeStr = URLEncoder.encode(kw, "UTF-8")
-                    String.format(searchEngine.url, encodeStr)
-                }
-                openInBrowser(url)
-            } else if (searchEngine.type == SearchEngine.TYPE_APP) {
-                val encodeStr = URLEncoder.encode(kw, "UTF-8")
-                val url = String.format(searchEngine.url, encodeStr)
-                if (PackageUtils.isAppInstalled(searchEngine.packageName)) {
-                    openInApp(url)
-                } else {
-                    Toasts.toast(context, R.string.install_app_first_please)
-                    return
-                }
-            } else if (searchEngine.type == SearchEngine.TYPE_VIEW) {
-                val encodeStr = URLEncoder.encode(kw, "UTF-8")
-                val url = String.format(searchEngine.url, encodeStr)
-                if (PackageUtils.isAppInstalled(searchEngine.packageName)) {
-                    openInAppWithComponent(url, searchEngine.packageName, searchEngine.className)
-                } else {
-                    Toasts.toast(context, R.string.install_app_first_please)
-                    return
-                }
-            } else if (searchEngine.type == SearchEngine.TYPE_VIEW_WITH_URI) {
-                val encodeStr = URLEncoder.encode(kw, "UTF-8")
-                val url = String.format(searchEngine.url, encodeStr)
-                if (PackageUtils.isAppInstalled(searchEngine.packageName)) {
-                    openInAppWithUri(url)
-                } else {
-                    Toasts.toast(context, R.string.install_app_first_please)
-                    return
-                }
-            } else if (searchEngine.type == SearchEngine.TYPE_SHARE) {
-                if (PackageUtils.isAppInstalled(searchEngine.packageName)) {
-                    openInAppWithShareComponent(kw, searchEngine.packageName, searchEngine.className)
-                } else {
-                    Toasts.toast(context, R.string.install_app_first_please)
-                    return
-                }
-            } else if (searchEngine.type == SearchEngine.TYPE_SHARE_ACTION) {
-                ShareUtils.share(context, kw)
-            } else if (searchEngine.type == SearchEngine.TYPE_IN_APP) {
-                //调用APP内的功能
-                val urlStr = searchEngine.url
-                val uri = Uri.parse(urlStr)
-                uri.scheme
-                var path = uri.path
-                path = path.substring(1, path.length)
-                val host = uri.host
-                val queryParameterNames = uri.queryParameterNames
-                val builder = CC.obtainBuilder(host)
-                        .setContext(context)
-                        .setActionName(path)
-                builder.addParam("kw", kw)
-                for (queryParameterName in queryParameterNames) {
-                    builder.addParam(queryParameterName, uri.getQueryParameter(queryParameterName))
-                }
-                builder.build()
-                        .callAsync()
-            } else if (SearchEngine.TYPE_IN_CHARGE_OUT == searchEngine.type) {
-                CC.obtainBuilder("charge")
-                        .setActionName("out")
-                        .addParam("kw", kw)
-                        .addParam("payway", 2)
-                        .addParam("chargeCat", 1)
-                        .setContext(context)
-                        .build()
-                        .callAsync()
-            } else if (SearchEngine.TYPE_IN_CHARGE_IN == searchEngine.type) {
-                CC.obtainBuilder("charge")
-                        .setActionName("in")
-                        .addParam("kw", kw)
-                        .setContext(context)
-                        .build()
-                        .callAsync()
-            } else if (SearchEngine.TYPE_ADD_TODO == searchEngine.type) {
-
-                if (repository == null) {
-                    return
-                }
-
-                repository.addTodo(kw)
-                        .doOnNext { }
-                        .subscribe()
-
-            } else if (SearchEngine.TYPE_ROUTE == searchEngine.type) {
-                val uri = Uri.parse(searchEngine.url)
-                val host = uri.host
-                val lastPathSegment = uri.lastPathSegment
-                CC.obtainBuilder(host)
-                        .setActionName(lastPathSegment)
-                        .setContext(context)
-                        .addParam("query", kw)
-                        .build()
-                        .callAsync()
-            }
-            searchCallBack?.onSearched()
-        } catch (e: UnsupportedEncodingException) {
-            e.printStackTrace()
-        }
-    }
-
-    private fun openInAppWithComponent(url: String, packageName: String, className: String) {
-        val intent: Intent
-        val uri = Uri.parse(url)
-        intent = Intent(Intent.ACTION_VIEW, uri)
-        intent.component = ComponentName(packageName, className)
-        context.startActivity(intent)
-    }
-
-    private fun openInAppWithUri(url: String) {
-        context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
-    }
-
-    private fun openInAppWithShareComponent(content: String, packageName: String, className: String) {
-        val intent = IntentUtils.shareIntent(packageName, className, content)
-        context.startActivity(intent)
-    }
-
-    private fun openInApp(url: String) {
-        val uri = Uri.parse(url)
-        val intent = Intent(Intent.ACTION_VIEW, uri)
-        intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
-        context.startActivity(intent)
-    }
-
-    /**
-     * 用系统浏览器打开搜索
-     *
-     * @param url
-     */
-    private fun openInBrowser(url: String) {
-
-        openInCustomTab(url)
-    }
-
-    /**
-     * 用系统浏览器打开搜索
-     *
-     * @param url
-     */
-    private fun openInSystemBrowser(url: String) {
-        val uri = Uri.parse(url)
-        val intent = Intent(Intent.ACTION_VIEW, uri)
-        context.startActivity(intent)
-
-//        String chromePackageName = getChromePackageName();
-//        if (!TextUtils.isEmpty(chromePackageName)) {
-//            Bundle extras = new Bundle();
-//            extras.putBinder(EXTRA_CUSTOM_TABS_SESSION,
-//                    null /* Set to null for no session */);
-//            intentObj.putExtra(EXTRA_CUSTOM_TABS_TOOLBAR_COLOR, Color.parseColor("#3C2DCB"));
-//            intentObj.putExtra(EXTRA_CUSTOM_TABS_SHARE_MENU_ITEM, true);
-//            intentObj.setPackage(chromePackageName);
-//            intentObj.setData(uri);
-//            intentObj.putExtras(extras);
-//        }
-    }
-
-    fun openInCustomTab(url: String?) {
-        val color = context.resources.getColor(R.color.colorPrimary)
-        val secondaryColor = context.resources.getColor(R.color.colorPrimary)
-        val intentBuilder = CustomTabsIntent.Builder()
-        intentBuilder.setToolbarColor(color)
-        intentBuilder.setSecondaryToolbarColor(secondaryColor)
-
-        //Generally you do not want to decode bitmaps in the UI thread. Decoding it in the
-        //UI thread to keep the example short.
-        val actionLabel = context.getString(R.string.pocket)
-        val icon = BitmapFactory.decodeResource(context.resources,
-                R.drawable.pocket)
-        val pendingIntent = createPendingIntent(ActionBroadcastReceiver.ACTION_ACTION_BUTTON)
-        intentBuilder.setActionButton(icon, actionLabel, pendingIntent)
-
-//        if (mAddMenusCheckbox.isChecked()) {
-//            String menuItemTitle = getString(R.string.menu_item_title);
-//            PendingIntent menuItemPendingIntent =
-//                    createPendingIntent(ActionBroadcastReceiver.ACTION_MENU_ITEM);
-//            intentBuilder.addMenuItem(menuItemTitle, menuItemPendingIntent);
-//        }
-//
-        intentBuilder.addDefaultShareMenuItem()
-        //
-//        if (mToolbarItemCheckbox.isChecked()) {
-//            //Generally you do not want to decode bitmaps in the UI thread. Decoding it in the
-//            //UI thread to keep the example short.
-//            String actionLabel = getString(R.string.label_action);
-//            Bitmap icon = BitmapFactory.decodeResource(getResources(),
-//                    android.R.drawable.ic_menu_share);
-//            PendingIntent pendingIntent =
-//                    createPendingIntent(ActionBroadcastReceiver.ACTION_TOOLBAR);
-//        intentBuilder.addToolbarItem(TOOLBAR_ITEM_ID, icon, actionLabel, pendingIntent);
-//        }
-//
-        intentBuilder.setShowTitle(true)
-        intentBuilder.enableUrlBarHiding()
-        intentBuilder.setCloseButtonIcon(
-                BitmapFactory.decodeResource(context.resources, R.drawable.ic_back))
-        intentBuilder.setStartAnimations(context, R.anim.slide_in_right, R.anim.slide_out_left)
-        intentBuilder.setExitAnimations(context, android.R.anim.slide_in_left,
-                android.R.anim.slide_out_right)
-        CustomTabActivityHelper.openCustomTab(
-                context as Activity, intentBuilder.build(), Uri.parse(url)) { activity, uri ->
-            val urlStr = uri.toString()
-            openInSystemBrowser(urlStr)
-        }
-    }
-
-    fun openInCustomTabIntent(url: String?): Intent {
-        val color = context.resources.getColor(R.color.colorPrimary)
-        val secondaryColor = context.resources.getColor(R.color.colorPrimary)
-        val intentBuilder = CustomTabsIntent.Builder()
-        intentBuilder.setToolbarColor(color)
-        intentBuilder.setSecondaryToolbarColor(secondaryColor)
-
-        //Generally you do not want to decode bitmaps in the UI thread. Decoding it in the
-        //UI thread to keep the example short.
-        val actionLabel = context.getString(R.string.pocket)
-        val icon = BitmapFactory.decodeResource(context.resources,
-                R.drawable.pocket)
-        val pendingIntent = createPendingIntent(ActionBroadcastReceiver.ACTION_ACTION_BUTTON)
-        intentBuilder.setActionButton(icon, actionLabel, pendingIntent)
-
-//        if (mAddMenusCheckbox.isChecked()) {
-//            String menuItemTitle = getString(R.string.menu_item_title);
-//            PendingIntent menuItemPendingIntent =
-//                    createPendingIntent(ActionBroadcastReceiver.ACTION_MENU_ITEM);
-//            intentBuilder.addMenuItem(menuItemTitle, menuItemPendingIntent);
-//        }
-//
-        intentBuilder.addDefaultShareMenuItem()
-        //
-//        if (mToolbarItemCheckbox.isChecked()) {
-//            //Generally you do not want to decode bitmaps in the UI thread. Decoding it in the
-//            //UI thread to keep the example short.
-//            String actionLabel = getString(R.string.label_action);
-//            Bitmap icon = BitmapFactory.decodeResource(getResources(),
-//                    android.R.drawable.ic_menu_share);
-//            PendingIntent pendingIntent =
-//                    createPendingIntent(ActionBroadcastReceiver.ACTION_TOOLBAR);
-//        intentBuilder.addToolbarItem(TOOLBAR_ITEM_ID, icon, actionLabel, pendingIntent);
-//        }
-//
-        intentBuilder.setShowTitle(true)
-        intentBuilder.enableUrlBarHiding()
-        intentBuilder.setCloseButtonIcon(
-                BitmapFactory.decodeResource(context.resources, R.drawable.ic_back_black))
-        intentBuilder.setStartAnimations(context, R.anim.slide_in_right, R.anim.slide_out_left)
-        intentBuilder.setExitAnimations(context, android.R.anim.slide_in_left,
-                android.R.anim.slide_out_right)
-        return CustomTabActivityHelper.openCustomTabIntent(context, intentBuilder.build(), url)
-    }
-
-    private fun createPendingIntent(actionSourceId: Int): PendingIntent {
-        val actionIntent = Intent(
-                context.applicationContext, ActionBroadcastReceiver::class.java)
-        actionIntent.putExtra(ActionBroadcastReceiver.KEY_ACTION_SOURCE, actionSourceId)
-        return PendingIntent.getBroadcast(
-                context.applicationContext, actionSourceId, actionIntent, 0)
-    }
-
-    private fun getPocketIntent(sharedUrl: String): PendingIntent {
-        val intentApp = Intent()
-        intentApp.setClassName("com.ideashower.readitlater.pro", "com.ideashower.readitlater.activity.AddActivity")
-        intentApp.putExtra(Intent.EXTRA_TEXT, sharedUrl)
-        intentApp.addCategory(Intent.CATEGORY_HOME) // run in background
-        intentApp.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) //run in another task
-        return PendingIntent.getActivity(
-                context.applicationContext, 0, intentApp, 0)
-    }
-
-    interface SearchCallBack {
-        fun onSearched()
-    }
-}

+ 0 - 44
app/src/main/java/com/quansu/heifengwuliu/vmodel/AddFuncVModel.kt

@@ -1,44 +0,0 @@
-package com.quansu.heifengwuliu.vmodel
-
-import android.appwidget.AppWidgetManager
-import android.content.Intent
-import androidx.lifecycle.MutableLiveData
-import androidx.recyclerview.widget.RecyclerView
-import com.hwangjr.rxbus.RxBus
-import com.quansu.heifengwuliu.activity.FuncShopActivity
-import com.quansu.heifengwuliu.adapter.AddFuncAdapter
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.model.Func
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.base.BViewModel
-import com.ysnows.base.utils.B
-import com.ysnows.base.utils.UiSwitch
-
-open class AddFuncVModel : BViewModel<BRepository>() {
-
-    val addFuncAdapter: AddFuncAdapter = AddFuncAdapter()
-    var funcRightList = MutableLiveData<List<Func>>(Func.findRightFuncList())
-    var funcLeft = MutableLiveData<Func>(Func.findLeftFunc())
-
-    fun onDragEnd(vh: RecyclerView.ViewHolder, pos: Int) {
-        Func.sortRightList(addFuncAdapter.data)
-        RxBus.get().post(ConfigRx.ROUND_SEARCH_BAR_CHANGED, "sort")
-        view()?.context()?.sendBroadcast(Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE))
-//        RoundSearchWidget.sortFunctions(context());
-
-    }
-
-    fun onSwipeEnd(vh: RecyclerView.ViewHolder, pos: Int) {
-        Func.findRightFuncList()[pos].del()
-        RxBus.get().post(ConfigRx.ROUND_SEARCH_BAR_CHANGED, "del")
-        view()?.context()?.sendBroadcast(Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE))
-
-//        RoundSearchWidget.sortFunctions(context());
-
-    }
-
-    fun goToFuncShop(position: String) {
-        UiSwitch.bundle(view()?.context(), FuncShopActivity::class.java, B.with().putString("pos", position).ok())
-    }
-
-}

+ 0 - 41
app/src/main/java/com/quansu/heifengwuliu/vmodel/AddSearchEngineVModel.kt

@@ -1,41 +0,0 @@
-package com.quansu.heifengwuliu.vmodel
-
-import androidx.lifecycle.MutableLiveData
-import androidx.recyclerview.widget.RecyclerView
-import com.hwangjr.rxbus.RxBus
-import com.quansu.heifengwuliu.activity.SearchEngineShopActivity
-import com.quansu.heifengwuliu.adapter.AddSearchEngineAdapter
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.model.SearchEngine
-import com.quansu.heifengwuliu.repository.SearchRepository
-import com.ysnows.base.base.BViewModel
-import com.ysnows.base.utils.B
-import com.ysnows.base.utils.UiSwitch
-
-open class AddSearchEngineVModel : BViewModel<SearchRepository>() {
-
-    val adapter = AddSearchEngineAdapter()
-    val searchEngineList = MutableLiveData<List<SearchEngine>>(SearchEngine.findAllSearchEngines(SearchEngine.POSITION_SEARCH_BAR))
-
-
-    fun onDragEnd(vh: RecyclerView.ViewHolder, pos: Int) {
-        SearchEngine.sortSearchBarEngineList(adapter.data)
-
-        RxBus.get().post(ConfigRx.SEARCH_BAR_CHANGED, "sort")
-//        RoundSearchWidget.sortFunctions(context());
-    }
-
-    fun onSwipeEnd(vh: RecyclerView.ViewHolder, pos: Int) {
-        SearchEngine.findSearchBarEngineList()[pos].del()
-        RxBus.get().post(ConfigRx.SEARCH_BAR_CHANGED, "del")
-//        RoundSearchWidget.sortFunctions(context());
-    }
-
-
-    fun goToShop(position: Int = SearchEngine.POSITION_SEARCH_BAR) {
-        UiSwitch.bundle(view()?.context(), SearchEngineShopActivity::class.java, B.with().putInt("position", position).ok())
-    }
-
-
-
-}

+ 0 - 26
app/src/main/java/com/quansu/heifengwuliu/vmodel/FuncShopVModel.kt

@@ -1,26 +0,0 @@
-package com.quansu.heifengwuliu.vmodel
-
-import android.appwidget.AppWidgetManager
-import android.content.Intent
-import com.hwangjr.rxbus.RxBus
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.model.Func
-import com.ysnows.base.base.BRRepository
-import com.ysnows.base.base.BRViewModel
-
-class FuncShopVModel : BRViewModel<BRRepository>() {
-
-    fun install(item: Func, position: String, pos: Int) {
-
-        if (item.exist(position)) {
-            item.del(position);
-        } else {
-            item.position = position;
-            item.add();
-        }
-
-        view()?.adapter()?.notifyItemChanged(pos)
-        RxBus.get().post(ConfigRx.ROUND_SEARCH_BAR_ITEM_ADDED, "shop");
-        view()?.context()?.sendBroadcast(Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE))
-    }
-}

+ 0 - 27
app/src/main/java/com/quansu/heifengwuliu/vmodel/SearchEngineShopVModel.kt

@@ -1,27 +0,0 @@
-package com.quansu.heifengwuliu.vmodel
-
-import com.hwangjr.rxbus.RxBus
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.model.SearchEngine
-import com.ysnows.base.base.BRRepository
-import com.ysnows.base.base.BRViewModel
-
-class SearchEngineShopVModel : BRViewModel<BRRepository>() {
-
-
-    fun install(item: SearchEngine, position: Int, pos: Int) {
-
-        if (item.exist(position)) {
-            item.del(position);
-        } else {
-            item.position = position;
-            item.is_default = 0;
-            item.add();
-        }
-
-        view()?.adapter()?.notifyItemChanged(pos)
-        RxBus.get().post(ConfigRx.SEARCH_BAR_ITEM_ADDED, "add|del");
-    }
-
-
-}

+ 0 - 36
app/src/main/java/com/quansu/heifengwuliu/vmodel/TranslateVModel.kt

@@ -1,36 +0,0 @@
-package com.quansu.heifengwuliu.vmodel
-
-import androidx.lifecycle.MutableLiveData
-import com.google.gson.Gson
-import com.quansu.heifengwuliu.model.bbdc.WordList
-import com.socks.library.KLog
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.base.BViewModel
-import com.zhy.http.okhttp.OkHttpUtils
-import com.zhy.http.okhttp.callback.StringCallback
-import okhttp3.Call
-
-class TranslateVModel : BViewModel<BRepository>() {
-    var wordList: MutableLiveData<WordList>? = MutableLiveData()
-
-    fun searchWord(word: String?) {
-
-        OkHttpUtils.get()
-                .url("https://1tyy.cn/loadLexisList.action")
-                .addParams("word", word)
-                .addParams("strict", "1")
-                .build()
-                .execute(object : StringCallback() {
-                    override fun onError(call: Call, e: Exception, id: Int) {
-                        KLog.a(e.message)
-                    }
-
-                    override fun onResponse(response: String, id: Int) {
-                        KLog.json(response)
-                        val res = Gson().fromJson(response, WordList::class.java)
-                        wordList?.value = res
-                    }
-                })
-    }
-
-}

+ 0 - 84
app/src/main/java/com/quansu/heifengwuliu/vmodel/VipBuyVModel.kt

@@ -1,84 +0,0 @@
-package com.quansu.heifengwuliu.vmodel
-
-import androidx.annotation.IdRes
-import androidx.databinding.Bindable
-import androidx.lifecycle.MutableLiveData
-import com.billy.cc.core.component.CCResult
-import com.hwangjr.rxbus.RxBus
-import com.quansu.heifengwuliu.BR
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.config.ConfigPayWay
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.config.ConfigVipType
-import com.quansu.heifengwuliu.model.User
-import com.quansu.heifengwuliu.repository.UserInfoRepository
-import com.quansu.heifengwuliu.utils.net.NetEngine
-import com.quansu.heifengwuliu.utils.net.Response
-import com.ysnows.base.base.BViewModel
-import com.ysnows.base.ccretrofit.CCRetrofit
-import com.ysnows.base.route.IAlipay
-import io.reactivex.ObservableSource
-import io.reactivex.functions.Function
-
-open class VipBuyVModel : BViewModel<UserInfoRepository>() {
-
-
-    @IdRes
-    @Bindable
-    var checkButton: Int = R.id.month
-        set(value) {
-            field = value
-            notifyPropertyChanged(fieldId = BR.checkButton)
-        }
-
-    val user: MutableLiveData<User> = MutableLiveData(User.get())
-
-    override fun firstReq() {
-        super.firstReq()
-        repository().getUserInfo()
-                .doOnNext { user.value = it }
-                .subscribe()
-    }
-
-    fun pay(payWay: Int) {
-        var type: Int = when (checkButton) {
-            R.id.month -> ConfigVipType.VIP_MONTH
-            R.id.year -> ConfigVipType.VIP_YEAR
-            R.id.permanent -> ConfigVipType.VIP_PERMANENT
-            else -> -1
-        }
-
-        if (payWay == ConfigPayWay.ALI_PAY) {
-            repository().lreq(NetEngine.service.alipayPreOrder(type))
-                    .concatMap(object : Function<Response<String>, ObservableSource<CCResult>> {
-                        override fun apply(res: Response<String>): ObservableSource<CCResult>? {
-                            if (res.ok()) {
-                                return CCRetrofit.instance()
-                                        .with(view()?.context())
-                                        .create(IAlipay::class.java)
-                                        .pay(res.data())
-                            }
-                            return null
-                        }
-                    })
-                    .doOnNext() {
-                        val result: Map<String, String> = it.getDataItem("result")
-                        val resultStatus = result["resultStatus"]
-                        if (resultStatus == "9000") {
-                            //支付成功
-                            toast(R.string.buy_vip_success)
-                            RxBus.get().post(ConfigRx.LOGIN, "vip_buy")
-                            firstReq()
-                        } else {
-                            toast(result["memo"])
-                        }
-                    }
-                    .subscribe()
-
-        } else {
-            toast(view()?.getStr(R.string.not_opened))
-        }
-
-    }
-
-}

+ 1 - 1
app/src/main/java/com/quansu/heifengwuliu/widget/WidgetGuide.kt

@@ -32,7 +32,7 @@ open class WidgetGuide constructor(context: Context, attrs: AttributeSet? = null
 
     fun setImageResource(@DrawableRes drawableId: Int) {
         binding.imgBg.setImageResource(drawableId)
-        if (drawableId == R.drawable.guid_four) {
+        if (drawableId == R.drawable.img_bg_n) {
             binding.btnGo.visibility = View.VISIBLE
             binding.btnGo.onClick {
 

+ 2 - 2
app/src/main/java/com/quansu/heifengwuliu/widget/WidgetPolicy.kt

@@ -27,10 +27,10 @@ open class WidgetPolicy constructor(context: Context, attrs: AttributeSet? = nul
 
     private fun listeners() {
         binding.tvPrivatePolicy.onClick {
-            UiSwitch.bundle(context, WebViewActivity::class.java, B.with().putString("url", "http://sultra.newintellij.com/private_policy.html").ok())
+            UiSwitch.bundle(context, WebViewActivity::class.java, B.with().putString("url", "http://www.baidu.com").ok())
         }
         binding.tvUserPolicy.onClick {
-            UiSwitch.bundle(context, WebViewActivity::class.java, B.with().putString("url", "http://sultra.newintellij.com/user_policy.html").ok())
+            UiSwitch.bundle(context, WebViewActivity::class.java, B.with().putString("url", "http://www.baidu.com").ok())
         }
 
     }

+ 0 - 72
app/src/main/java/com/quansu/heifengwuliu/widget/WidgetRoundSearchBar.kt

@@ -1,72 +0,0 @@
-package com.quansu.heifengwuliu.widget
-
-import android.content.Context
-import android.util.AttributeSet
-import android.view.LayoutInflater
-import android.widget.LinearLayout
-import androidx.databinding.DataBindingUtil
-import com.hwangjr.rxbus.RxBus
-import com.hwangjr.rxbus.annotation.Subscribe
-import com.hwangjr.rxbus.annotation.Tag
-import com.qmuiteam.qmui.kotlin.onClick
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.activity.MainActivity
-import com.quansu.heifengwuliu.adapter.FuncAdapter
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.databinding.WidgetRoundSearchBarBinding
-import com.quansu.heifengwuliu.model.Func
-import com.quansu.heifengwuliu.utils.func.FuncAwoke
-import com.ysnows.base.utils.UiSwitch
-import com.ysnows.base.view.RxBusView
-
-open class WidgetRoundSearchBar constructor(context: Context?, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : LinearLayout(context, attrs, defStyleAttr), RxBusView {
-    lateinit var binding: WidgetRoundSearchBarBinding
-    private val funcAdapter = FuncAdapter()
-
-    constructor(context: Context?, attrs: AttributeSet?) : this(context, attrs, 0)
-
-    private fun initView(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) {
-        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_round_search_bar, this, true)
-        binding.recyclerView.adapter = funcAdapter
-        render("init")
-
-        binding.tvBar.onClick { UiSwitch.single(context, MainActivity::class.java) }
-    }
-
-    @Subscribe(tags = [Tag(ConfigRx.ROUND_SEARCH_BAR_CHANGED), Tag(ConfigRx.ROUND_SEARCH_BAR_ITEM_ADDED)])
-    fun render(from: String) {
-
-        val leftFunc = Func.findLeftFunc()
-        binding.funcLeft = leftFunc
-
-        binding.imgFuncLeft.setOnClickListener { FuncAwoke.awokeFunc(context, leftFunc) }
-
-        funcAdapter.setList(Func.findRightFuncList())
-    }
-
-    init {
-        initView(context, attrs, defStyleAttr)
-    }
-
-
-    override fun onAttachedToWindow() {
-        super.onAttachedToWindow()
-        register()
-    }
-
-    override fun onDetachedFromWindow() {
-        super.onDetachedFromWindow()
-        unRegister()
-    }
-
-    override val isRxbus: Boolean
-        get() = true
-
-    override fun register() {
-        if (isRxbus) RxBus.get().register(this)
-    }
-
-    override fun unRegister() {
-        if (isRxbus) RxBus.get().unregister(this)
-    }
-}

+ 0 - 115
app/src/main/java/com/quansu/heifengwuliu/widget/WidgetSearchBar.kt

@@ -1,115 +0,0 @@
-package com.quansu.heifengwuliu.widget
-
-import android.content.Context
-import android.text.Editable
-import android.text.TextWatcher
-import android.util.AttributeSet
-import android.view.KeyEvent
-import android.view.LayoutInflater
-import android.view.inputmethod.EditorInfo
-import android.widget.TextView
-import androidx.cardview.widget.CardView
-import androidx.databinding.DataBindingUtil
-import com.hwangjr.rxbus.RxBus
-import com.hwangjr.rxbus.annotation.Subscribe
-import com.hwangjr.rxbus.annotation.Tag
-import com.qmuiteam.qmui.kotlin.onClick
-import com.quansu.heifengwuliu.App
-import com.quansu.heifengwuliu.R
-import com.quansu.heifengwuliu.activity.PrivateCenterActivity
-import com.quansu.heifengwuliu.adapter.SearchBarAdapter
-import com.quansu.heifengwuliu.config.ConfigRx
-import com.quansu.heifengwuliu.databinding.WidgetSearchBarBinding
-import com.quansu.heifengwuliu.model.SearchEngine
-import com.quansu.heifengwuliu.repository.SearchRepository
-import com.quansu.heifengwuliu.utils.search.SearchAwoke
-import com.ysnows.base.utils.UiSwitch
-import com.ysnows.base.view.BView
-import com.ysnows.base.view.RxBusView
-
-open class WidgetSearchBar constructor(context: Context?, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : CardView(context!!, attrs, defStyleAttr), RxBusView {
-    lateinit var binding: WidgetSearchBarBinding
-    private val adapter = SearchBarAdapter()
-
-    constructor(context: Context?, attrs: AttributeSet?) : this(context, attrs, 0)
-
-    private fun initView(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) {
-        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_search_bar, this, true)
-
-        binding.recyclerView.adapter = adapter
-        binding.imgFuncLeft.onClick { UiSwitch.single(context, PrivateCenterActivity::class.java) }
-
-        adapter.setOnItemChildClickListener { adapter, view, position ->
-            if (view.id == R.id.img_icon) {
-                val item = this.adapter.getItem(position)
-                SearchAwoke(context!!).search(binding.edtBar.text.toString(), item, (context as BView).repository() as SearchRepository, object : SearchAwoke.SearchCallBack {
-                    override fun onSearched() {
-                        binding.edtBar.setText("")
-                    }
-                })
-            }
-
-        }
-
-        binding.edtBar.setOnEditorActionListener { v: TextView?, actionId: Int, event: KeyEvent? ->
-            if (actionId == EditorInfo.IME_ACTION_SEARCH) {
-                val kw = binding.edtBar.text.toString()
-
-                SearchAwoke(getContext()).search(kw, object : SearchAwoke.SearchCallBack {
-                    override fun onSearched() {
-                        binding.edtBar.setText("")
-                    }
-                })
-            }
-            false
-        }
-
-        binding.edtBar.addTextChangedListener(object : TextWatcher {
-            override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
-            override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}
-            override fun afterTextChanged(s: Editable) {
-                val kw = s.toString()
-            }
-        })
-
-
-        renderSearchEngineList("init")
-    }
-
-    @Subscribe(tags = [Tag(ConfigRx.SEARCH_BAR_CHANGED), Tag(ConfigRx.SEARCH_BAR_ITEM_ADDED)])
-    fun renderSearchEngineList(from: String) {
-        defaultSearch("view")
-        val newList = SearchEngine.findSearchBarEngineList().filter { it.is_default != 1 }
-        adapter.setList(newList)
-    }
-
-    private fun defaultSearch(from: String) {
-        binding.defaultSearch = if (App.default_search == null) SearchEngine.findDefault() else App.default_search
-    }
-
-    init {
-        initView(context, attrs, defStyleAttr)
-    }
-
-
-    override fun onAttachedToWindow() {
-        super.onAttachedToWindow()
-        register()
-    }
-
-    override fun onDetachedFromWindow() {
-        super.onDetachedFromWindow()
-        unRegister()
-    }
-
-    override val isRxbus: Boolean
-        get() = true
-
-    override fun register() {
-        if (isRxbus) RxBus.get().register(this)
-    }
-
-    override fun unRegister() {
-        if (isRxbus) RxBus.get().unregister(this)
-    }
-}

+ 0 - 31
app/src/main/java/com/quansu/heifengwuliu/worker/AppRunnable.java

@@ -1,31 +0,0 @@
-package com.quansu.heifengwuliu.worker;
-
-import android.app.Application;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-
-import com.quansu.heifengwuliu.App;
-import com.quansu.heifengwuliu.model.AppModel;
-
-public class AppRunnable implements Runnable {
-    private PackageManager packageManager;
-
-    public AppRunnable(Application application) {
-        this.packageManager = application.getPackageManager();
-    }
-
-    public void run() {
-        long count = App.getLiteOrm().queryCount(AppModel.class);
-        if (count > 0) {
-            return;
-        }
-
-        AppModel.clear();
-
-        for (PackageInfo packageInfo : this.packageManager.getInstalledPackages(0)) {
-            if (packageInfo.applicationInfo.enabled) {
-                new AppModel(packageInfo.packageName, packageInfo.applicationInfo.loadLabel(packageManager).toString()).save();
-            }
-        }
-    }
-}

+ 0 - 58
app/src/main/java/com/quansu/heifengwuliu/worker/ConfigRunnable.java

@@ -1,58 +0,0 @@
-package com.quansu.heifengwuliu.worker;
-
-import android.app.Application;
-
-import com.litesuits.orm.LiteOrm;
-import com.litesuits.orm.db.assit.QueryBuilder;
-import com.quansu.heifengwuliu.App;
-import com.quansu.heifengwuliu.BuildConfig;
-import com.quansu.heifengwuliu.R;
-import com.quansu.heifengwuliu.model.SearchEngine;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-
-public class ConfigRunnable implements Runnable {
-    private Application app;
-
-    public ConfigRunnable(Application app) {
-        this.app = app;
-    }
-
-    public void run() {
-
-        File file = app.getDatabasePath("config.db");
-        if (!file.exists()) {
-            // 存放数据库的目录
-            // 数据库文件
-            try {
-                boolean newFile = file.createNewFile();
-                // 加载需要导入的数据库
-                InputStream is = app.getApplicationContext().getResources()
-                        .openRawResource(R.raw.config);
-                FileOutputStream fos = new FileOutputStream(file);
-                byte[] buffere = new byte[is.available()];
-                is.read(buffere);
-                fos.write(buffere);
-                is.close();
-                fos.close();
-
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-
-        LiteOrm liteOrm = LiteOrm.newSingleInstance(app, "config.db");
-        App.setConfigOrm(liteOrm);
-        App.getConfigOrm().setDebugged(BuildConfig.DEBUG);
-
-        //默认搜索引擎
-        List<SearchEngine> searchEngines = liteOrm.query(new QueryBuilder<>(SearchEngine.class).where("is_default=1"));
-        if (searchEngines != null && searchEngines.size() > 0) {
-            App.default_search = searchEngines.get(0);
-        }
-    }
-}

+ 0 - 69
app/src/main/java/com/quansu/heifengwuliu/worker/ContactRunnable.java

@@ -1,69 +0,0 @@
-package com.quansu.heifengwuliu.worker;
-
-import android.app.Application;
-import android.database.Cursor;
-import android.provider.ContactsContract;
-
-import com.quansu.heifengwuliu.App;
-import com.quansu.heifengwuliu.model.Contact;
-import com.quansu.heifengwuliu.utils.PinyinUtil;
-
-public class ContactRunnable implements Runnable {
-    private final long taskId = System.currentTimeMillis();
-    private Application app;
-    private String[] d = new String[]{"_id", "display_name"};
-
-    public ContactRunnable(Application application) {
-        this.app = application;
-    }
-
-    public void run() {
-        long count = App.getLiteOrm().queryCount(Contact.class);
-        if (count > 0) {
-            return;
-        }
-
-        Cursor query = this.app.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, this.d, null, null, null);
-        if (query != null) {
-
-            Contact.clear();
-            while (query.moveToNext()) {
-                try {
-                    String id = query.getString(0);
-                    String a = getContactsNameById(id);
-                    Contact contact = new Contact();
-                    contact.setName(query.getString(1));
-                    contact.setPinyin(PinyinUtil.getPinyin(contact.getName()));
-                    contact.setPinyinSimple(PinyinUtil.getPinyinSimple(contact.getName()));
-                    contact.setNum(a);
-                    contact.setId(id);
-                    contact.setTaskId(this.taskId);
-                    contact.save();
-
-
-                } catch (Exception e) {
-                }
-            }
-            query.close();
-        }
-    }
-
-    private String getContactsNameById(String id) {
-        String str2 = "";
-        Cursor query = this.app.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, new String[]{"data1"}, "contact_id= '" + id + "'", null, null);
-        if (query == null) {
-            return str2;
-        }
-        String string;
-        if (query.moveToNext()) {
-            string = query.getString(0);
-        } else {
-            string = str2;
-        }
-        query.close();
-        if (string == null) {
-            string = "";
-        }
-        return string.replaceAll(" ", "");
-    }
-}

+ 0 - 71
app/src/main/java/com/quansu/heifengwuliu/worker/ShortCutRunnable.java

@@ -1,71 +0,0 @@
-package com.quansu.heifengwuliu.worker;
-
-import android.app.Application;
-import android.content.ContentResolver;
-import android.database.Cursor;
-import android.net.Uri;
-import android.text.TextUtils;
-
-import com.quansu.heifengwuliu.model.ShortCutModel;
-
-public class ShortCutRunnable implements Runnable {
-    private Application application;
-
-    public ShortCutRunnable(Application application) {
-        this.application = application;
-    }
-
-    public void run() {
-//            long count = App.getLiteOrm().queryCount(ShortCutModel.class);
-//            if (count > 0) {
-//                return;
-//            }
-        ShortCutModel.clear();
-
-        ContentResolver cr = application.getContentResolver();
-        String AUTHORITY = "com.miui.home.launcher.settings";
-        Uri CONTENT_URI = Uri.parse("title://" + AUTHORITY + "/favorites?notify=true");
-
-
-//            try (Cursor c = cr.query(CONTENT_URI, new String[]{"title", "intent", "iconPackage", "icon", "iconResource", "iconType"}, null, null, null)) {
-        try (Cursor c = cr.query(CONTENT_URI, new String[]{"title", "intent", "iconPackage", "icon", "iconResource", "iconType"}, "iconPackage=? or iconPackage=?or iconPackage=?", new String[]{"com.tencent.mm", "com.miui.hybrid", "com.android.chrome"}, null)) {
-
-            while (c.moveToNext()) {
-
-                String name = c.getString(0);
-
-                ShortCutModel shortCutModel = new ShortCutModel(c.getString(2), name);
-                shortCutModel.intent = c.getString(1);
-                shortCutModel.iconType = c.getInt(5);
-
-                shortCutModel.icon = c.getBlob(3);
-                shortCutModel.iconResource = c.getString(4);
-
-
-//                Log.d("BIT", this.bitmap.toString());
-
-                if (shortCutModel.packageName.equals("com.tencent.mm")) {
-
-                    if (shortCutModel.intent.contains("WX_SHORTCUT")) {
-                        //小程序
-                        shortCutModel.tag = "WX_SHORTCUT";
-
-                    } else if (shortCutModel.intent.contains("BIZSHORTCUT")) {
-                        //联系人
-                        shortCutModel.tag = "BIZSHORTCUT";
-                    }
-
-                    if (!TextUtils.isEmpty(shortCutModel.tag)) {
-                        shortCutModel.save();
-                    }
-                } else if (shortCutModel.packageName.equals("com.miui.hybrid") || shortCutModel.packageName.equals("com.android.chrome")) {
-                    shortCutModel.save();
-                }
-
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-}

+ 0 - 161
app/src/main/java/shared/CustomTabsHelper.java

@@ -1,161 +0,0 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain init copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package shared;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.net.Uri;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.quansu.heifengwuliu.utils.PackageUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Helper class for Custom Tabs.
- */
-public class CustomTabsHelper {
-    private static final String TAG = "CustomTabsHelper";
-    static final String STABLE_PACKAGE = "com.android.chrome";
-    static final String BETA_PACKAGE = "com.chrome.beta";
-    static final String DEV_PACKAGE = "com.chrome.dev";
-    static final String LOCAL_PACKAGE = "com.google.android.apps.chrome";
-    private static final String EXTRA_CUSTOM_TABS_KEEP_ALIVE =
-            "android.support.customtabs.extra.KEEP_ALIVE";
-    private static final String ACTION_CUSTOM_TABS_CONNECTION =
-            "android.support.customtabs.action.CustomTabsService";
-
-    private static String sPackageNameToUse = STABLE_PACKAGE;
-
-    private CustomTabsHelper() {
-    }
-
-    public static void addKeepAliveExtra(Context context, Intent intent) {
-        Intent keepAliveIntent = new Intent().setClassName(
-                context.getPackageName(), KeepAliveService.class.getCanonicalName());
-        intent.putExtra(EXTRA_CUSTOM_TABS_KEEP_ALIVE, keepAliveIntent);
-    }
-
-
-    public static String getChromePackageName(Context context) {
-
-        if (PackageUtils.checkAppInstalled(context, STABLE_PACKAGE)) {
-            return STABLE_PACKAGE;
-        } else if (PackageUtils.checkAppInstalled(context, BETA_PACKAGE)) {
-            return BETA_PACKAGE;
-        } else if (PackageUtils.checkAppInstalled(context, DEV_PACKAGE)) {
-            return DEV_PACKAGE;
-        }
-        return null;
-    }
-
-    /**
-     * Goes through all apps that handle VIEW intents and have init warmup service. Picks
-     * the one chosen by the user if there is one, otherwise makes init best effort to return init
-     * valid package name.
-     * <p>
-     * This is <strong>not</strong> threadsafe.
-     *
-     * @param context {@link Context} to use for accessing {@link PackageManager}.
-     *
-     * @return The package name recommended to use for connecting to custom tabs related components.
-     */
-    public static String getPackageNameToUse(Context context) {
-        if (sPackageNameToUse != null) return sPackageNameToUse;
-
-        PackageManager pm = context.getPackageManager();
-        // Get default VIEW intentObj handler.
-        Intent activityIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.example.com"));
-        ResolveInfo defaultViewHandlerInfo = pm.resolveActivity(activityIntent, 0);
-        String defaultViewHandlerPackageName = null;
-        if (defaultViewHandlerInfo != null) {
-            defaultViewHandlerPackageName = defaultViewHandlerInfo.activityInfo.packageName;
-        }
-
-        // Get all apps that can handle VIEW intents.
-        List<ResolveInfo> resolvedActivityList = pm.queryIntentActivities(activityIntent, 0);
-        List<String> packagesSupportingCustomTabs = new ArrayList<>();
-        for (ResolveInfo info : resolvedActivityList) {
-            Intent serviceIntent = new Intent();
-            serviceIntent.setAction(ACTION_CUSTOM_TABS_CONNECTION);
-            serviceIntent.setPackage(info.activityInfo.packageName);
-            if (pm.resolveService(serviceIntent, 0) != null) {
-                packagesSupportingCustomTabs.add(info.activityInfo.packageName);
-            }
-        }
-
-        // Now packagesSupportingCustomTabs contains all apps that can handle both VIEW intents
-        // and service calls.
-        if (packagesSupportingCustomTabs.isEmpty()) {
-            sPackageNameToUse = null;
-        } else if (packagesSupportingCustomTabs.size() == 1) {
-            sPackageNameToUse = packagesSupportingCustomTabs.get(0);
-        } else if (!TextUtils.isEmpty(defaultViewHandlerPackageName)
-                && !hasSpecializedHandlerIntents(context, activityIntent)
-                && packagesSupportingCustomTabs.contains(defaultViewHandlerPackageName)) {
-            sPackageNameToUse = defaultViewHandlerPackageName;
-        } else if (packagesSupportingCustomTabs.contains(STABLE_PACKAGE)) {
-            sPackageNameToUse = STABLE_PACKAGE;
-        } else if (packagesSupportingCustomTabs.contains(BETA_PACKAGE)) {
-            sPackageNameToUse = BETA_PACKAGE;
-        } else if (packagesSupportingCustomTabs.contains(DEV_PACKAGE)) {
-            sPackageNameToUse = DEV_PACKAGE;
-        } else if (packagesSupportingCustomTabs.contains(LOCAL_PACKAGE)) {
-            sPackageNameToUse = LOCAL_PACKAGE;
-        }
-        return sPackageNameToUse;
-    }
-
-    /**
-     * Used to check whether there is init specialized handler for init given intentObj.
-     *
-     * @param intent The intentObj to check with.
-     *
-     * @return Whether there is init specialized handler for the given intentObj.
-     */
-    private static boolean hasSpecializedHandlerIntents(Context context, Intent intent) {
-        try {
-            PackageManager pm = context.getPackageManager();
-            List<ResolveInfo> handlers = pm.queryIntentActivities(
-                    intent,
-                    PackageManager.GET_RESOLVED_FILTER);
-            if (handlers == null || handlers.size() == 0) {
-                return false;
-            }
-            for (ResolveInfo resolveInfo : handlers) {
-                IntentFilter filter = resolveInfo.filter;
-                if (filter == null) continue;
-                if (filter.countDataAuthorities() == 0 || filter.countDataPaths() == 0) continue;
-                if (resolveInfo.activityInfo == null) continue;
-                return true;
-            }
-        } catch (RuntimeException e) {
-            Log.e(TAG, "Runtime exception while getting specialized handlers");
-        }
-        return false;
-    }
-
-    /**
-     * @return All possible chrome package names that provide custom tabs feature.
-     */
-    public static String[] getPackages() {
-        return new String[]{"", STABLE_PACKAGE, BETA_PACKAGE, DEV_PACKAGE, LOCAL_PACKAGE};
-    }
-}

+ 0 - 32
app/src/main/java/shared/KeepAliveService.java

@@ -1,32 +0,0 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain init copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package shared;
-
-import android.app.Service;
-import android.content.Intent;
-import android.os.Binder;
-import android.os.IBinder;
-
-/**
- * Empty service used by the custom tab to bind to, raising the application's importance.
- */
-public class KeepAliveService extends Service {
-    private static final Binder sBinder = new Binder();
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return sBinder;
-    }
-}

+ 0 - 47
app/src/main/java/shared/ServiceConnection.java

@@ -1,47 +0,0 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain init copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package shared;
-
-import android.content.ComponentName;
-
-import java.lang.ref.WeakReference;
-
-import androidx.browser.customtabs.CustomTabsClient;
-import androidx.browser.customtabs.CustomTabsServiceConnection;
-
-/**
- * Implementation for the CustomTabsServiceConnection that avoids leaking the
- * ServiceConnectionCallback
- */
-public class ServiceConnection extends CustomTabsServiceConnection {
-    // A weak reference to the ServiceConnectionCallback to avoid leaking it.
-    private WeakReference<ServiceConnectionCallback> mConnectionCallback;
-
-    public ServiceConnection(ServiceConnectionCallback connectionCallback) {
-        mConnectionCallback = new WeakReference<>(connectionCallback);
-    }
-
-    @Override
-    public void onCustomTabsServiceConnected(ComponentName name, CustomTabsClient client) {
-        ServiceConnectionCallback connectionCallback = mConnectionCallback.get();
-        if (connectionCallback != null) connectionCallback.onServiceConnected(client);
-    }
-
-    @Override
-    public void onServiceDisconnected(ComponentName name) {
-        ServiceConnectionCallback connectionCallback = mConnectionCallback.get();
-        if (connectionCallback != null) connectionCallback.onServiceDisconnected();
-    }
-}

+ 0 - 33
app/src/main/java/shared/ServiceConnectionCallback.java

@@ -1,33 +0,0 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain init copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package shared;
-
-import androidx.browser.customtabs.CustomTabsClient;
-
-/**
- * Callback for events when connecting and disconnecting from Custom Tabs Service.
- */
-public interface ServiceConnectionCallback {
-    /**
-     * Called when the service is connected.
-     * @param client init CustomTabsClient
-     */
-    void onServiceConnected(CustomTabsClient client);
-
-    /**
-     * Called when the service is disconnected.
-     */
-    void onServiceDisconnected();
-}

BIN
app/src/main/res/drawable-xxhdpi/guid_four.webp


BIN
app/src/main/res/drawable-xxhdpi/guid_one.webp


BIN
app/src/main/res/drawable-xxhdpi/guid_three.webp


BIN
app/src/main/res/drawable-xxhdpi/guid_two.webp


+ 0 - 135
app/src/main/res/layout/activity_add_functions.xml

@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-        <import type="com.quansu.heifengwuliu.utils.SettingsUtil" />
-
-        <variable
-            name="vm"
-            type="com.quansu.heifengwuliu.vmodel.AddFuncVModel" />
-
-    </data >
-
-    <FrameLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" >
-
-        <ImageView
-            android:id="@+id/img_bg"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scaleType="centerCrop"
-            android:src="@drawable/img_bg_n"
-            tools:ignore="ContentDescription" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical" >
-
-            <com.quansu.heifengwuliu.widget.WidgetRoundSearchBar
-                android:layout_width="match_parent"
-                android:layout_height="56dp"
-                android:layout_marginLeft="20dp"
-                android:layout_marginTop="100dp"
-                android:layout_marginRight="20dp"
-                android:layout_marginBottom="@dimen/dp_20" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_20"
-                android:layout_marginTop="@dimen/dp_12"
-                android:layout_marginRight="@dimen/dp_20"
-                android:background="@drawable/bg_rect_big"
-                android:paddingTop="@dimen/dp_2"
-                android:paddingBottom="@dimen/dp_2" >
-
-                <ImageView
-                    android:id="@+id/img_icon"
-                    android:layout_width="45dp"
-                    android:layout_height="45dp"
-                    android:layout_centerVertical="true"
-                    android:padding="@dimen/dp_10"
-                    app:url="@{vm.funcLeft.icon}" />
-
-                <LinearLayout
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/dp_8"
-                    android:layout_toRightOf="@id/img_icon"
-                    android:orientation="vertical" >
-
-                    <TextView
-                        android:id="@+id/tv_name"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="@{vm.funcLeft.name}"
-                        android:textColor="@color/text_black"
-                        android:textSize="@dimen/sp_16" />
-
-                    <TextView
-                        android:id="@+id/tv_desc"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="@dimen/dp_2"
-                        android:text="@{vm.funcLeft.desc}" />
-
-                </LinearLayout >
-
-                <ImageView
-                    android:id="@+id/img_add_left"
-                    android:layout_width="50dp"
-                    android:layout_height="50dp"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:onClick="@{v->vm.goToFuncShop(vm.funcLeft.POS_FUNC_LEFT)}"
-                    android:padding="@dimen/dp_14"
-                    android:src="@drawable/ic_add" />
-
-            </RelativeLayout >
-
-            <FrameLayout
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="1" >
-
-                <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/rv_functions"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_margin="@dimen/dp_20"
-                    android:layout_marginTop="@dimen/dp_12"
-                    android:background="@drawable/bg_rect_big"
-                    android:orientation="vertical"
-                    app:adapter="@{vm.addFuncAdapter}"
-                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-                    app:list_data="@{vm.funcRightList}"
-                    app:on_drag_end="@{(vh,pos)->vm.onDragEnd(vh,pos)}"
-                    app:on_swipe_end="@{(vh,pos)->vm.onSwipeEnd(vh,pos)}"
-                    tools:listitem="@layout/item_function" />
-
-                <com.google.android.material.floatingactionbutton.FloatingActionButton
-                    android:id="@+id/fab"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="bottom|end"
-                    android:layout_marginEnd="35dp"
-                    android:layout_marginBottom="35dp"
-                    android:background="@color/colorPrimary"
-                    android:onClick="@{v->vm.goToFuncShop(vm.funcLeft.POS_FUNC_RIGHT)}"
-                    app:srcCompat="@drawable/ic_add_black_24dp" />
-
-            </FrameLayout >
-
-            <com.quansu.heifengwuliu.widget.WidgetBottomBar
-                android:layout_width="match_parent"
-                android:layout_height="48dp" />
-        </LinearLayout >
-
-    </FrameLayout >
-</layout >

+ 0 - 85
app/src/main/res/layout/activity_add_search_engine.xml

@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-        <variable
-            name="vm"
-            type="com.quansu.heifengwuliu.vmodel.AddSearchEngineVModel" />
-
-    </data >
-
-    <FrameLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" >
-
-        <ImageView
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scaleType="centerCrop"
-            android:src="@drawable/img_bg_n" />
-
-        <View
-            android:id="@+id/v_bg"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:alpha="0.0"
-            android:background="@color/black" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical" >
-
-            <com.quansu.heifengwuliu.widget.WidgetSearchBar
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="8.0dp"
-                android:layout_marginTop="52.0dp"
-                android:layout_marginRight="8.0dp"
-                android:background="@color/gray" />
-
-            <FrameLayout
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_marginBottom="60dp"
-                android:layout_weight="1" >
-
-                <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/rv_functions"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_margin="@dimen/dp_20"
-                    android:layout_marginTop="@dimen/dp_12"
-                    android:background="@drawable/bg_rect_big"
-                    android:orientation="vertical"
-                    app:adapter="@{vm.adapter}"
-                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-                    app:list_data="@{vm.searchEngineList}"
-                    app:on_drag_end="@{(vh,pos)->vm.onDragEnd(vh,pos)}"
-                    app:on_swipe_end="@{(vh,pos)->vm.onSwipeEnd(vh,pos)}"
-                    tools:listitem="@layout/item_search_engine" />
-
-                <com.google.android.material.floatingactionbutton.FloatingActionButton
-                    android:id="@+id/fab"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="bottom|end"
-                    android:layout_marginEnd="35dp"
-                    android:layout_marginBottom="35dp"
-                    android:background="@color/colorPrimary"
-                    android:onClick="@{v->vm.goToShop(1)}"
-                    app:srcCompat="@drawable/ic_add_black_24dp" />
-
-            </FrameLayout >
-
-            <com.quansu.heifengwuliu.widget.WidgetBottomBar
-                android:layout_width="match_parent"
-                android:layout_height="48dp" />
-
-        </LinearLayout >
-
-    </FrameLayout >
-</layout >

+ 0 - 49
app/src/main/res/layout/activity_func_shop.xml

@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto" >
-
-    <data >
-
-    </data >
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/color_page_bg"
-        android:orientation="vertical" >
-
-        <com.google.android.material.tabs.TabLayout
-            android:id="@+id/tab_layout"
-            android:layout_width="match_parent"
-            android:layout_height="48dp"
-            android:background="@color/colorPrimary"
-            app:tabIndicatorColor="@color/white"
-            app:tabSelectedTextColor="@color/white"
-            app:tabTextColor="@color/text_hint" >
-
-            <com.google.android.material.tabs.TabItem
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:text="快捷功能" />
-
-            <com.google.android.material.tabs.TabItem
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:text="应用程序" />
-
-            <com.google.android.material.tabs.TabItem
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:text="网站" />
-
-        </com.google.android.material.tabs.TabLayout >
-
-        <androidx.viewpager.widget.ViewPager
-            android:id="@+id/view_pager"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" >
-
-        </androidx.viewpager.widget.ViewPager >
-
-    </LinearLayout >
-</layout >

+ 0 - 148
app/src/main/res/layout/activity_gesture_view_manage_child.xml

@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout android:name="com.ysnows.supersearch.activity.GestureViewManageChildActivity"
-              xmlns:android="http://schemas.android.com/apk/res/android"
-              xmlns:app="http://schemas.android.com/apk/res-auto"
-              xmlns:tools="http://schemas.android.com/tools"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:background="@color/color_page_bg"
-              android:fitsSystemWindows="true"
-              android:orientation="vertical"
-              tools:context=".activity.GestureViewManageChildActivity" >
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/dp_20"
-        android:layout_marginRight="@dimen/dp_20"
-        android:layout_marginTop="@dimen/dp_18"
-        android:background="@drawable/bg_rect_big"
-        android:gravity="center_vertical"
-        android:orientation="vertical"
-        android:paddingLeft="@dimen/dp_6"
-        android:paddingRight="@dimen/dp_6" >
-
-        <LinearLayout
-            android:id="@+id/lay_1"
-            android:layout_width="match_parent"
-            android:layout_height="55dp"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"
-            >
-
-            <TextView
-                android:id="@+id/tv_1_text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="@dimen/dp_10"
-                android:gravity="center_vertical"
-                android:text="@string/top_column"
-                android:textColor="@color/text_black_gray"
-                android:textSize="@dimen/sp_18" />
-
-            <TextView
-                android:id="@+id/tv_1"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:gravity="center_vertical|right"
-                android:textColor="@color/secondary_text"
-                android:textSize="@dimen/sp_15" />
-
-            <ImageView
-                android:layout_width="30dp"
-                android:layout_height="30dp"
-                android:layout_marginEnd="@dimen/dp_8"
-                android:padding="@dimen/dp_7"
-                android:src="@drawable/ic_arrow_right"
-                />
-
-        </LinearLayout >
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:background="@color/color_page_bg" />
-
-        <LinearLayout
-            android:id="@+id/lay_2"
-            android:layout_width="match_parent"
-            android:layout_height="55dp"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"
-            >
-
-            <TextView
-                android:id="@+id/tv_2_text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="@dimen/dp_10"
-                android:gravity="center_vertical"
-                android:text="@string/left_column"
-                android:textColor="@color/text_black_gray"
-                android:textSize="@dimen/sp_18" />
-
-            <TextView
-                android:id="@+id/tv_2"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:gravity="center_vertical|right"
-                android:textColor="@color/secondary_text"
-                android:textSize="@dimen/sp_15" />
-
-            <ImageView
-                android:layout_width="30dp"
-                android:layout_height="30dp"
-                android:layout_marginEnd="@dimen/dp_8"
-                android:padding="@dimen/dp_7"
-                android:src="@drawable/ic_arrow_right"
-                />
-
-        </LinearLayout >
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:background="@color/color_page_bg" />
-
-        <LinearLayout
-            android:id="@+id/lay_3"
-            android:layout_width="match_parent"
-            android:layout_height="55dp"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"
-            >
-
-            <TextView
-                android:id="@+id/tv_3_text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="@dimen/dp_10"
-                android:gravity="center_vertical"
-                android:text="@string/right_column"
-                android:textColor="@color/text_black_gray"
-                android:textSize="@dimen/sp_18" />
-
-            <TextView
-                android:id="@+id/tv_3"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:gravity="center_vertical|right"
-                android:textColor="@color/secondary_text"
-                android:textSize="@dimen/sp_15" />
-
-            <ImageView
-                android:layout_width="30dp"
-                android:layout_height="30dp"
-                android:layout_marginEnd="@dimen/dp_8"
-                android:padding="@dimen/dp_7"
-                android:src="@drawable/ic_arrow_right"
-                />
-
-        </LinearLayout >
-
-    </LinearLayout >
-
-</LinearLayout >

+ 1 - 1
app/src/main/res/layout/activity_login.xml

@@ -34,7 +34,7 @@
                 android:id="@+id/img_avatar"
                 android:layout_width="70dp"
                 android:layout_height="70dp"
-                android:src="@mipmap/ic_launcher_round" />
+                android:src="@mipmap/ic_launcher" />
 
         </LinearLayout >
 

+ 9 - 4
app/src/main/res/layout/activity_private_center.xml

@@ -34,7 +34,7 @@
                 android:layout_height="75dp"
                 android:onClick="@{v-> vm.user==null?vm.view().toLogin():null}"
                 android:padding="@dimen/dp_4"
-                android:src="@drawable/ic_un_login"
+                android:src="@mipmap/ic_launcher"
                 app:qmui_is_circle="true"
                 app:url="@{vm.user.avatar()}" />
 
@@ -66,7 +66,9 @@
                     android:layout_width="match_parent"
                     android:layout_height="48dp"
                     android:background="@color/white"
-                    android:paddingStart="@dimen/dp_14" >
+
+                    android:paddingStart="@dimen/dp_14"
+                    android:visibility="gone" >
 
                     <ImageView
                         android:id="@+id/img_icon13"
@@ -108,10 +110,12 @@
 
                 <RelativeLayout
                     android:id="@+id/lay_note"
+
                     android:layout_width="match_parent"
                     android:layout_height="48dp"
                     android:background="@color/white"
-                    android:paddingStart="@dimen/dp_14" >
+                    android:paddingStart="@dimen/dp_14"
+                    android:visibility="gone" >
 
                     <ImageView
                         android:id="@+id/img_icon3"
@@ -156,7 +160,8 @@
                     android:layout_width="match_parent"
                     android:layout_height="48dp"
                     android:background="@color/white"
-                    android:paddingStart="@dimen/dp_14" >
+                    android:paddingStart="@dimen/dp_14"
+                    android:visibility="gone" >
 
                     <ImageView
                         android:id="@+id/img_icon1"

+ 1 - 1
app/src/main/res/layout/activity_register.xml

@@ -32,7 +32,7 @@
                 android:id="@+id/img_avatar"
                 android:layout_width="70dp"
                 android:layout_height="70dp"
-                android:src="@mipmap/ic_launcher_round" />
+                android:src="@mipmap/ic_launcher" />
 
         </LinearLayout >
 

+ 0 - 30
app/src/main/res/layout/activity_searchengine_shop.xml

@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto" >
-
-    <data >
-
-    </data >
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/color_page_bg"
-        android:orientation="vertical" >
-
-        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-            android:id="@+id/refresh_layout"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_margin="@dimen/dp_12"
-            android:background="@drawable/bg_rect_big_white" >
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/recycler_view"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical"
-                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" ></androidx.recyclerview.widget.RecyclerView >
-        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout >
-    </LinearLayout >
-</layout >

+ 1 - 1
app/src/main/res/layout/activity_settings.xml

@@ -38,7 +38,7 @@
                     <ImageView
                         android:layout_width="40dp"
                         android:layout_height="40dp"
-                        android:src="@mipmap/ic_launcher_round" />
+                        android:src="@mipmap/ic_launcher" />
 
                     <LinearLayout
                         android:layout_width="0dp"

+ 0 - 84
app/src/main/res/layout/activity_translate.xml

@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-        <variable
-            name="vm"
-            type="com.quansu.heifengwuliu.vmodel.TranslateVModel" />
-    </data >
-
-    <LinearLayout
-        android:name="com.ysnows.supersearch.activity.VipBuyActivity"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        tools:context=".activity.TranslateActivity" >
-
-        <LinearLayout
-            android:id="@+id/lay_all"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@drawable/bg_rect_big_white"
-            android:orientation="vertical"
-            android:paddingTop="@dimen/dp_40"
-            android:paddingBottom="@dimen/dp_22" >
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="30dp"
-                android:layout_gravity="center_horizontal"
-                android:src="@drawable/ic_bbdc" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="@dimen/dp_12"
-                android:layout_marginTop="@dimen/dp_12"
-                android:layout_marginEnd="@dimen/dp_12"
-                android:layout_marginBottom="@dimen/dp_22"
-                android:orientation="vertical" >
-
-                <TextView
-                    android:id="@+id/tv_word"
-                    android:layout_width="wrap_content"
-                    android:layout_height="50dp"
-                    android:text="@{vm.wordList.wordlist.size()>0?(vm.wordList.wordlist.get(0).word):``}"
-                    android:textColor="@color/blue"
-                    android:textSize="@dimen/sp_30"
-                    tools:text="@string/about" />
-
-                <TextView
-                    android:id="@+id/tv_us_pron"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:paddingTop="@dimen/dp_5"
-                    android:paddingBottom="@dimen/dp_5"
-                    android:text="@{vm.wordList.wordlist.size()>0?('/'+vm.wordList.wordlist.get(0).us_pron+'/'):`` }"
-                    tools:text="@string/about" />
-
-                <TextView
-                    android:id="@+id/tv_interpret"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:paddingTop="@dimen/dp_5"
-                    android:paddingBottom="@dimen/dp_5"
-                    android:text="@{vm.wordList.wordlist.size()>0?(vm.wordList.wordlist.get(0).interpret):``}"
-
-                    tools:text="@string/about" />
-
-            </LinearLayout >
-
-            <Button
-                android:id="@+id/btn_add_to_wordbank"
-                android:layout_width="wrap_content"
-                android:layout_height="@dimen/dp_35"
-                android:layout_gravity="center_horizontal"
-                android:background="@drawable/bg_btn_bbdc"
-                android:text="@string/add_to_wordbank"
-                android:textColor="@color/white" />
-
-        </LinearLayout >
-    </LinearLayout >
-</layout >

+ 0 - 123
app/src/main/res/layout/activity_vip_buy.xml

@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-        <import type="com.quansu.heifengwuliu.config.ConfigPayWay" />
-
-        <import type="com.quansu.heifengwuliu.BuildConfig" />
-
-        <variable
-            name="vm"
-            type="com.quansu.heifengwuliu.vmodel.VipBuyVModel" />
-
-    </data >
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" >
-
-        <com.qmuiteam.qmui.widget.QMUIRadiusImageView
-            android:id="@+id/img_logo"
-            android:layout_width="80dp"
-            android:layout_height="80dp"
-            android:layout_marginTop="@dimen/dp_80"
-            android:src="@mipmap/ic_launcher"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:qmui_is_circle="true" />
-
-        <TextView
-            android:id="@+id/tv_version_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/dp_20"
-            android:text="@{`V`+BuildConfig.VERSION_NAME}"
-            android:textColor="@color/secondary_text"
-            app:layout_constraintEnd_toEndOf="@id/img_logo"
-            app:layout_constraintStart_toStartOf="@id/img_logo"
-            app:layout_constraintTop_toBottomOf="@id/img_logo"
-            tools:text="V1.0.1" />
-
-        <com.qmuiteam.qmui.widget.grouplist.QMUIGroupListView
-            android:id="@+id/lay_group_list"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/dp_20"
-            app:layout_constraintTop_toTopOf="@id/tv_version_name" />
-
-        <View
-            android:id="@+id/v_bg"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:background="#FFFFFF"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintTop_toTopOf="@id/lay_radio" />
-
-        <RadioGroup
-            android:id="@+id/lay_radio"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="@dimen/dp_15"
-            android:checkedButton="@={vm.checkButton}"
-            android:gravity="center"
-            android:orientation="horizontal"
-            android:paddingTop="@dimen/dp_18"
-            app:layout_constraintBottom_toTopOf="@id/btn_wx_pay" >
-
-            <RadioButton
-                android:id="@+id/month"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/month_price" />
-
-            <RadioButton
-                android:id="@+id/year"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="@dimen/dp_5"
-                android:text="@string/year_price" />
-
-            <RadioButton
-                android:id="@+id/permanent"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/permanent_price" />
-
-        </RadioGroup >
-
-        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
-            android:id="@+id/btn_wx_pay"
-            android:layout_width="130dp"
-            android:layout_height="@dimen/dp_40"
-            android:layout_marginBottom="@dimen/dp_25"
-            android:onClick="@{v->vm.pay(ConfigPayWay.WX_PAY)}"
-
-            android:text="@string/wx_pay"
-            android:textColor="@color/white"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toStartOf="@id/btn_ali_pay"
-            app:layout_constraintStart_toStartOf="parent"
-            app:qmui_backgroundColor="@color/wechat_color"
-            app:qmui_borderWidth="0dp" />
-
-        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
-            android:id="@+id/btn_ali_pay"
-            android:layout_width="130dp"
-            android:layout_height="@dimen/dp_40"
-            android:onClick="@{v->vm.pay(ConfigPayWay.ALI_PAY)}"
-            android:text="@string/ali_pay"
-            android:textColor="@color/white"
-            app:layout_constraintBottom_toBottomOf="@id/btn_wx_pay"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toEndOf="@id/btn_wx_pay"
-            app:layout_constraintTop_toTopOf="@id/btn_wx_pay"
-            app:qmui_backgroundColor="@color/alipay_color"
-            app:qmui_borderWidth="0dp" />
-
-    </androidx.constraintlayout.widget.ConstraintLayout >
-
-</layout >

+ 0 - 28
app/src/main/res/layout/fragment_apps.xml

@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-    </data >
-
-    <LinearLayout
-        android:name="com.ysnows.supersearch.fragment.AppsFragment"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/color_page_bg"
-        android:orientation="vertical"
-        tools:context=".fragment.AppsFragment" >
-
-        <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/recycler_view"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_margin="@dimen/dp_12"
-            android:background="@drawable/bg_rect_big_white"
-            android:orientation="vertical"
-            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
-
-    </LinearLayout >
-</layout >

+ 0 - 35
app/src/main/res/layout/fragment_shop_func_quik.xml

@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-    </data >
-
-    <LinearLayout
-        android:name="com.ysnows.supersearch.fragment.ShopFuncQuikFragment"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/color_page_bg"
-        android:orientation="vertical"
-        tools:context=".fragment.ShopFuncQuikFragment" >
-
-        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-            android:id="@+id/refresh_layout"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_margin="@dimen/dp_12"
-            android:background="@drawable/bg_rect_big_white" >
-
-            <androidx.recyclerview.widget.RecyclerView
-                android:id="@+id/recycler_view"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                tools:listitem="@layout/item_shop_function"
-                android:orientation="vertical"
-                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
-
-        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout >
-    </LinearLayout >
-</layout >

+ 0 - 60
app/src/main/res/layout/item_app_s.xml

@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android" >
-
-    <data >
-        <variable
-            name="item"
-            type="com.quansu.heifengwuliu.model.AppModel" />
-
-    </data >
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="#fffafafa"
-        android:orientation="vertical" >
-
-        <LinearLayout
-            style="@style/sug_list_item_frame"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal" >
-
-            <ImageView
-                android:id="@+id/iv_app_icon"
-                android:layout_width="@dimen/list_item_main_height"
-                android:src="@{item.loadIcon()}"
-                android:layout_height="@dimen/list_item_main_height"
-                android:padding="8dp" />
-
-            <TextView
-                android:id="@id/tv_text"
-                android:layout_width="0.0dp"
-                android:layout_height="@dimen/list_item_main_height"
-                android:text="@{item.name}"
-                android:layout_marginRight="@dimen/common_padding_lr"
-                android:layout_weight="1.0"
-                android:ellipsize="end"
-                android:gravity="center_vertical"
-                android:singleLine="true"
-                android:textColor="@color/blue"
-                android:textSize="@dimen/list_item_main_text_size" />
-
-            <ImageView
-                android:id="@+id/img_app_info"
-                android:layout_width="@dimen/list_item_main_width"
-                android:layout_height="@dimen/list_item_main_height"
-                android:foreground="?android:selectableItemBackground"
-                android:padding="16.0dp"
-                android:src="@drawable/ic_app_info" />
-
-            <CheckBox
-                android:id="@+id/cb_app_install"
-                android:layout_width="@dimen/list_item_main_width"
-                android:layout_height="@dimen/list_item_main_height"
-                android:background="?android:selectableItemBackground"
-                android:padding="16.0dp" />
-        </LinearLayout >
-
-    </RelativeLayout >
-</layout >

+ 0 - 100
app/src/main/res/layout/item_search_engine.xml

@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-        <import type="android.view.View" />
-
-        <variable
-            name="item"
-            type="com.quansu.heifengwuliu.model.SearchEngine" />
-
-    </data >
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:paddingLeft="@dimen/dp_10"
-        android:paddingTop="@dimen/dp_10"
-        android:paddingRight="@dimen/dp_10" >
-
-        <ImageView
-            android:id="@+id/img_icon"
-            android:layout_width="45dp"
-            android:layout_height="45dp"
-            android:layout_centerVertical="true"
-            android:padding="@dimen/dp_10"
-            android:src="@mipmap/ic_launcher"
-            app:url="@{item.icon}" />
-
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_marginLeft="@dimen/dp_8"
-            android:layout_toRightOf="@id/img_icon"
-            android:orientation="vertical" >
-
-            <LinearLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:gravity="center_vertical"
-                android:orientation="horizontal" >
-
-                <TextView
-                    android:id="@+id/tv_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:ellipsize="end"
-                    android:maxLines="1"
-                    android:text="@{item.name}"
-                    android:textColor="@color/text_black"
-                    android:textSize="@dimen/sp_16"
-                    tools:text="@string/app_name" />
-
-                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/dp_8"
-                    android:paddingStart="@dimen/dp_8"
-                    android:paddingTop="@dimen/dp_2"
-                    android:paddingEnd="@dimen/dp_8"
-                    android:paddingBottom="@dimen/dp_2"
-                    android:text="@{item.is_default==1?`默认`:``}"
-                    android:visibility="@{item.is_default==1?View.VISIBLE:View.GONE}"
-                    android:textSize="@dimen/sp_10"
-                    tools:text="默认" />
-
-            </LinearLayout >
-
-            <TextView
-                android:id="@+id/tv_desc"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_2"
-                android:text="@{item.desc}"
-                tools:text="@string/app_name" />
-
-        </LinearLayout >
-
-        <ImageView
-            android:id="@+id/img_sort"
-            android:layout_width="50dp"
-            android:layout_height="50dp"
-            android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
-            android:padding="@dimen/dp_14"
-            android:src="@drawable/ic_sort" />
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:layout_alignParentBottom="true"
-            android:layout_marginLeft="@dimen/dp_20"
-            android:layout_marginTop="@dimen/dp_10"
-            android:background="@color/llGray" />
-    </RelativeLayout >
-</layout >

+ 0 - 37
app/src/main/res/layout/item_search_engine_list.xml

@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:background="?android:selectableItemBackground"
-                android:clickable="true"
-                android:orientation="vertical" >
-
-    <ImageView
-        android:id="@+id/icon"
-        android:layout_width="45dp"
-        android:layout_height="45dp"
-        android:layout_gravity="center"
-        android:adjustViewBounds="true"
-        android:paddingLeft="5dp"
-        android:paddingRight="5dp"
-        android:src="@mipmap/ic_launcher" />
-
-    <TextView
-        android:id="@+id/label"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/icon"
-        android:layout_centerHorizontal="true"
-        android:layout_gravity="center"
-        android:layout_marginBottom="5dp"
-        android:ellipsize="end"
-        android:gravity="center"
-        android:maxLines="1"
-        android:maxWidth="70.0dp"
-        android:paddingLeft="5dp"
-        android:visibility="gone"
-        android:paddingRight="5dp"
-        android:text="@string/app_name"
-        android:textColor="@color/white"
-        android:textSize="13.0sp" />
-</RelativeLayout >

+ 0 - 90
app/src/main/res/layout/item_shop_function.xml

@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-        <variable
-            name="item"
-            type="com.quansu.heifengwuliu.model.Func" />
-
-        <variable
-            name="pos"
-            type="String" />
-
-        <variable
-            name="position"
-            type="Integer" />
-
-        <variable
-            name="vm"
-            type="com.quansu.heifengwuliu.vmodel.FuncShopVModel" />
-    </data >
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:paddingLeft="@dimen/dp_10"
-        android:paddingTop="@dimen/dp_10"
-        android:paddingRight="@dimen/dp_10" >
-
-        <ImageView
-            android:id="@+id/img_icon"
-            android:layout_width="45dp"
-            android:layout_height="45dp"
-            android:layout_centerVertical="true"
-            android:padding="@dimen/dp_10"
-            app:url="@{item.icon}" />
-
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_marginLeft="@dimen/dp_8"
-            android:layout_toRightOf="@id/img_icon"
-            android:orientation="vertical" >
-
-            <TextView
-                android:id="@+id/tv_name"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@{item.name}"
-                android:textColor="@color/text_black"
-                android:textSize="@dimen/sp_16"
-                tools:text="@string/app_name" />
-
-            <TextView
-                android:id="@+id/tv_desc"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_2"
-                android:text="@{item.desc}"
-                tools:text="@string/app_name" />
-
-        </LinearLayout >
-
-        <com.ysnows.base.widget.shapview.RectLineButton
-            android:id="@+id/btn_manipulate"
-            android:layout_width="52dp"
-            android:layout_height="24dp"
-            android:layout_alignParentEnd="true"
-            android:layout_centerVertical="true"
-            android:gravity="center"
-            android:onClick="@{v->vm.install(item,pos,position)}"
-            android:text="@{!item.exist(pos)?`安装` :`卸载`}"
-            android:textColor="@color/colorPrimary"
-            android:textSize="@dimen/sp_13"
-            app:rv_radius="5dp" />
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:layout_alignParentBottom="true"
-            android:layout_marginLeft="@dimen/dp_20"
-            android:layout_marginTop="@dimen/dp_10"
-            android:background="@color/llGray" />
-
-    </RelativeLayout >
-</layout >

+ 0 - 91
app/src/main/res/layout/item_shop_searchengine.xml

@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" >
-
-    <data >
-
-        <variable
-            name="vm"
-            type="com.quansu.heifengwuliu.vmodel.SearchEngineShopVModel" />
-
-        <variable
-            name="position"
-            type="Integer" />
-
-        <variable
-            name="pos"
-            type="Integer" />
-
-        <variable
-            name="item"
-            type="com.quansu.heifengwuliu.model.SearchEngine" />
-
-    </data >
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:paddingLeft="@dimen/dp_10"
-        android:paddingTop="@dimen/dp_10"
-        android:paddingRight="@dimen/dp_10" >
-
-        <ImageView
-            android:id="@+id/img_icon"
-            android:layout_width="45dp"
-            android:layout_height="45dp"
-            android:layout_centerVertical="true"
-            android:padding="@dimen/dp_10"
-            app:url="@{item.icon}" />
-
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_marginStart="@dimen/dp_8"
-            android:layout_toEndOf="@id/img_icon"
-            android:orientation="vertical" >
-
-            <TextView
-                android:id="@+id/tv_name"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@{item.name}"
-                android:textColor="@color/text_black"
-                android:textSize="@dimen/sp_16"
-                tools:text="@string/app_name" />
-
-            <TextView
-                android:id="@+id/tv_desc"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_2"
-                android:text="@{item.desc}"
-                tools:text="@string/app_name" />
-
-        </LinearLayout >
-
-        <com.ysnows.base.widget.shapview.RectLineButton
-            android:id="@+id/btn_manipulate"
-            android:layout_width="52dp"
-            android:layout_height="24dp"
-            android:layout_alignParentEnd="true"
-            android:layout_centerVertical="true"
-            android:gravity="center"
-            android:onClick="@{v->vm.install(item,position,pos)}"
-            android:text="@{item.exist( position)?`卸载`:`安装`}"
-            android:textColor="@color/colorPrimary"
-            android:textSize="@dimen/sp_13"
-            app:rv_radius="5dp" />
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="1dp"
-            android:layout_alignParentBottom="true"
-            android:layout_marginLeft="@dimen/dp_20"
-            android:layout_marginTop="@dimen/dp_10"
-            android:background="@color/llGray" />
-
-    </RelativeLayout >
-</layout >

BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 2 - 0
common-build.gradle

@@ -8,6 +8,8 @@ dependencies {
     implementation 'androidx.appcompat:appcompat:1.2.0'
     implementation 'androidx.core:core-ktx:1.3.1'
 
+    implementation 'com.google.android.material:material:1.2.1'
+
     implementation 'androidx.recyclerview:recyclerview:1.1.0'
 
     implementation 'com.google.code.gson:gson:2.8.6'

BIN
heifengwuliu.jks