version:3.1
fix: update:桌面布局优化,增加手动更新和手动绑定
This commit is contained in:
@@ -95,7 +95,12 @@ public class NoticeActivity extends AppCompatActivity {
|
||||
finish();
|
||||
}
|
||||
Log.e(TAG, "onCreate: " + alarmClockData);
|
||||
showData(alarmClockData);
|
||||
jz_video.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showData(alarmClockData);
|
||||
}
|
||||
},1234);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -102,10 +102,10 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
|
||||
is_twoscreen = Settings.Global.getInt(getContentResolver(), "is_twoscreen", 1) == 1;
|
||||
if (is_twoscreen) {
|
||||
// appListIndex = 2;
|
||||
// defaultCurrent = 1;
|
||||
// mSecondFragment = new SecondFragment();
|
||||
// mFragments.add(mSecondFragment);
|
||||
appListIndex = 2;
|
||||
defaultCurrent = 1;
|
||||
mSecondFragment = new SecondFragment();
|
||||
mFragments.add(mSecondFragment);
|
||||
}
|
||||
mCustomFragment = new CustomFragment();
|
||||
mFragments.add(mCustomFragment);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.uiuios.aios.adapter;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -17,6 +18,7 @@ import com.bumptech.glide.Glide;
|
||||
import com.shehuan.niv.NiceImageView;
|
||||
import com.uiuios.aios.R;
|
||||
import com.uiuios.aios.bean.Contact;
|
||||
import com.uiuios.aios.utils.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -44,6 +46,11 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactH
|
||||
contactHolder.root.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// int aole_call_forbid = Settings.System.getInt(mContext.getContentResolver(), "aole_call_forbid", 0);
|
||||
// if (aole_call_forbid == 1) {
|
||||
// ToastUtil.show("电话功能被禁用");
|
||||
// return;
|
||||
// }
|
||||
Intent intent1 = new Intent(Intent.ACTION_CALL);
|
||||
String phone = contact.getMobile();
|
||||
if (DIALER_PACKAGE.equals(phone)) {
|
||||
|
||||
@@ -8,4 +8,15 @@ public class CommonConfig {
|
||||
public static final String MAP_LATITUDE_KEY = "map_latitude_key";
|
||||
public static final String MAP_ADDRESS_KEY = "map_address_key";
|
||||
public static final String MAP_ERROR_KEY = "map_error_key";
|
||||
|
||||
/*是否激活接口请求缓存*/
|
||||
public static final String ACTIVATION_BEAN_KEY = "AIOS_UIUI_ACTIVATION_BEAN_KEY";
|
||||
/*是否激活*/
|
||||
public static final String UIUI_ACTIVATION_KEY = "aios_uiui_activation";
|
||||
/*激活码类型*/
|
||||
public static final String UIUI_CODE_TYPE_KEY = "aios_uiui_code_type";
|
||||
/*体验到期时间戳*/
|
||||
public static final String UIUI_EXPIRE_TIME_KEY = "aios_uiui_expire_time";
|
||||
|
||||
public static final String SETTING_OTHER_APPINSTALLER_KEY = "setting_other_appInstaller";
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.uiuios.aios.activity.code.FamilySpaceActivity;
|
||||
import com.uiuios.aios.base.BaseFragment;
|
||||
import com.uiuios.aios.bean.BaseResponse;
|
||||
import com.uiuios.aios.bean.DesktopIcon;
|
||||
import com.uiuios.aios.config.CommonConfig;
|
||||
import com.uiuios.aios.dialog.CustomDialog;
|
||||
import com.uiuios.aios.manager.AppStatusManager;
|
||||
import com.uiuios.aios.network.NetInterfaceManager;
|
||||
@@ -155,7 +156,7 @@ public class AppListFragment extends BaseFragment {
|
||||
int appSize = AppStatusManager.getInstance().getPackageList().size();
|
||||
if (appSize == 0) {
|
||||
bg.setVisibility(View.GONE);
|
||||
} else {
|
||||
} else {
|
||||
bg.setVisibility(View.VISIBLE);
|
||||
bg.setText(String.valueOf(appSize));
|
||||
}
|
||||
@@ -203,23 +204,42 @@ public class AppListFragment extends BaseFragment {
|
||||
// startActivity(new Intent(mContext, FamilySpaceActivity.class));
|
||||
ApkUtils.openApp(mContext, "com.uiui.videoplayer");
|
||||
break;
|
||||
case "aios.appstore":
|
||||
ApkUtils.openApp(mContext, "com.uiuios.appstore");
|
||||
break;
|
||||
case "com.android.dialer":
|
||||
int qch_call_forbid = Settings.System.getInt(mContext.getContentResolver(), "aole_call_forbid", 0);
|
||||
if (qch_call_forbid == 1) {
|
||||
ToastUtil.show("电话功能被禁用");
|
||||
return;
|
||||
// int aole_call_forbid = Settings.System.getInt(mContext.getContentResolver(), "aole_call_forbid", 0);
|
||||
// if (aole_call_forbid == 1) {
|
||||
// ToastUtil.show("电话功能被禁用");
|
||||
// return;
|
||||
// } else {
|
||||
ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName(), desktopIcon.getClassName());
|
||||
AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName());
|
||||
AppUsedTimeUtils.getInstance().setStartTime(System.currentTimeMillis());
|
||||
SendRunningApp(getActivity());
|
||||
// }
|
||||
break;
|
||||
case "com.uiuios.aios":
|
||||
case "com.uiuios.sn":
|
||||
case "com.uiuios.appstore":
|
||||
case "com.uiuios.browser":
|
||||
ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName(), desktopIcon.getClassName());
|
||||
AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName());
|
||||
AppUsedTimeUtils.getInstance().setStartTime(System.currentTimeMillis());
|
||||
SendRunningApp(getActivity());
|
||||
break;
|
||||
default:
|
||||
int setting_other_appInstaller = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.SETTING_OTHER_APPINSTALLER_KEY, 1);
|
||||
if (setting_other_appInstaller == 0
|
||||
&& !ApkUtils.isSystemApp(mContext, desktopIcon.getPackageName()
|
||||
)) {
|
||||
ToastUtil.show("已禁止应用打开");
|
||||
} else {
|
||||
ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName(), desktopIcon.getClassName());
|
||||
AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName());
|
||||
AppUsedTimeUtils.getInstance().setStartTime(System.currentTimeMillis());
|
||||
SendRunningApp(getActivity());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName(), desktopIcon.getClassName());
|
||||
AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName());
|
||||
AppUsedTimeUtils.getInstance().setStartTime(System.currentTimeMillis());
|
||||
SendRunningApp(getActivity());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,7 +561,8 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
cl_appstore.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ApkUtils.openPackage(mContext, "com.uiuios.appstore");
|
||||
// ApkUtils.openPackage(mContext, "com.uiuios.appstore");
|
||||
ApkUtils.openPackage(mContext, "com.uiui.videoplayer", "com.uiui.videoplayer.activity.main.MainActivity");
|
||||
}
|
||||
});
|
||||
cl_wifi.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -663,6 +664,11 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
}
|
||||
|
||||
private void checkContact() {
|
||||
// int aole_call_forbid = Settings.System.getInt(mContext.getContentResolver(), "aole_call_forbid", 0);
|
||||
// if (aole_call_forbid == 1) {
|
||||
// ToastUtil.show("电话功能被禁用");
|
||||
// return;
|
||||
// }
|
||||
startActivity(new Intent(mContext, ContactActivity.class));
|
||||
}
|
||||
|
||||
@@ -719,7 +725,7 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
}
|
||||
|
||||
private void checkActivation() {
|
||||
int activation = Settings.Global.getInt(mContext.getContentResolver(), "uiui_activation", 0);
|
||||
int activation = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0);
|
||||
if (activation == 0) {
|
||||
tv_name.setText("未激活");
|
||||
} else {
|
||||
@@ -731,6 +737,7 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
|
||||
private void setQuickApp() {
|
||||
quickAppPackagesName = Settings.Global.getString(mCRv, QuickAppActivity.QUICK_APP_KEY);
|
||||
Log.e(TAG, "setQuickApp: " + quickAppPackagesName);
|
||||
if (!TextUtils.isEmpty(quickAppPackagesName)) {
|
||||
ApplicationInfo applicationInfo = null;
|
||||
PackageManager pm = mContext.getPackageManager();
|
||||
@@ -742,6 +749,8 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
if (applicationInfo != null) {
|
||||
iv_app.setImageDrawable(applicationInfo.loadIcon(pm));
|
||||
}
|
||||
} else {
|
||||
iv_app.setImageDrawable(mContext.getDrawable(R.drawable.home_quick_app));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,11 @@ public class ApkUtils {
|
||||
this.add("com.tencent.android.qqdownloader");
|
||||
// this.add("com.uiuios.appstore");
|
||||
this.add("com.joytv.live");
|
||||
this.add("com.uiuios.appstore");
|
||||
this.add("com.teclast.zyos");
|
||||
this.add("com.teclast.zy");
|
||||
this.add("com.teclast.zyappstore");
|
||||
this.add("com.teclast.zybrowser");
|
||||
}};
|
||||
|
||||
private static HashSet<String> excludeClassName = new HashSet<String>() {{
|
||||
@@ -171,7 +176,6 @@ public class ApkUtils {
|
||||
if (!TextUtils.isEmpty(appListString)) {
|
||||
packageList = new ArrayList<>(Arrays.asList(appListString.split(",")));
|
||||
}
|
||||
int setting_other_appInstaller = Settings.Global.getInt(context.getContentResolver(), "setting_other_appInstaller", 1);
|
||||
for (ResolveInfo resolveInfo : resolveinfoList) {
|
||||
String pkg = resolveInfo.activityInfo.packageName;
|
||||
if (appIsDisable(context, pkg)) {
|
||||
@@ -184,15 +188,16 @@ public class ApkUtils {
|
||||
resolveInfos.add(resolveInfo);
|
||||
}
|
||||
} else {
|
||||
if (setting_other_appInstaller == 0) {//不显示自己安装的
|
||||
if (packageList.contains(pkg)) {
|
||||
resolveInfos.add(resolveInfo);
|
||||
}
|
||||
} else {
|
||||
// int setting_other_appInstaller = Settings.Global.getInt(context.getContentResolver(), "setting_other_appInstaller", 1);
|
||||
// if (setting_other_appInstaller == 0) {//不显示自己安装的
|
||||
// if (packageList.contains(pkg)) {
|
||||
// resolveInfos.add(resolveInfo);
|
||||
// }
|
||||
// } else {
|
||||
if (allowPackages.contains(pkg) && !excludePackageName.contains(pkg)) {
|
||||
resolveInfos.add(resolveInfo);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
if (Settings.Global.getInt(context.getContentResolver(), "is_activity", 0) == 0) {
|
||||
@@ -235,9 +240,9 @@ public class ApkUtils {
|
||||
desktopIcons.add(0, dailyIcon);
|
||||
|
||||
DesktopIcon familyIcon = new DesktopIcon();
|
||||
familyIcon.setIcon(context.getDrawable(R.drawable.icon_family_space));
|
||||
familyIcon.setLable("家庭空间");
|
||||
familyIcon.setPackageName("aios.family");
|
||||
familyIcon.setIcon(context.getDrawable(R.drawable.com_android_appstore));
|
||||
familyIcon.setLable("应用市场");
|
||||
familyIcon.setPackageName("aios.appstore");
|
||||
desktopIcons.add(1, familyIcon);
|
||||
|
||||
return desktopIcons;
|
||||
|
||||
@@ -9,6 +9,7 @@ public class IconUtils {
|
||||
public static List<String> appClassNameList = new ArrayList<String>() {{
|
||||
this.add("com.uiuios.sn");//设别信息
|
||||
this.add("com.uiuios.appstore");//应用市场
|
||||
this.add("aios.appstore");//应用市场
|
||||
this.add("com.uiui.weather");//天气
|
||||
this.add("com.android.browser");//浏览器
|
||||
this.add("com.uiuios.browser");//浏览器
|
||||
@@ -47,6 +48,7 @@ public class IconUtils {
|
||||
public static List<String> appIconList = new ArrayList<String>() {{
|
||||
this.add("com_uiui_sn");
|
||||
this.add("com_android_appstore");
|
||||
this.add("com_android_appstore");
|
||||
this.add("com_uiui_weather");
|
||||
this.add("com_android_browser");
|
||||
this.add("com_android_browser");
|
||||
|
||||
Reference in New Issue
Block a user