refactor(MainActivity): 移除重复变量声明
- 删除 `scriptResult` 变量 - 调整了 `REQUEST_CODE_PERMISSIONS`, `TAG`, `PACKAGE_SCHEME`, `DEVICE_TYPE`, `CountryCode`, 和 `currentCountry` 变量的声明位置,以避免重复声明。
This commit is contained in:
parent
069348cb43
commit
530e2d6af2
|
@ -79,7 +79,23 @@ public class MainActivity extends AppCompatActivity {
|
||||||
"ge", "ps"
|
"ge", "ps"
|
||||||
};
|
};
|
||||||
|
|
||||||
public static volatile String scriptResult;
|
private static final int REQUEST_CODE_PERMISSIONS = 100;
|
||||||
|
|
||||||
|
private static final String TAG = "MainActivity";
|
||||||
|
private static final String PACKAGE_SCHEME = "package:";
|
||||||
|
private static final int DEVICE_TYPE = 2;
|
||||||
|
|
||||||
|
// 定义支持的国家代码常量
|
||||||
|
private static final class CountryCode {
|
||||||
|
|
||||||
|
static final String US = "us";
|
||||||
|
static final String RU = "ru";
|
||||||
|
// 默认使用美国
|
||||||
|
static final String DEFAULT = US;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当前使用的国家代码
|
||||||
|
private String currentCountry = CountryCode.DEFAULT;
|
||||||
|
|
||||||
// 初始化 ExecutorService
|
// 初始化 ExecutorService
|
||||||
private void initializeExecutorService() {
|
private void initializeExecutorService() {
|
||||||
|
@ -104,27 +120,6 @@ public class MainActivity extends AppCompatActivity {
|
||||||
return "FyZqWrStUvOpKlMn";
|
return "FyZqWrStUvOpKlMn";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static final int REQUEST_CODE_PERMISSIONS = 100;
|
|
||||||
|
|
||||||
private static final String TAG = "MainActivity";
|
|
||||||
private static final String PACKAGE_SCHEME = "package:";
|
|
||||||
private static final String COUNTRY_CODE = "US";
|
|
||||||
private static final int DEVICE_TYPE = 2;
|
|
||||||
|
|
||||||
// 定义支持的国家代码常量
|
|
||||||
private static final class CountryCode {
|
|
||||||
|
|
||||||
static final String US = "us";
|
|
||||||
static final String RU = "ru";
|
|
||||||
// 默认使用美国
|
|
||||||
static final String DEFAULT = US;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前使用的国家代码
|
|
||||||
private String currentCountry = CountryCode.DEFAULT;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
Loading…
Reference in New Issue