|
@@ -50,7 +50,7 @@ public class DataManager extends Application {
|
|
|
public void initData() {
|
|
|
List<AppModel> appModelList = loadInstalledApps();
|
|
|
List<AppModel> sortAppList = sortAppList(appModelList);
|
|
|
- if (getIsFactoryMode()) {
|
|
|
+ if (isFactoryMode()) {
|
|
|
//xp应用提前
|
|
|
mInstalledAppsList = sortAppList;
|
|
|
} else {
|
|
@@ -278,7 +278,7 @@ public class DataManager extends Application {
|
|
|
public static int getSimStatus() {
|
|
|
if (isSimAbsent())
|
|
|
return 1;
|
|
|
- else if (isWatchUnactivated())
|
|
|
+ else if (isWatchActivated() <= 0)
|
|
|
return 2;
|
|
|
else if (isESimUnactivated())
|
|
|
return 3;
|
|
@@ -307,11 +307,6 @@ public class DataManager extends Application {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- //是否 watch 未激活
|
|
|
- public static boolean isWatchUnactivated() {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
//需要NetworkPIN解锁
|
|
|
public static boolean isSimLocked() {
|
|
|
TelephonyManager tm = (TelephonyManager)sContext.getSystemService(TELEPHONY_SERVICE);//取得相关系统服务
|
|
@@ -352,25 +347,17 @@ public class DataManager extends Application {
|
|
|
}
|
|
|
|
|
|
//是否 watch 激活
|
|
|
- public static int getIsWatchActivated() {
|
|
|
+ public static int isWatchActivated() {
|
|
|
return Settings.Global.getInt(sContext.getContentResolver(), MetaData.KEY_WATCH_ACTIVATED, 0);
|
|
|
}
|
|
|
|
|
|
- public static int getIsOnboardingFrom() {
|
|
|
- return Settings.Global.getInt(sContext.getContentResolver(), MetaData.KEY_ONBOARDING_FROM, 0);
|
|
|
- }
|
|
|
-
|
|
|
- public static void setFromOnboarding(int value) {
|
|
|
- Settings.Global.putInt(sContext.getContentResolver(), MetaData.KEY_ONBOARDING_FROM, value);
|
|
|
- }
|
|
|
-
|
|
|
- public static boolean getIsFactoryMode() {
|
|
|
+ public static boolean isFactoryMode() {
|
|
|
//是否为产线模式
|
|
|
return SystemProperties.getBoolean("persist.sys.factoryimage", false);
|
|
|
}
|
|
|
|
|
|
public static int getWatchStatus() {
|
|
|
- int isActivated = getIsWatchActivated();
|
|
|
+ int isActivated = isWatchActivated();
|
|
|
int networkStatus = NetworkUtil.getConnectivityStatus(sContext);
|
|
|
if (isActivated <= 0)
|
|
|
return -1;
|