Bladeren bron

人脸识别码激活优化

chenp 2 jaren geleden
bovenliggende
commit
2b29c21623

+ 1 - 1
clothCashier/app/src/main/java/com/cloth/clothcashier/base/BaseActivity.java

@@ -33,7 +33,7 @@ import butterknife.ButterKnife;
 public abstract class BaseActivity extends AppCompatActivity {
     private static List<Activity> activityList;
     ScannerGunManager scannerGunManager;
-    public String activeKey = "0857-118A-L35P-F5FG";
+    public String activeKey = "";
     public LoadingDialog loadingDialog;
     private static ExecutorService executor;
 

+ 3 - 1
clothCashier/app/src/main/java/com/cloth/clothcashier/base/BaseInitAlgorithm.java

@@ -36,11 +36,13 @@ public class BaseInitAlgorithm {
 
             @Override
             public void onNext(Integer activeCode) {
+                Log.e("TAG", "激活结果:" + activeCode);
                 if (activeCode == ErrorInfo.MOK) {
                     ToastUtil.toast("success");
                     flag = true;
+                    Log.e("TAG", "激活成功");
                 } else if (activeCode == ErrorInfo.MERR_ASF_ALREADY_ACTIVATED) {
-//                    ToastUtil.toast("无需再次激活", context);
+                    ToastUtil.toast("无需再次激活");
                     flag = true;
                     Log.e("TAG", "subscribe: 初始化后的结果无需再次激活");
                 } else {

+ 1 - 1
clothCashier/app/src/main/java/com/cloth/clothcashier/ui/activity/DirectPayActivity.java

@@ -265,7 +265,7 @@ public class DirectPayActivity extends BaseActivity implements TextWatcher, Came
             ActivityCompat.requestPermissions(this, NEEDED_PERMISSIONS, ACTION_REQUEST_PERMISSIONS);
             return;
         }
-        activeKey = SharedPreferencesHelperUtil.getString(DataConstans.ACTIVE_KEY, "", this);
+//        activeKey = SharedPreferencesHelperUtil.getString(DataConstans.ACTIVE_KEY, "", this);
 
         if (StringUtil.isEmpty(activeKey)) {
 //            activeKey = SharedPreferencesHelperUtil.getString(BaseSettingConstans.ACTIVE_KEY, "", MainActivity.this);

+ 1 - 1
clothCashier/app/src/main/java/com/cloth/clothcashier/ui/activity/OrderCashierActivity.java

@@ -481,7 +481,7 @@ public class OrderCashierActivity extends BaseActivity implements CameraListener
             ActivityCompat.requestPermissions(this, NEEDED_PERMISSIONS, ACTION_REQUEST_PERMISSIONS);
             return;
         }
-        activeKey = SharedPreferencesHelperUtil.getString(DataConstans.ACTIVE_KEY, "", this);
+//        activeKey = SharedPreferencesHelperUtil.getString(DataConstans.ACTIVE_KEY, "", this);
 
         if (StringUtil.isEmpty(activeKey)) {
 //            activeKey = SharedPreferencesHelperUtil.getString(BaseSettingConstans.ACTIVE_KEY, "", MainActivity.this);

+ 4 - 1
clothCashier/app/src/main/java/com/cloth/clothcashier/ui/activity/SettingPosNoActivity.java

@@ -5,6 +5,7 @@ import android.widget.Button;
 import android.widget.EditText;
 
 import com.cloth.clothcashier.R;
+import com.cloth.clothcashier.application.MyApplication;
 import com.cloth.clothcashier.base.BaseActivity;
 import com.cloth.clothcashier.constans.DataConstans;
 import com.cloth.clothcashier.constans.NetWorkStatus;
@@ -14,6 +15,7 @@ import com.cloth.clothcashier.util.HookUtil;
 import com.cloth.clothcashier.util.SharedPreferencesHelperUtil;
 import com.cloth.clothcashier.util.StringUtil;
 import com.cloth.clothcashier.util.ToastUtil;
+import com.cloth.clothcashier.util.faceutil.ConfigUtil;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
@@ -95,7 +97,8 @@ public class SettingPosNoActivity extends BaseActivity {
                 ToastUtil.toast("请设置激活码");
                 return;
             } else {
-                SharedPreferencesHelperUtil.setString(DataConstans.ACTIVE_KEY, active, this);
+                ConfigUtil.commitActiveKey(MyApplication.get(), active);
+//                SharedPreferencesHelperUtil.setString(DataConstans.ACTIVE_KEY, active, this);
             }
             finish();
         });

+ 3 - 3
clothCashier/app/src/main/res/layout/activity_setting_pos_no.xml

@@ -11,7 +11,7 @@
         android:layout_width="0dp"
         android:layout_height="40dp"
         android:gravity="left"
-        android:text="JIANG NAN BU YI"
+        android:text="YOU XIAN XIN"
         android:textColor="@color/white"
         android:textSize="20dp"
         app:layout_constraintBottom_toBottomOf="parent"
@@ -28,7 +28,7 @@
         android:layout_width="0dp"
         android:layout_height="50dp"
         android:gravity="left"
-        android:text="江南布衣"
+        android:text="优鲜信"
         android:textColor="@color/white"
         android:textSize="30dp"
         app:layout_constraintBottom_toBottomOf="parent"
@@ -45,7 +45,7 @@
         android:layout_width="0dp"
         android:layout_height="50dp"
         android:gravity="left"
-        android:text="江南布衣POS系统"
+        android:text="优鲜信POS系统"
         android:textColor="@color/white"
         android:textSize="16dp"
         app:layout_constraintBottom_toBottomOf="parent"