Compare commits
No commits in common. "330e5032df6c83c312e5a9d61d525eeee9970c0c" and "d689db61fff610f79734c0cfe33f5a229d900170" have entirely different histories.
330e5032df
...
d689db61ff
@ -24,12 +24,12 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.contacts"
|
applicationId "cc.winboll.studio.contacts"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 29
|
||||||
versionCode 1
|
versionCode 1
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
// 项目模块目录的 build.gradle 文件的 stageCount=0
|
||||||
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
// Gradle编译环境下合起来的 versionName 就是 "${versionName}.0"
|
||||||
versionName "15.3"
|
versionName "15.2"
|
||||||
if(true) {
|
if(true) {
|
||||||
versionName = genVersionName("${versionName}")
|
versionName = genVersionName("${versionName}")
|
||||||
}
|
}
|
||||||
@ -45,9 +45,6 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
api 'cc.winboll.studio:libaes:15.8.0'
|
|
||||||
api 'cc.winboll.studio:libapputils:15.8.1'
|
|
||||||
api 'cc.winboll.studio:libappbase:15.8.1'
|
|
||||||
|
|
||||||
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
||||||
api 'com.github.getActivity:XXPermissions:18.63'
|
api 'com.github.getActivity:XXPermissions:18.63'
|
||||||
@ -84,4 +81,8 @@ dependencies {
|
|||||||
//api 'androidx.vectordrawable:vectordrawable:1.1.0'
|
//api 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||||
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
//api 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
||||||
//api 'androidx.fragment:fragment:1.1.0'
|
//api 'androidx.fragment:fragment:1.1.0'
|
||||||
|
|
||||||
|
api 'cc.winboll.studio:libaes:15.2.4'
|
||||||
|
api 'cc.winboll.studio:libapputils:15.2.1'
|
||||||
|
api 'cc.winboll.studio:libappbase:15.2.2'
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue May 20 13:02:18 HKT 2025
|
#Sun Apr 13 02:46:09 HKT 2025
|
||||||
stageCount=3
|
stageCount=8
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.3
|
baseVersion=15.2
|
||||||
publishVersion=15.3.2
|
publishVersion=15.2.7
|
||||||
buildCount=0
|
buildCount=0
|
||||||
baseBetaVersion=15.3.3
|
baseBetaVersion=15.2.8
|
||||||
|
@ -42,8 +42,7 @@
|
|||||||
android:icon="@drawable/ic_winboll"
|
android:icon="@drawable/ic_winboll"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/MyAppTheme"
|
android:theme="@style/MyAppTheme"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true">
|
||||||
android:networkSecurityConfig="@xml/network_security_config">
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
@ -193,4 +192,4 @@
|
|||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -7,7 +7,7 @@ package cc.winboll.studio.contacts;
|
|||||||
*/
|
*/
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import cc.winboll.studio.libappbase.winboll.WinBoLLActivityManager;
|
import cc.winboll.studio.libappbase.winboll.WinBollActivityManager;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
|
||||||
public class App extends GlobalApplication {
|
public class App extends GlobalApplication {
|
||||||
@ -20,8 +20,8 @@ public class App extends GlobalApplication {
|
|||||||
// 这样可以预先设置日志与数据的存储根目录。
|
// 这样可以预先设置日志与数据的存储根目录。
|
||||||
//setIsDebuging(BuildConfig.DEBUG);
|
//setIsDebuging(BuildConfig.DEBUG);
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
// 设置 WinBoLL 应用 UI 类型
|
// 设置 WinBoll 应用 UI 类型
|
||||||
getWinBoLLActivityManager().setWinBoLLUI_TYPE(WinBoLLActivityManager.WinBoLLUI_TYPE.Aplication);
|
WinBollActivityManager.getInstance(this).setWinBollUI_TYPE(WinBollActivityManager.WinBollUI_TYPE.Aplication);
|
||||||
|
|
||||||
//LogUtils.d(TAG, "onCreate");
|
//LogUtils.d(TAG, "onCreate");
|
||||||
|
|
||||||
|
@ -32,21 +32,22 @@ import cc.winboll.studio.contacts.fragments.CallLogFragment;
|
|||||||
import cc.winboll.studio.contacts.fragments.ContactsFragment;
|
import cc.winboll.studio.contacts.fragments.ContactsFragment;
|
||||||
import cc.winboll.studio.contacts.fragments.LogFragment;
|
import cc.winboll.studio.contacts.fragments.LogFragment;
|
||||||
import cc.winboll.studio.contacts.services.MainService;
|
import cc.winboll.studio.contacts.services.MainService;
|
||||||
|
import cc.winboll.studio.libaes.winboll.APPInfo;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.LogView;
|
import cc.winboll.studio.libappbase.LogView;
|
||||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
final public class MainActivity extends AppCompatActivity implements IWinBoLLActivity, ViewPager.OnPageChangeListener, View.OnClickListener {
|
final public class MainActivity extends AppCompatActivity implements IWinBollActivity, ViewPager.OnPageChangeListener, View.OnClickListener {
|
||||||
|
|
||||||
public static final String TAG = "MainActivity";
|
public static final String TAG = "MainActivity";
|
||||||
|
|
||||||
public static final int REQUEST_HOME_ACTIVITY = 0;
|
public static final int REQUEST_HOME_ACTIVITY = 0;
|
||||||
public static final int REQUEST_ABOUT_ACTIVITY = 1;
|
public static final int REQUEST_ABOUT_ACTIVITY = 1;
|
||||||
|
|
||||||
public static final String ACTION_SOS = "cc.winboll.studio.libappbase.WinBoLL.ACTION_SOS";
|
public static final String ACTION_SOS = "cc.winboll.studio.libappbase.WinBoll.ACTION_SOS";
|
||||||
|
|
||||||
static MainActivity _MainActivity;
|
static MainActivity _MainActivity;
|
||||||
LogView mLogView;
|
LogView mLogView;
|
||||||
@ -70,10 +71,10 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
|
|
||||||
private static final int DIALER_REQUEST_CODE = 1;
|
private static final int DIALER_REQUEST_CODE = 1;
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public Activity getActivity() {
|
public Activity getActivity() {
|
||||||
// return this;
|
return this;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
// public APPInfo getAppInfo() {
|
// public APPInfo getAppInfo() {
|
||||||
@ -94,17 +95,6 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Activity getActivity() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
// 接收并处理 Intent 数据,函数 Intent 处理接收就直接返回
|
// 接收并处理 Intent 数据,函数 Intent 处理接收就直接返回
|
||||||
@ -121,7 +111,7 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
// // 显示后退按钮
|
// // 显示后退按钮
|
||||||
// getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
// getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
// }
|
// }
|
||||||
getSupportActionBar().setSubtitle(TAG);
|
getSupportActionBar().setSubtitle(getTag());
|
||||||
|
|
||||||
tabLayout = findViewById(R.id.tabLayout);
|
tabLayout = findViewById(R.id.tabLayout);
|
||||||
viewPager = findViewById(R.id.viewPager);
|
viewPager = findViewById(R.id.viewPager);
|
||||||
@ -349,7 +339,7 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
//
|
//
|
||||||
// if (intent.getAction().equals(StringToQrCodeView.ACTION_UNITTEST_QRCODE)) {
|
// if (intent.getAction().equals(StringToQrCodeView.ACTION_UNITTEST_QRCODE)) {
|
||||||
// try {
|
// try {
|
||||||
// WinBoLLActivity clazzActivity = UnitTestActivity.class.newInstance();
|
// WinBollActivity clazzActivity = UnitTestActivity.class.newInstance();
|
||||||
// String tag = clazzActivity.getTag();
|
// String tag = clazzActivity.getTag();
|
||||||
// LogUtils.d(TAG, "String tag = clazzActivity.getTag(); tag " + tag);
|
// LogUtils.d(TAG, "String tag = clazzActivity.getTag(); tag " + tag);
|
||||||
// Intent subIntent = new Intent(this, UnitTestActivity.class);
|
// Intent subIntent = new Intent(this, UnitTestActivity.class);
|
||||||
@ -367,8 +357,8 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// Files.copy(Paths.get(szSrcPath), Paths.get(file.getPath()));
|
// Files.copy(Paths.get(szSrcPath), Paths.get(file.getPath()));
|
||||||
// //startWinBoLLActivity(subIntent, tag);
|
// //startWinBollActivity(subIntent, tag);
|
||||||
// WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(this, subIntent, UnitTestActivity.class);
|
// WinBollActivityManager.getInstance(this).startWinBollActivity(this, subIntent, UnitTestActivity.class);
|
||||||
// } catch (IllegalAccessException | InstantiationException | IOException e) {
|
// } catch (IllegalAccessException | InstantiationException | IOException e) {
|
||||||
// LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
// LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
// // 函数处理异常返回失败
|
// // 函数处理异常返回失败
|
||||||
@ -381,10 +371,10 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public String getTag() {
|
public String getTag() {
|
||||||
// return TAG;
|
return TAG;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
// public void onBackPressed() {
|
// public void onBackPressed() {
|
||||||
@ -396,7 +386,7 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public void onYes() {
|
// public void onYes() {
|
||||||
// WinBoLLActivityManager.getInstance(getApplicationContext()).finishAll();
|
// WinBollActivityManager.getInstance(getApplicationContext()).finishAll();
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
@ -418,7 +408,7 @@ final public class MainActivity extends AppCompatActivity implements IWinBoLLAct
|
|||||||
if (item.getItemId() == R.id.item_settings) {
|
if (item.getItemId() == R.id.item_settings) {
|
||||||
Intent intent = new Intent(this, SettingsActivity.class);
|
Intent intent = new Intent(this, SettingsActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
//WinBoLLActivityManager.getInstance(this).startWinBoLLActivity(this, CallActivity.class);
|
//WinBollActivityManager.getInstance(this).startWinBollActivity(this, CallActivity.class);
|
||||||
}
|
}
|
||||||
// } else
|
// } else
|
||||||
// if (item.getItemId() == R.id.item_exit) {
|
// if (item.getItemId() == R.id.item_exit) {
|
||||||
|
@ -10,15 +10,14 @@ import android.content.Context;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import cc.winboll.studio.contacts.R;
|
import cc.winboll.studio.contacts.R;
|
||||||
import cc.winboll.studio.libaes.winboll.APPInfo;
|
import cc.winboll.studio.libaes.winboll.APPInfo;
|
||||||
import cc.winboll.studio.libaes.winboll.AboutView;
|
import cc.winboll.studio.libaes.winboll.AboutView;
|
||||||
import cc.winboll.studio.libappbase.GlobalApplication;
|
import cc.winboll.studio.libappbase.GlobalApplication;
|
||||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
||||||
|
|
||||||
public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity {
|
public class AboutActivity extends WinBollActivity implements IWinBollActivity {
|
||||||
|
|
||||||
public static final String TAG = "AboutActivity";
|
public static final String TAG = "AboutActivity";
|
||||||
|
|
||||||
@ -65,13 +64,13 @@ public class AboutActivity extends AppCompatActivity implements IWinBoLLActivity
|
|||||||
);
|
);
|
||||||
layout.addView(aboutView, params);
|
layout.addView(aboutView, params);
|
||||||
|
|
||||||
GlobalApplication.getWinBoLLActivityManager().add(this);
|
GlobalApplication.getWinBollActivityManager().add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
GlobalApplication.getWinBoLLActivityManager().registeRemove(this);
|
GlobalApplication.getWinBollActivityManager().registeRemove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AboutView CreateAboutView() {
|
public AboutView CreateAboutView() {
|
||||||
|
@ -24,7 +24,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import cc.winboll.studio.contacts.App;
|
|
||||||
import cc.winboll.studio.contacts.R;
|
import cc.winboll.studio.contacts.R;
|
||||||
import cc.winboll.studio.contacts.adapters.PhoneConnectRuleAdapter;
|
import cc.winboll.studio.contacts.adapters.PhoneConnectRuleAdapter;
|
||||||
import cc.winboll.studio.contacts.beans.MainServiceBean;
|
import cc.winboll.studio.contacts.beans.MainServiceBean;
|
||||||
@ -35,13 +34,15 @@ import cc.winboll.studio.contacts.bobulltoon.TomCat;
|
|||||||
import cc.winboll.studio.contacts.dun.Rules;
|
import cc.winboll.studio.contacts.dun.Rules;
|
||||||
import cc.winboll.studio.contacts.services.MainService;
|
import cc.winboll.studio.contacts.services.MainService;
|
||||||
import cc.winboll.studio.contacts.views.DuInfoTextView;
|
import cc.winboll.studio.contacts.views.DuInfoTextView;
|
||||||
|
import cc.winboll.studio.libaes.winboll.APPInfo;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import cc.winboll.studio.contacts.App;
|
||||||
|
|
||||||
public class SettingsActivity extends AppCompatActivity implements IWinBoLLActivity {
|
public class SettingsActivity extends AppCompatActivity implements IWinBollActivity {
|
||||||
|
|
||||||
public static final String TAG = "SettingsActivity";
|
public static final String TAG = "SettingsActivity";
|
||||||
|
|
||||||
@ -176,8 +177,6 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
|
|||||||
etDunResumeSecondCount.setEnabled(!isEnableDun);
|
etDunResumeSecondCount.setEnabled(!isEnableDun);
|
||||||
etDunResumeCount.setEnabled(!isEnableDun);
|
etDunResumeCount.setEnabled(!isEnableDun);
|
||||||
|
|
||||||
EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
|
|
||||||
etBoBullToonURL.setText(Rules.getInstance(this).getBoBullToonURL());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void notifyDunInfoUpdate() {
|
public static void notifyDunInfoUpdate() {
|
||||||
@ -202,11 +201,6 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
|
|||||||
settingsModel.setIsEnableDun(isEnableDun);
|
settingsModel.setIsEnableDun(isEnableDun);
|
||||||
Rules.getInstance(this).saveDun();
|
Rules.getInstance(this).saveDun();
|
||||||
Rules.getInstance(this).reload();
|
Rules.getInstance(this).reload();
|
||||||
|
|
||||||
// 重新加载盾牌参数
|
|
||||||
etDunTotalCount.setText(Integer.toString(settingsModel.getDunTotalCount()));
|
|
||||||
etDunResumeSecondCount.setText(Integer.toString(settingsModel.getDunResumeSecondCount()));
|
|
||||||
etDunResumeCount.setText(Integer.toString(settingsModel.getDunResumeCount()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateStreamVolumeTextView() {
|
void updateStreamVolumeTextView() {
|
||||||
@ -239,18 +233,7 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onResetBoBullToonURL(View view) {
|
|
||||||
Rules.getInstance(this).resetDefaultBoBullToonURL();
|
|
||||||
EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
|
|
||||||
etBoBullToonURL.setText(Rules.getInstance(this).getBoBullToonURL());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onDownloadBoBullToon(View view) {
|
public void onDownloadBoBullToon(View view) {
|
||||||
EditText etBoBullToonURL = findViewById(R.id.bobulltoonurl_et);
|
|
||||||
if (!etBoBullToonURL.getText().toString().trim().equals(Rules.getInstance(this).getBoBullToonURL())) {
|
|
||||||
Rules.getInstance(this).setBoBullToonURL(etBoBullToonURL.getText().toString().trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
final TomCat tomCat = TomCat.getInstance(this);
|
final TomCat tomCat = TomCat.getInstance(this);
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -264,6 +247,8 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onSearchBoBullToonPhone(View view) {
|
public void onSearchBoBullToonPhone(View view) {
|
||||||
TomCat tomCat = TomCat.getInstance(this);
|
TomCat tomCat = TomCat.getInstance(this);
|
||||||
EditText etPhone = findViewById(R.id.activitysettingsEditText1);
|
EditText etPhone = findViewById(R.id.activitysettingsEditText1);
|
||||||
@ -326,8 +311,8 @@ public class SettingsActivity extends AppCompatActivity implements IWinBoLLActiv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onAbout(View view) {
|
public void onAbout(View view) {
|
||||||
App.getWinBoLLActivityManager().startWinBoLLActivity(this, AboutActivity.class);
|
App.getWinBollActivityManager().startWinBollActivity(this, AboutActivity.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,9 @@ import android.view.MenuItem;
|
|||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import cc.winboll.studio.libaes.beans.AESThemeBean;
|
import cc.winboll.studio.libaes.beans.AESThemeBean;
|
||||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
||||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
|
import cc.winboll.studio.libappbase.winboll.IWinBollActivity;
|
||||||
|
|
||||||
public class WinBollActivity extends AppCompatActivity implements IWinBoLLActivity {
|
public class WinBollActivity extends AppCompatActivity implements IWinBollActivity {
|
||||||
|
|
||||||
public static final String TAG = "WinBollActivity";
|
public static final String TAG = "WinBollActivity";
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ import cc.winboll.studio.contacts.utils.IntUtils;
|
|||||||
public class SettingsModel extends BaseBean {
|
public class SettingsModel extends BaseBean {
|
||||||
|
|
||||||
public static final String TAG = "SettingsModel";
|
public static final String TAG = "SettingsModel";
|
||||||
|
|
||||||
public static final int MAX_INTRANGE = 666666;
|
public static final int MAX_INTRANGE = 666666;
|
||||||
public static final int MIN_INTRANGE = 1;
|
public static final int MIN_INTRANGE = 1;
|
||||||
|
|
||||||
@ -28,8 +27,6 @@ public class SettingsModel extends BaseBean {
|
|||||||
int dunResumeCount;
|
int dunResumeCount;
|
||||||
// 是否启用云盾
|
// 是否启用云盾
|
||||||
boolean isEnableDun;
|
boolean isEnableDun;
|
||||||
// BoBullToon 应用模块数据请求地址
|
|
||||||
String szBoBullToon_URL;
|
|
||||||
|
|
||||||
public SettingsModel() {
|
public SettingsModel() {
|
||||||
this.dunTotalCount = 6;
|
this.dunTotalCount = 6;
|
||||||
@ -37,24 +34,14 @@ public class SettingsModel extends BaseBean {
|
|||||||
this.dunResumeSecondCount = 60;
|
this.dunResumeSecondCount = 60;
|
||||||
this.dunResumeCount = 1;
|
this.dunResumeCount = 1;
|
||||||
this.isEnableDun = false;
|
this.isEnableDun = false;
|
||||||
this.szBoBullToon_URL = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SettingsModel(int dunTotalCount, int dunCurrentCount, int dunResumeSecondCount, int dunResumeCount, boolean isEnableDun, String szBoBullToon_URL) {
|
public SettingsModel(int dunTotalCount, int dunCurrentCount, int dunResumeSecondCount, int dunResumeCount, boolean isEnableDun) {
|
||||||
this.dunTotalCount = getSettingsModelRangeInt(dunTotalCount);
|
this.dunTotalCount = getSettingsModelRangeInt(dunTotalCount);
|
||||||
this.dunCurrentCount = getSettingsModelRangeInt(dunCurrentCount);
|
this.dunCurrentCount = getSettingsModelRangeInt(dunCurrentCount);
|
||||||
this.dunResumeSecondCount = getSettingsModelRangeInt(dunResumeSecondCount);
|
this.dunResumeSecondCount = getSettingsModelRangeInt(dunResumeSecondCount);
|
||||||
this.dunResumeCount = getSettingsModelRangeInt(dunResumeCount);
|
this.dunResumeCount = getSettingsModelRangeInt(dunResumeCount);
|
||||||
this.isEnableDun = isEnableDun;
|
this.isEnableDun = isEnableDun;
|
||||||
this.szBoBullToon_URL = szBoBullToon_URL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBoBullToon_URL(String boBullToon_URL) {
|
|
||||||
this.szBoBullToon_URL = boBullToon_URL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBoBullToon_URL() {
|
|
||||||
return szBoBullToon_URL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDunTotalCount(int dunTotalCount) {
|
public void setDunTotalCount(int dunTotalCount) {
|
||||||
@ -115,8 +102,7 @@ public class SettingsModel extends BaseBean {
|
|||||||
jsonWriter.name("dunResumeSecondCount").value(getDunResumeSecondCount());
|
jsonWriter.name("dunResumeSecondCount").value(getDunResumeSecondCount());
|
||||||
jsonWriter.name("dunResumeCount").value(getDunResumeCount());
|
jsonWriter.name("dunResumeCount").value(getDunResumeCount());
|
||||||
jsonWriter.name("isEnableDun").value(isEnableDun());
|
jsonWriter.name("isEnableDun").value(isEnableDun());
|
||||||
jsonWriter.name("szBoBullToon_URL").value(getBoBullToon_URL());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -132,8 +118,6 @@ public class SettingsModel extends BaseBean {
|
|||||||
setDunResumeCount(getSettingsModelRangeInt(jsonReader.nextInt()));
|
setDunResumeCount(getSettingsModelRangeInt(jsonReader.nextInt()));
|
||||||
} else if (name.equals("isEnableDun")) {
|
} else if (name.equals("isEnableDun")) {
|
||||||
setIsEnableDun(jsonReader.nextBoolean());
|
setIsEnableDun(jsonReader.nextBoolean());
|
||||||
} else if (name.equals("szBoBullToon_URL")) {
|
|
||||||
setBoBullToon_URL(jsonReader.nextString());
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,6 @@ package cc.winboll.studio.contacts.bobulltoon;
|
|||||||
* @Describe 汤姆猫管家 :使用 BoBullToon 项目,对通讯地址进行筛选判断的好朋友。
|
* @Describe 汤姆猫管家 :使用 BoBullToon 项目,对通讯地址进行筛选判断的好朋友。
|
||||||
*/
|
*/
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import cc.winboll.studio.contacts.R;
|
|
||||||
import cc.winboll.studio.contacts.dun.Rules;
|
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -30,7 +28,6 @@ public class TomCat {
|
|||||||
public static final String TAG = "TomCat";
|
public static final String TAG = "TomCat";
|
||||||
|
|
||||||
List<String> listPhoneBoBullToon = new ArrayList<String>();
|
List<String> listPhoneBoBullToon = new ArrayList<String>();
|
||||||
String mszBoBullToon_URL;
|
|
||||||
|
|
||||||
static volatile TomCat _TomCat;
|
static volatile TomCat _TomCat;
|
||||||
Context mContext;
|
Context mContext;
|
||||||
@ -44,12 +41,8 @@ public class TomCat {
|
|||||||
}
|
}
|
||||||
return _TomCat;
|
return _TomCat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefaultBobulltoonUrl() {
|
|
||||||
return mContext.getString(R.string.default_bobulltoon_url);
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean downloadAndExtractZip(String zipUrl, String destinationFolder) throws IOException {
|
void downloadAndExtractZip(String zipUrl, String destinationFolder) throws IOException {
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(zipUrl)
|
.url(zipUrl)
|
||||||
@ -102,16 +95,13 @@ public class TomCat {
|
|||||||
// 删除临时 ZIP 文件
|
// 删除临时 ZIP 文件
|
||||||
tempZipFile.delete();
|
tempZipFile.delete();
|
||||||
LogUtils.d(TAG, "已更新 BoBullToon 数据");
|
LogUtils.d(TAG, "已更新 BoBullToon 数据");
|
||||||
return true;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ToastUtils.show(e.getMessage());
|
|
||||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean downloadBoBullToon() {
|
public boolean downloadBoBullToon() {
|
||||||
String zipUrl = Rules.getInstance(mContext).getBoBullToonURL(); // 替换为实际的 ZIP 文件 URL
|
String zipUrl = "http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip"; // 替换为实际的 ZIP 文件 URL
|
||||||
String destinationFolder = getWorkingFolder().getPath(); // 替换为实际的目标文件夹路径
|
String destinationFolder = getWorkingFolder().getPath(); // 替换为实际的目标文件夹路径
|
||||||
try {
|
try {
|
||||||
// 删除旧文件
|
// 删除旧文件
|
||||||
@ -123,11 +113,9 @@ public class TomCat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 更新新文件
|
// 更新新文件
|
||||||
if(downloadAndExtractZip(zipUrl, destinationFolder)) {
|
downloadAndExtractZip(zipUrl, destinationFolder);
|
||||||
LogUtils.d(TAG, "ZIP 文件下载并解压成功。");
|
LogUtils.d(TAG, "ZIP 文件下载并解压成功。");
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import cc.winboll.studio.contacts.bobulltoon.TomCat;
|
|
||||||
|
|
||||||
public class Rules {
|
public class Rules {
|
||||||
|
|
||||||
@ -85,20 +84,6 @@ public class Rules {
|
|||||||
PhoneConnectRuleModel.saveBeanList(mContext, _PhoneConnectRuleModelList, PhoneConnectRuleModel.class);
|
PhoneConnectRuleModel.saveBeanList(mContext, _PhoneConnectRuleModelList, PhoneConnectRuleModel.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetDefaultBoBullToonURL() {
|
|
||||||
mSettingsModel.setBoBullToon_URL(TomCat.getInstance(mContext).getDefaultBobulltoonUrl());
|
|
||||||
saveDun();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBoBullToonURL(String szUrl) {
|
|
||||||
mSettingsModel.setBoBullToon_URL(szUrl);
|
|
||||||
saveDun();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBoBullToonURL() {
|
|
||||||
return mSettingsModel.getBoBullToon_URL();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadDun() {
|
public void loadDun() {
|
||||||
mSettingsModel = SettingsModel.loadBean(mContext, SettingsModel.class);
|
mSettingsModel = SettingsModel.loadBean(mContext, SettingsModel.class);
|
||||||
if (mSettingsModel == null) {
|
if (mSettingsModel == null) {
|
||||||
@ -124,12 +109,8 @@ public class Rules {
|
|||||||
boolean isDefend = false; // 盾牌是否生效
|
boolean isDefend = false; // 盾牌是否生效
|
||||||
boolean isConnect = true; // 防御结果是否连接
|
boolean isConnect = true; // 防御结果是否连接
|
||||||
|
|
||||||
// 进行盾牌层数预计缩减计算
|
|
||||||
int nDunCurrentCount = mSettingsModel.getDunCurrentCount() - 1;
|
|
||||||
LogUtils.d(TAG, String.format("nDunCurrentCount : %d", nDunCurrentCount));
|
|
||||||
|
|
||||||
// 如果盾值小于1,则解除防御
|
// 如果盾值小于1,则解除防御
|
||||||
if (!isDefend && nDunCurrentCount < 1) {
|
if (!isDefend && mSettingsModel.getDunCurrentCount() < 1) {
|
||||||
// 盾层为1以下,防御解除
|
// 盾层为1以下,防御解除
|
||||||
LogUtils.d(TAG, "盾层为1以下,防御解除");
|
LogUtils.d(TAG, "盾层为1以下,防御解除");
|
||||||
isDefend = true;
|
isDefend = true;
|
||||||
@ -193,17 +174,17 @@ public class Rules {
|
|||||||
// 就减少防御盾牌层数。
|
// 就减少防御盾牌层数。
|
||||||
// 每校验一次规则,云盾防御层数减1
|
// 每校验一次规则,云盾防御层数减1
|
||||||
// 当云盾防御层数为0时,再次进行以下程序段则恢复满值防御。
|
// 当云盾防御层数为0时,再次进行以下程序段则恢复满值防御。
|
||||||
int newDunCount = nDunCurrentCount;
|
int newDunCount = mSettingsModel.getDunCurrentCount() - 1;
|
||||||
LogUtils.d(TAG, String.format("新的防御层数预计为 %d", newDunCount));
|
LogUtils.d(TAG, String.format("新的防御层数预计为 %d", newDunCount));
|
||||||
|
|
||||||
// 保证盾值在[1,DunTotalCount]之内其他值一律重置为 DunTotalCount。
|
// 保证盾值在[0,DunTotalCount]之内其他值一律重置为 DunTotalCount。
|
||||||
if (newDunCount > 0 && newDunCount < mSettingsModel.getDunTotalCount()) {
|
if (newDunCount < 0 || newDunCount > mSettingsModel.getDunTotalCount()) {
|
||||||
mSettingsModel.setDunCurrentCount(newDunCount);
|
|
||||||
LogUtils.d(TAG, String.format("设置防御层数为 %d", newDunCount));
|
|
||||||
} else {
|
|
||||||
mSettingsModel.setDunCurrentCount(mSettingsModel.getDunTotalCount());
|
mSettingsModel.setDunCurrentCount(mSettingsModel.getDunTotalCount());
|
||||||
LogUtils.d(TAG, String.format("盾值不在[0,%d]区间,恢复防御最大值%d", mSettingsModel.getDunTotalCount(), mSettingsModel.getDunTotalCount()));
|
LogUtils.d(TAG, String.format("盾值不在[0,%d]区间,恢复防御最大值%d", mSettingsModel.getDunTotalCount(), mSettingsModel.getDunTotalCount()));
|
||||||
}
|
} else {
|
||||||
|
mSettingsModel.setDunCurrentCount(newDunCount);
|
||||||
|
LogUtils.d(TAG, String.format("设置防御层数为 %d", newDunCount));
|
||||||
|
}
|
||||||
|
|
||||||
saveDun();
|
saveDun();
|
||||||
SettingsActivity.notifyDunInfoUpdate();
|
SettingsActivity.notifyDunInfoUpdate();
|
||||||
|
@ -18,7 +18,6 @@ import android.content.ServiceConnection;
|
|||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import cc.winboll.studio.contacts.App;
|
|
||||||
import cc.winboll.studio.contacts.beans.MainServiceBean;
|
import cc.winboll.studio.contacts.beans.MainServiceBean;
|
||||||
import cc.winboll.studio.contacts.beans.RingTongBean;
|
import cc.winboll.studio.contacts.beans.RingTongBean;
|
||||||
import cc.winboll.studio.contacts.bobulltoon.TomCat;
|
import cc.winboll.studio.contacts.bobulltoon.TomCat;
|
||||||
@ -30,9 +29,11 @@ import cc.winboll.studio.contacts.services.MainService;
|
|||||||
import cc.winboll.studio.contacts.threads.MainServiceThread;
|
import cc.winboll.studio.contacts.threads.MainServiceThread;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
import cc.winboll.studio.libappbase.LogUtils;
|
||||||
import cc.winboll.studio.libappbase.sos.SOS;
|
import cc.winboll.studio.libappbase.sos.SOS;
|
||||||
import cc.winboll.studio.libappbase.winboll.WinBoLL;
|
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
import cc.winboll.studio.libappbase.sos.WinBoll;
|
||||||
|
import cc.winboll.studio.contacts.App;
|
||||||
|
import cc.winboll.studio.libappbase.sos.APPModel;
|
||||||
|
|
||||||
public class MainService extends Service {
|
public class MainService extends Service {
|
||||||
|
|
||||||
@ -128,11 +129,11 @@ public class MainService extends Service {
|
|||||||
isServiceRunning = true;
|
isServiceRunning = true;
|
||||||
// 唤醒守护进程
|
// 唤醒守护进程
|
||||||
wakeupAndBindAssistant();
|
wakeupAndBindAssistant();
|
||||||
// 召唤 WinBoLL APP 绑定本服务
|
// 召唤 WinBoll APP 绑定本服务
|
||||||
if (App.isDebuging()) {
|
if (App.isDebuging()) {
|
||||||
WinBoLL.bindToAPPBaseBeta(this, MainService.class.getName());
|
WinBoll.bindToAPPBaseBeta(this, MainService.class.getName());
|
||||||
} else {
|
} else {
|
||||||
WinBoLL.bindToAPPBase(this, MainService.class.getName());
|
WinBoll.bindToAPPBase(this, MainService.class.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化服务运行参数
|
// 初始化服务运行参数
|
||||||
|
@ -195,29 +195,16 @@
|
|||||||
android:text="拨不通电话记录查询:"/>
|
android:text="拨不通电话记录查询:"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:layout_margin="10dp">
|
android:layout_margin="10dp">
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:ems="10"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:id="@+id/bobulltoonurl_et"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="重置地址"
|
android:text="下载 BoBullToon"
|
||||||
android:onClick="onResetBoBullToonURL"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="下载数据"
|
|
||||||
android:onClick="onDownloadBoBullToon"/>
|
android:onClick="onDownloadBoBullToon"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- WinBoLL 默认方案 -->
|
<!-- WinBoll 默认方案 -->
|
||||||
<color name="colorPrimary">#FF196ABC</color>
|
<color name="colorPrimary">#FF196ABC</color>
|
||||||
<color name="colorPrimaryDark">#FF002B57</color>
|
<color name="colorPrimaryDark">#FF002B57</color>
|
||||||
<color name="colorAccent">#FF80BFFF</color>
|
<color name="colorAccent">#FF80BFFF</color>
|
||||||
|
@ -2,6 +2,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">Contacts</string>
|
<string name="app_name">Contacts</string>
|
||||||
<string name="default_bobulltoon_url">http://10.8.0.12:3000/Studio/BoBullToon/archive/main.zip</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="MyAppTheme" parent="AESTheme">
|
<style name="MyAppTheme" parent="APPBaseTheme">
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
<item name="android:windowContentOverlay">@null</item>
|
<item name="android:windowContentOverlay">@null</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="GlobalCrashActivityTheme" parent="AESTheme">
|
<style name="GlobalCrashActivityTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
|
||||||
<item name="colorTittle">@color/colorAccent</item>
|
<item name="colorTittle">@color/colorAccent</item>
|
||||||
<item name="colorTittleBackgound">@color/colorPrimary</item>
|
<item name="colorTittleBackgound">@color/colorPrimary</item>
|
||||||
<item name="colorText">@color/colorAccent</item>
|
<item name="colorText">@color/colorAccent</item>
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<network-security-config>
|
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
|
||||||
<domain includeSubdomains="true">winboll.cc</domain>
|
|
||||||
</domain-config>
|
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
|
||||||
<domain includeSubdomains="false">10.8.0.12</domain>
|
|
||||||
</domain-config>
|
|
||||||
</network-security-config>
|
|
@ -24,7 +24,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cc.winboll.studio.mymessagemanager"
|
applicationId "cc.winboll.studio.mymessagemanager"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 29
|
||||||
versionCode 8
|
versionCode 8
|
||||||
// versionName 更新后需要手动设置
|
// versionName 更新后需要手动设置
|
||||||
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
// .winboll/winbollBuildProps.properties 文件的 stageCount=0
|
||||||
@ -45,9 +45,9 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
api 'cc.winboll.studio:libaes:15.8.0'
|
api 'cc.winboll.studio:libaes:15.6.0'
|
||||||
api 'cc.winboll.studio:libapputils:15.8.1'
|
api 'cc.winboll.studio:libapputils:15.3.4'
|
||||||
api 'cc.winboll.studio:libappbase:15.8.1'
|
api 'cc.winboll.studio:libappbase:15.7.6'
|
||||||
|
|
||||||
api 'io.github.medyo:android-about-page:2.0.0'
|
api 'io.github.medyo:android-about-page:2.0.0'
|
||||||
api 'com.github.getActivity:ToastUtils:10.5'
|
api 'com.github.getActivity:ToastUtils:10.5'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Tue May 20 20:39:06 HKT 2025
|
#Sat May 03 12:49:28 GMT 2025
|
||||||
stageCount=6
|
stageCount=5
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.2
|
baseVersion=15.2
|
||||||
publishVersion=15.2.5
|
publishVersion=15.2.4
|
||||||
buildCount=0
|
buildCount=14
|
||||||
baseBetaVersion=15.2.6
|
baseBetaVersion=15.2.5
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
package cc.winboll.studio.mymessagemanager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ZhanGSKen<zhangsken@188.com>
|
||||||
|
* @Date 2023/07/24 01:46:59
|
||||||
|
* @Describe 全局应用类
|
||||||
|
*/
|
||||||
|
import android.view.Gravity;
|
||||||
|
import cc.winboll.studio.mymessagemanager.R;
|
||||||
|
import cc.winboll.studio.shared.app.WinBollApplication;
|
||||||
|
import cc.winboll.studio.shared.log.LogUtils;
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
public class GlobalApplication extends WinBollApplication {
|
||||||
|
|
||||||
|
public static final String TAG = "GlobalApplication";
|
||||||
|
|
||||||
|
static String _mszAppExternalFilesDir;
|
||||||
|
static String _mszConfigUtilFileName = "ConfigUtil.json";
|
||||||
|
static String _mszConfigUtilPath;
|
||||||
|
static String _mszSMSReceiveRuleUtilFileName = "SMSReceiveRuleUtil.json";
|
||||||
|
static String _mszSMSReceiveRuleUtilPath;
|
||||||
|
|
||||||
|
public static final int USER_ID = -1;
|
||||||
|
Long mszVersionName = 1L;
|
||||||
|
Long mszDataVersionName = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
//setIsDebug(cc.winboll.studio.mymessagemanager.BuildConfig.DEBUG);
|
||||||
|
|
||||||
|
// 初始化 Toast 框架
|
||||||
|
ToastUtils.init(this);
|
||||||
|
// 设置 Toast 布局样式
|
||||||
|
ToastUtils.setView(R.layout.toast_custom_view);
|
||||||
|
//ToastUtils.setStyle(new WhiteToastStyle());
|
||||||
|
ToastUtils.setGravity(Gravity.BOTTOM, 0, 200);
|
||||||
|
|
||||||
|
//LogUtils.d(TAG, "BuildConfig.DEBUG " + Boolean.toString(BuildConfig.DEBUG));
|
||||||
|
|
||||||
|
_mszAppExternalFilesDir = getExternalFilesDir(TAG).toString();
|
||||||
|
_mszConfigUtilPath = _mszAppExternalFilesDir + File.separator + _mszConfigUtilFileName;
|
||||||
|
_mszSMSReceiveRuleUtilPath = _mszAppExternalFilesDir + File.separator + _mszSMSReceiveRuleUtilFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void showApplicationMessage(String szMessage) {
|
||||||
|
LogUtils.i(TAG, szMessage);
|
||||||
|
}
|
||||||
|
}
|
@ -306,7 +306,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
} else if (nItemId == R.id.app_log) {
|
} else if (nItemId == R.id.app_log) {
|
||||||
//App.getWinBoLLActivityManager().startLogActivity(this);
|
App.getWinBoLLActivityManager().startLogActivity(this);
|
||||||
} else if (nItemId == R.id.app_unittest) {
|
} else if (nItemId == R.id.app_unittest) {
|
||||||
Intent i = new Intent(MainActivity.this, UnitTestActivity.class);
|
Intent i = new Intent(MainActivity.this, UnitTestActivity.class);
|
||||||
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
@ -15,12 +15,12 @@ import android.graphics.BitmapFactory;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.media.RingtoneManager;
|
import android.media.RingtoneManager;
|
||||||
import android.widget.RemoteViews;
|
import android.widget.RemoteViews;
|
||||||
import cc.winboll.studio.libappbase.LogUtils;
|
|
||||||
import cc.winboll.studio.mymessagemanager.R;
|
import cc.winboll.studio.mymessagemanager.R;
|
||||||
import cc.winboll.studio.mymessagemanager.activitys.MainActivity;
|
import cc.winboll.studio.mymessagemanager.activitys.MainActivity;
|
||||||
import cc.winboll.studio.mymessagemanager.activitys.SMSActivity;
|
import cc.winboll.studio.mymessagemanager.activitys.SMSActivity;
|
||||||
import cc.winboll.studio.mymessagemanager.beans.MessageNotificationBean;
|
import cc.winboll.studio.mymessagemanager.beans.MessageNotificationBean;
|
||||||
import cc.winboll.studio.mymessagemanager.services.MainService;
|
import cc.winboll.studio.mymessagemanager.services.MainService;
|
||||||
|
import cc.winboll.studio.shared.log.LogUtils;
|
||||||
|
|
||||||
public class NotificationUtil {
|
public class NotificationUtil {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user