From 69bf8b413929858b2e4721e511e07470d8a35e2d Mon Sep 17 00:00:00 2001 From: Fanhuitong <981964879@qq.com> Date: Sun, 12 Mar 2023 19:19:47 +0800 Subject: [PATCH] =?UTF-8?q?version:1.1=20fix:=20update:=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 9 +- app/src/main/AndroidManifest.xml | 19 +- .../uiui/{zysn => zy}/IGetInfoInterface.aidl | 4 +- .../zyos/activity/main/MainAPresenter.java | 7 +- .../uiui/zyos/activity/main/MainActivity.java | 14 +- .../zyos/activity/more/MoreAppActivity.java | 82 +++ .../uiui/zyos/activity/more/MoreContact.java | 17 + .../zyos/activity/more/MorePresenter.java | 52 ++ .../main/java/com/uiui/zyos/bean/AppUsed.java | 45 ++ .../uiui/zyos/fragment/user/UserContact.java | 3 +- .../uiui/zyos/fragment/user/UserFragment.java | 28 +- .../zyos/fragment/user/UserPresenter.java | 36 ++ .../com/uiui/zyos/manager/RemoteManager.java | 22 +- .../java/com/uiui/zyos/utils/ApkUtils.java | 8 +- .../com/uiui/zyos/utils/OpenApkUtils.java | 4 +- .../java/com/uiui/zyos/utils/TimeUtils.java | 35 ++ app/src/main/res/drawable-hdpi/exit.png | Bin 0 -> 2994 bytes .../main/res/layout-land/fragment_user.xml | 12 +- .../main/res/layout-port/dialog_chinese.xml | 115 ---- .../res/layout-port/dialog_english_basics.xml | 357 ----------- .../res/layout-port/dialog_foundation.xml | 192 ------ .../main/res/layout-port/fragment_biology.xml | 135 ----- .../res/layout-port/fragment_chemical.xml | 136 ----- .../main/res/layout-port/fragment_chinese.xml | 557 ------------------ .../main/res/layout-port/fragment_complex.xml | 517 ---------------- .../main/res/layout-port/fragment_english.xml | 158 ----- .../main/res/layout-port/fragment_main.xml | 297 ---------- .../main/res/layout-port/fragment_math.xml | 510 ---------------- .../main/res/layout-port/fragment_physics.xml | 135 ----- .../res/layout-port/fragment_precision.xml | 129 ---- .../main/res/layout-port/fragment_subject.xml | 38 -- .../main/res/layout-port/fragment_user.xml | 445 -------------- .../activity_main.xml | 4 +- .../res/layout-sw800dp/fragment_biology.xml | 30 +- .../res/layout-sw800dp/fragment_chemical.xml | 30 +- .../res/layout-sw800dp/fragment_chinese.xml | 88 +-- .../res/layout-sw800dp/fragment_complex.xml | 92 +-- .../res/layout-sw800dp/fragment_english.xml | 42 +- .../main/res/layout-sw800dp/fragment_main.xml | 297 ---------- .../main/res/layout-sw800dp/fragment_math.xml | 80 +-- .../res/layout-sw800dp/fragment_physics.xml | 30 +- .../res/layout-sw800dp/fragment_precision.xml | 30 +- .../main/res/layout-sw800dp/fragment_user.xml | 43 +- app/src/main/res/layout/activity_moreapp.xml | 66 +++ app/src/main/res/values/strings.xml | 2 + 45 files changed, 658 insertions(+), 4294 deletions(-) rename app/src/main/aidl/com/uiui/{zysn => zy}/IGetInfoInterface.aidl (87%) create mode 100644 app/src/main/java/com/uiui/zyos/activity/more/MoreAppActivity.java create mode 100644 app/src/main/java/com/uiui/zyos/activity/more/MoreContact.java create mode 100644 app/src/main/java/com/uiui/zyos/activity/more/MorePresenter.java create mode 100644 app/src/main/java/com/uiui/zyos/bean/AppUsed.java create mode 100644 app/src/main/res/drawable-hdpi/exit.png delete mode 100644 app/src/main/res/layout-port/dialog_chinese.xml delete mode 100644 app/src/main/res/layout-port/dialog_english_basics.xml delete mode 100644 app/src/main/res/layout-port/dialog_foundation.xml delete mode 100644 app/src/main/res/layout-port/fragment_biology.xml delete mode 100644 app/src/main/res/layout-port/fragment_chemical.xml delete mode 100644 app/src/main/res/layout-port/fragment_chinese.xml delete mode 100644 app/src/main/res/layout-port/fragment_complex.xml delete mode 100644 app/src/main/res/layout-port/fragment_english.xml delete mode 100644 app/src/main/res/layout-port/fragment_main.xml delete mode 100644 app/src/main/res/layout-port/fragment_math.xml delete mode 100644 app/src/main/res/layout-port/fragment_physics.xml delete mode 100644 app/src/main/res/layout-port/fragment_precision.xml delete mode 100644 app/src/main/res/layout-port/fragment_subject.xml delete mode 100644 app/src/main/res/layout-port/fragment_user.xml rename app/src/main/res/{layout-port => layout-sw800dp}/activity_main.xml (99%) delete mode 100644 app/src/main/res/layout-sw800dp/fragment_main.xml create mode 100644 app/src/main/res/layout/activity_moreapp.xml diff --git a/app/build.gradle b/app/build.gradle index 14a21db..acdebc8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,12 +16,9 @@ android { applicationId "com.uiui.zyos" minSdkVersion 24 targetSdkVersion 29 - /*TeclastMTK12*/ - versionCode 7 - versionName "1.6" -// /*展锐*/ -// versionCode 1 -// versionName "1.0" + + versionCode 2 + versionName "1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d714e92..05e1f56 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -73,7 +73,7 @@ android:resumeWhilePausing="true" android:screenOrientation="userLandscape" android:stateNotNeeded="true" - android:taskAffinity="com.example.taskaffinity.newtask" + android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation|touchscreen" android:windowSoftInputMode="adjustPan"> @@ -90,9 +90,12 @@ android:excludeFromRecents="true" android:screenOrientation="portrait" android:theme="@style/activity_styles" /> - - + + - - - + @@ -170,7 +171,6 @@ - - - + lifecycle; @@ -111,7 +112,9 @@ public class MainAPresenter implements MainContact.Presenter { AppUsedTimeUtils.getInstance().sendRunningApp(new AppUsedTimeUtils.RunningAppCallback() { @Override public void onComplete() { - mView.sendRunningInfoFinish(); + if (mView != null) { + mView.sendRunningInfoFinish(); + } } }); } diff --git a/app/src/main/java/com/uiui/zyos/activity/main/MainActivity.java b/app/src/main/java/com/uiui/zyos/activity/main/MainActivity.java index 77fbed0..1689d20 100644 --- a/app/src/main/java/com/uiui/zyos/activity/main/MainActivity.java +++ b/app/src/main/java/com/uiui/zyos/activity/main/MainActivity.java @@ -108,6 +108,8 @@ public class MainActivity extends BaseActivity implements MainContact.MainView, @Override public void initView() { + Log.e(TAG, "initView: "); + ButterKnife.bind(this); // toggleNotificationListenerService(this); mPresenter = new MainAPresenter(this); @@ -146,26 +148,26 @@ public class MainActivity extends BaseActivity implements MainContact.MainView, mSubjectFragment.setPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - Log.e("mSubjectFragment", "onPageScrolled: position = " + position + " positionOffset = " + positionOffset + " positionOffsetPixels = " + positionOffsetPixels); +// Log.e("mSubjectFragment", "onPageScrolled: position = " + position + " positionOffset = " + positionOffset + " positionOffsetPixels = " + positionOffsetPixels); mMagicIndicator.onPageScrolled(position + 1, positionOffset, positionOffsetPixels); } @Override public void onPageSelected(int position) { - Log.e("mSubjectFragment", "onPageSelected: position = " + position); +// Log.e("mSubjectFragment", "onPageSelected: position = " + position); mMagicIndicator.onPageSelected(position + 1); } @Override public void onPageScrollStateChanged(int state) { - Log.e("mSubjectFragment", "onPageSelected: state = " + state); +// Log.e("mSubjectFragment", "onPageSelected: state = " + state); mMagicIndicator.onPageScrollStateChanged(state); } }); mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - Log.e("mViewPager", "onPageScrolled: position = " + position + " positionOffset = " + positionOffset + " positionOffsetPixels = " + positionOffsetPixels); +// Log.e("mViewPager", "onPageScrolled: position = " + position + " positionOffset = " + positionOffset + " positionOffsetPixels = " + positionOffsetPixels); if (!(position == 1 && positionOffsetPixels == 0)) { if (position <= 1) { mMagicIndicator.onPageScrolled(position, positionOffset, positionOffsetPixels); @@ -175,7 +177,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView, @Override public void onPageSelected(int position) { - Log.e("mViewPager", "onPageSelected: position = " + position); +// Log.e("mViewPager", "onPageSelected: position = " + position); if (position <= 1) { mMagicIndicator.onPageSelected(position); } @@ -183,7 +185,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView, @Override public void onPageScrollStateChanged(int state) { - Log.e("mViewPager", "onPageSelected: state = " + state); +// Log.e("mViewPager", "onPageSelected: state = " + state); mMagicIndicator.onPageScrollStateChanged(state); } }); diff --git a/app/src/main/java/com/uiui/zyos/activity/more/MoreAppActivity.java b/app/src/main/java/com/uiui/zyos/activity/more/MoreAppActivity.java new file mode 100644 index 0000000..e908ccd --- /dev/null +++ b/app/src/main/java/com/uiui/zyos/activity/more/MoreAppActivity.java @@ -0,0 +1,82 @@ +package com.uiui.zyos.activity.more; + +import android.content.Context; +import android.util.DisplayMetrics; +import android.view.View; +import android.view.WindowManager; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.uiui.zyos.R; +import com.uiui.zyos.adapter.AppAdapter; +import com.uiui.zyos.base.BaseActivity; +import com.uiui.zyos.bean.DesktopIcon; +import com.uiui.zyos.view.RecyclerViewSpacesItemDecoration; + +import java.util.HashMap; +import java.util.List; + +import butterknife.BindView; +import butterknife.ButterKnife; + +public class MoreAppActivity extends BaseActivity implements MoreContact.MoreView { + + @BindView(R.id.iv_back) + ImageView iv_back; + @BindView(R.id.recyclerView) + RecyclerView recyclerView; + @BindView(R.id.tv_appsize) + TextView tv_appsize; + + private MorePresenter mPresenter; + private AppAdapter mAppAdapter; + + + @Override + public int getLayoutId() { + return R.layout.activity_moreapp; + } + + @Override + public void initView() { + ButterKnife.bind(this); + mPresenter = new MorePresenter(this); + mPresenter.attachView(this); + mPresenter.setLifecycle(lifecycleSubject); + + iv_back.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + finish(); + } + }); + recyclerView.setLayoutManager(new GridLayoutManager(this, 6)); + HashMap stringIntegerHashMap = new HashMap<>(); + WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE); + DisplayMetrics dm = new DisplayMetrics(); + wm.getDefaultDisplay().getRealMetrics(dm); + float density = dm.density; // 屏幕密度(0.75 / 1.0 / 1.5) + stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.TOP_DECORATION, (int) (density * 1));//top间距 + stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.BOTTOM_DECORATION, (int) (density * 1));//底部间距 + stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.LEFT_DECORATION, (int) (density * 20));//左间距 + stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.RIGHT_DECORATION, (int) (density * 20));//右间距 + recyclerView.addItemDecoration(new RecyclerViewSpacesItemDecoration(stringIntegerHashMap)); + mAppAdapter = new AppAdapter(); + recyclerView.setAdapter(mAppAdapter); + + } + + @Override + public void initData() { + mPresenter.getInstalledApp(); + } + + @Override + public void setDesktopIcons(List desktopIcons) { + mAppAdapter.setDesktopIcons(desktopIcons); + tv_appsize.setText(String.format(getString(R.string.app_size),desktopIcons.size())); + } +} diff --git a/app/src/main/java/com/uiui/zyos/activity/more/MoreContact.java b/app/src/main/java/com/uiui/zyos/activity/more/MoreContact.java new file mode 100644 index 0000000..f18f60c --- /dev/null +++ b/app/src/main/java/com/uiui/zyos/activity/more/MoreContact.java @@ -0,0 +1,17 @@ +package com.uiui.zyos.activity.more; + +import com.uiui.zyos.base.BasePresenter; +import com.uiui.zyos.base.BaseView; +import com.uiui.zyos.bean.DesktopIcon; + +import java.util.List; + +public class MoreContact { + public interface Presenter extends BasePresenter { + void getInstalledApp(); + } + + public interface MoreView extends BaseView { + void setDesktopIcons(List desktopIcons); + } +} diff --git a/app/src/main/java/com/uiui/zyos/activity/more/MorePresenter.java b/app/src/main/java/com/uiui/zyos/activity/more/MorePresenter.java new file mode 100644 index 0000000..955103f --- /dev/null +++ b/app/src/main/java/com/uiui/zyos/activity/more/MorePresenter.java @@ -0,0 +1,52 @@ +package com.uiui.zyos.activity.more; + +import android.content.Context; +import android.util.Log; + +import androidx.annotation.NonNull; + +import com.trello.rxlifecycle4.android.ActivityEvent; +import com.uiui.zyos.bean.DesktopIcon; +import com.uiui.zyos.utils.ApkUtils; + +import java.util.ArrayList; + +import io.reactivex.rxjava3.subjects.BehaviorSubject; + +public class MorePresenter implements MoreContact.Presenter { + private static final String TAG = MorePresenter.class.getSimpleName(); + + private Context mContext; + private MoreContact.MoreView mView; + + private BehaviorSubject lifecycle; + + void setLifecycle(BehaviorSubject lifecycle) { + this.lifecycle = lifecycle; + } + + public BehaviorSubject getLifecycle() { + return lifecycle; + } + + MorePresenter(Context context) { + this.mContext = context; + Log.e(TAG, "MainAPresenter: " + context.getClass()); + } + + @Override + public void attachView(@NonNull MoreContact.MoreView view) { + this.mView = view; + } + + @Override + public void detachView() { + this.mView = null; + } + + @Override + public void getInstalledApp() { + ArrayList desktopIcons = ApkUtils.queryFilterAppInfo(mContext); + mView.setDesktopIcons(desktopIcons); + } +} diff --git a/app/src/main/java/com/uiui/zyos/bean/AppUsed.java b/app/src/main/java/com/uiui/zyos/bean/AppUsed.java new file mode 100644 index 0000000..874a719 --- /dev/null +++ b/app/src/main/java/com/uiui/zyos/bean/AppUsed.java @@ -0,0 +1,45 @@ +package com.uiui.zyos.bean; + +import androidx.annotation.NonNull; + +import com.google.gson.Gson; +import com.google.gson.JsonParser; + +import java.io.Serializable; + +public class AppUsed implements Serializable { + private static final long serialVersionUID = -317163343719361595L; + String packages; + long useTime; + String app_name; + + public String getPackages() { + return packages; + } + + public void setPackages(String packages) { + this.packages = packages; + } + + public long getUseTime() { + return useTime; + } + + public void setUseTime(long useTime) { + this.useTime = useTime; + } + + public String getApp_name() { + return app_name; + } + + public void setApp_name(String app_name) { + this.app_name = app_name; + } + + @NonNull + @Override + public String toString() { + return JsonParser.parseString(new Gson().toJson(this)).getAsJsonObject().toString(); + } +} diff --git a/app/src/main/java/com/uiui/zyos/fragment/user/UserContact.java b/app/src/main/java/com/uiui/zyos/fragment/user/UserContact.java index bf4d176..3d60dea 100644 --- a/app/src/main/java/com/uiui/zyos/fragment/user/UserContact.java +++ b/app/src/main/java/com/uiui/zyos/fragment/user/UserContact.java @@ -16,12 +16,13 @@ public class UserContact { void getSnInfo(); void getQrCode(); void getInstalledApp(); - + void getAppUsedStatistics(); } public interface UserView extends BaseView { void setSnInfo(BaseResponse response); void setQrCode(Bitmap bitmap); void setInstalledApp( ArrayList desktopIcons); + void setAppUsedStatistics(long time); } } diff --git a/app/src/main/java/com/uiui/zyos/fragment/user/UserFragment.java b/app/src/main/java/com/uiui/zyos/fragment/user/UserFragment.java index 951840f..7bc12fa 100644 --- a/app/src/main/java/com/uiui/zyos/fragment/user/UserFragment.java +++ b/app/src/main/java/com/uiui/zyos/fragment/user/UserFragment.java @@ -27,12 +27,14 @@ import com.bumptech.glide.Glide; import com.shehuan.niv.NiceImageView; import com.tencent.mmkv.MMKV; import com.uiui.zyos.R; +import com.uiui.zyos.activity.more.MoreAppActivity; import com.uiui.zyos.adapter.AppAdapter; import com.uiui.zyos.base.BaseFragment; import com.uiui.zyos.bean.BaseResponse; import com.uiui.zyos.bean.DesktopIcon; import com.uiui.zyos.bean.SnInfo; import com.uiui.zyos.config.CommonConfig; +import com.uiui.zyos.manager.RemoteManager; import com.uiui.zyos.utils.ApkUtils; import com.uiui.zyos.utils.TimeUtils; import com.uiui.zyos.utils.ToastUtil; @@ -93,6 +95,7 @@ public class UserFragment extends BaseFragment implements UserContact.UserView { @BindView(R.id.tv_activation) TextView tv_activation; + private AppAdapter mAppAdapter; private UserPresenter mPresenter; @@ -145,7 +148,8 @@ public class UserFragment extends BaseFragment implements UserContact.UserView { @Override public void fetchData() { Log.e(TAG, "fetchData: "); - mPresenter.getSnInfo(); +// mPresenter.getInstalledApp(); +// mPresenter.getSnInfo(); } @Override @@ -178,6 +182,9 @@ public class UserFragment extends BaseFragment implements UserContact.UserView { private void initView() { Log.e(TAG, "initView: "); + tv_notification.requestFocus(); + tv_activated.setOnClickListener(view -> ApkUtils.openPackage(mContext, RemoteManager.SN_PACKAGE_NAME)); + iv_avatar.setOnClickListener(view -> ApkUtils.openPackage(mContext, RemoteManager.SN_PACKAGE_NAME)); registerOwnReceiver(); String name = mMMKV.decodeString("USERINFO_NAME", ""); if (TextUtils.isEmpty(name)) { @@ -207,15 +214,21 @@ public class UserFragment extends BaseFragment implements UserContact.UserView { tv_activation.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - ApkUtils.openPackage(mContext, "com.uiui.zysn"); + ApkUtils.openPackage(mContext, RemoteManager.SN_PACKAGE_NAME); } }); String avatar = mMMKV.decodeString("USERINFO_AVATAR", ""); Glide.with(iv_avatar).load(avatar).error(R.drawable.default_avatar).into(iv_avatar); tv_date1.setText(TimeUtils.getDateAndWeek(System.currentTimeMillis())); tv_date2.setText(TimeUtils.getDateAndWeek(System.currentTimeMillis())); - rv_app.setLayoutManager(new GridLayoutManager(mContext, 4)); + cl_more.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + startActivity(new Intent(mContext, MoreAppActivity.class)); + } + }); + rv_app.setLayoutManager(new GridLayoutManager(mContext, 4)); HashMap stringIntegerHashMap = new HashMap<>(); WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); DisplayMetrics dm = new DisplayMetrics(); @@ -226,7 +239,6 @@ public class UserFragment extends BaseFragment implements UserContact.UserView { stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.LEFT_DECORATION, (int) (density * 20));//左间距 stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.RIGHT_DECORATION, (int) (density * 20));//右间距 rv_app.addItemDecoration(new RecyclerViewSpacesItemDecoration(stringIntegerHashMap)); - mAppAdapter = new AppAdapter(); rv_app.setAdapter(mAppAdapter); } @@ -321,6 +333,14 @@ public class UserFragment extends BaseFragment implements UserContact.UserView { rv_app.setVisibility(View.VISIBLE); mAppAdapter.setDesktopIcons(desktopIcons); } + mPresenter.getAppUsedStatistics(); + } + + @Override + public void setAppUsedStatistics(long time) { + Log.e(TAG, "setAppUsedStatistics: " + time); + String useTime = TimeUtils.formatTime(time); + tv_duration.setText(String.format(getString(R.string.today_study_time), useTime)); } private void registerOwnReceiver() { diff --git a/app/src/main/java/com/uiui/zyos/fragment/user/UserPresenter.java b/app/src/main/java/com/uiui/zyos/fragment/user/UserPresenter.java index afa8230..9e4c9fb 100644 --- a/app/src/main/java/com/uiui/zyos/fragment/user/UserPresenter.java +++ b/app/src/main/java/com/uiui/zyos/fragment/user/UserPresenter.java @@ -2,11 +2,14 @@ package com.uiui.zyos.fragment.user; import android.content.Context; import android.graphics.Bitmap; +import android.text.TextUtils; import android.util.Log; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.trello.rxlifecycle4.android.FragmentEvent; +import com.uiui.zyos.BuildConfig; +import com.uiui.zyos.bean.AppUsed; import com.uiui.zyos.bean.BaseResponse; import com.uiui.zyos.bean.DesktopIcon; import com.uiui.zyos.bean.SnInfo; @@ -21,6 +24,11 @@ import com.uiui.zyos.utils.Utils; import java.lang.reflect.Type; import java.util.ArrayList; +import java.util.List; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.ToLongFunction; +import java.util.stream.Collectors; import io.reactivex.rxjava3.annotations.NonNull; import io.reactivex.rxjava3.disposables.Disposable; @@ -102,4 +110,32 @@ public class UserPresenter implements UserContact.Presenter { ArrayList desktopIcons = ApkUtils.queryFilterAppInfo(mContext); mView.setInstalledApp(desktopIcons); } + + @Override + public void getAppUsedStatistics() { + String jsonString = RemoteManager.getInstance().getAppUsedStatistics(); + if (TextUtils.isEmpty(jsonString)) { + mView.setAppUsedStatistics(0); + } else { + Gson gson = new Gson(); + Type listType = new TypeToken>() { + }.getType(); + try { + List appUseds = gson.fromJson(jsonString, listType); + Log.e(TAG, "getAppUsedStatistics: " + appUseds); + List appUseTime = appUseds.stream().filter(new Predicate() { + @Override + public boolean test(AppUsed appUsed) { + return !BuildConfig.APPLICATION_ID.equals(appUsed.getPackages()) + && !"com.safe.uiui".equals(appUsed.getPackages()); + } + }).collect(Collectors.toList()); + long time = appUseTime.stream().mapToLong(AppUsed::getUseTime).sum(); + mView.setAppUsedStatistics(time); + } catch (Exception e) { + Log.e(TAG, "getAppUsedStatistics: " + e.getMessage()); + mView.setAppUsedStatistics(0); + } + } + } } diff --git a/app/src/main/java/com/uiui/zyos/manager/RemoteManager.java b/app/src/main/java/com/uiui/zyos/manager/RemoteManager.java index 052a8ad..922bd44 100644 --- a/app/src/main/java/com/uiui/zyos/manager/RemoteManager.java +++ b/app/src/main/java/com/uiui/zyos/manager/RemoteManager.java @@ -22,7 +22,7 @@ import com.tencent.mmkv.MMKV; import com.uiui.zyos.BuildConfig; import com.uiui.zyos.bean.MapBean; import com.uiui.zyos.config.CommonConfig; -import com.uiui.zysn.IGetInfoInterface; +import com.uiui.zy.IGetInfoInterface; import java.lang.reflect.Type; import java.util.ArrayList; @@ -42,9 +42,9 @@ public class RemoteManager { private IGetInfoInterface mGetInfoInterface; private ServiceConnection mServiceConnection; - private static final String SN_AIDL_NAME = "com.uiui.zysn.IGetInfoInterface"; - private static final String SN_PACKAGE_NAME = "com.uiui.zysn"; - private static final String SN_SERVICE_NAME = "com.uiui.zysn.service.RemoteService"; + private static final String SN_AIDL_NAME = "com.uiui.zy.IGetInfoInterface"; + public static final String SN_PACKAGE_NAME = "com.uiui.zy"; + private static final String SN_SERVICE_NAME = "com.uiui.zy.service.RemoteService"; private RemoteManager(Context context) { if (context == null) { @@ -206,6 +206,20 @@ public class RemoteManager { } } + public String getAppUsedStatistics() { + if (mGetInfoInterface != null) { + try { + String jsonString = mGetInfoInterface.getAppUsedStatistics(); + return jsonString; + } catch (Exception e) { + Log.e(TAG, "getAppUsedStatistics: " + e.getMessage()); + } + } else { + bindInfoService(); + } + return null; + } + public MapBean getMapBean() { String jsonString = mMMKV.decodeString(CommonConfig.MAP_LOCATION_JSON_KEY); if (TextUtils.isEmpty(jsonString)) { diff --git a/app/src/main/java/com/uiui/zyos/utils/ApkUtils.java b/app/src/main/java/com/uiui/zyos/utils/ApkUtils.java index 921685b..386b270 100644 --- a/app/src/main/java/com/uiui/zyos/utils/ApkUtils.java +++ b/app/src/main/java/com/uiui/zyos/utils/ApkUtils.java @@ -45,7 +45,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers; public class ApkUtils { private static HashSet excludePackageName = new HashSet() {{ this.add(BuildConfig.APPLICATION_ID); - this.add("com.uiui.zysn"); + this.add("com.uiui.zy"); this.add("com.uiui.zyos"); this.add("com.uiui.zybrowser"); this.add("com.uiui.zyappstore"); @@ -151,7 +151,7 @@ public class ApkUtils { this.add("com.android.gallery3d"); this.add("com.android.camera2"); this.add("com.android.settings"); - this.add("com.uiui.zysn"); + this.add("com.uiui.zy"); this.add("com.uiui.appstore"); }}; @@ -207,7 +207,7 @@ public class ApkUtils { } if (Settings.Global.getInt(context.getContentResolver(), "is_activity", 0) == 0) { resolveInfos.removeIf(resolveInfo -> "com.uiui.city".equals(resolveInfo.activityInfo.packageName)); -// resolveInfos.removeIf(applicationInfo -> "com.uiui.zysn".equals(applicationInfo.packageName)); +// resolveInfos.removeIf(applicationInfo -> "com.uiui.zy".equals(applicationInfo.packageName)); } resolveInfos.sort(new Comparator() { @Override @@ -227,8 +227,8 @@ public class ApkUtils { } } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); + return 0; } - return -1; } }); ArrayList desktopIcons = new ArrayList<>(); diff --git a/app/src/main/java/com/uiui/zyos/utils/OpenApkUtils.java b/app/src/main/java/com/uiui/zyos/utils/OpenApkUtils.java index 6e2427c..d325772 100644 --- a/app/src/main/java/com/uiui/zyos/utils/OpenApkUtils.java +++ b/app/src/main/java/com/uiui/zyos/utils/OpenApkUtils.java @@ -55,7 +55,7 @@ public class OpenApkUtils { private boolean checkActivation() { int is_activation = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0); if (is_activation != 1) { - ApkUtils.openPackage(mContext, "com.uiui.zysn"); + ApkUtils.openPackage(mContext, "com.uiui.zy"); ToastUtil.show("请激活设备后使用"); } return is_activation == 1; @@ -103,7 +103,7 @@ public class OpenApkUtils { * @return true为能打开 */ public boolean isCloudLessonMod(String pkg) { - if (mLessonJson==null) + if (mLessonJson == null) return true; if (mLessonJson.getIs_lesson() == 1) { if (mContralTime == null) { diff --git a/app/src/main/java/com/uiui/zyos/utils/TimeUtils.java b/app/src/main/java/com/uiui/zyos/utils/TimeUtils.java index ecaff2f..d6f43be 100644 --- a/app/src/main/java/com/uiui/zyos/utils/TimeUtils.java +++ b/app/src/main/java/com/uiui/zyos/utils/TimeUtils.java @@ -49,6 +49,41 @@ public class TimeUtils { return dateString + "\t" + getWeek(); } + public static String formatTime(Long s) { + if (s == 0) { + return "0分钟"; + } + Integer ss = 1; + Integer mi = ss * 60; + Integer hh = mi * 60; + Integer dd = hh * 24; + + Long day = s / dd; + Long hour = (s - day * dd) / hh; + Long minute = (s - day * dd - hour * hh) / mi; + Long second = (s - day * dd - hour * hh - minute * mi) / ss; + Long milliSecond = s - day * dd - hour * hh - minute * mi - second * ss; + + StringBuffer sb = new StringBuffer(); + if (day > 0) { + sb.append(day + "天"); + } + if (hour > 0) { + sb.append(hour + "小时"); + } + if (minute > 0) { + sb.append(minute + "分"); + } + if (second > 0) { + sb.append(second + "秒"); + } +// if (milliSecond > 0) { +// sb.append(milliSecond + "毫秒"); +// } + return sb.toString(); + } + + /** * 是否在管控时间内 * diff --git a/app/src/main/res/drawable-hdpi/exit.png b/app/src/main/res/drawable-hdpi/exit.png new file mode 100644 index 0000000000000000000000000000000000000000..8ac4207803692f9bec6d493250f9101d40c17d6a GIT binary patch literal 2994 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 B0oecm literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout-land/fragment_user.xml b/app/src/main/res/layout-land/fragment_user.xml index ada21b0..71bd5cf 100644 --- a/app/src/main/res/layout-land/fragment_user.xml +++ b/app/src/main/res/layout-land/fragment_user.xml @@ -79,7 +79,11 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/dp_4" android:layout_marginEnd="@dimen/dp_32" - android:maxLines="1" + android:ellipsize="marquee" + android:focusable="true" + android:focusableInTouchMode="true" + android:marqueeRepeatLimit="marquee_forever" + android:singleLine="true" android:text="@string/tips" android:textColor="@color/lightGray" android:textSize="@dimen/sp_8" @@ -229,7 +233,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_8" android:maxLines="1" - android:text="今日学习时间" + android:text="@string/today_study_time" android:textColor="@color/white" android:textSize="@dimen/sp_8" app:layout_constraintEnd_toEndOf="parent" @@ -356,7 +360,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_16" android:gravity="center_horizontal" - android:text="第二步\n通过小程序扫码绑定设备" + android:text="第二步\n扫码绑定设备" android:textColor="@color/white" android:textSize="@dimen/sp_8" app:layout_constraintEnd_toEndOf="@+id/iv_device_qrcode" @@ -421,6 +425,8 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_margin="@dimen/dp_8" + android:scrollbars="vertical" + android:fadeScrollbars="false" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/tv_date2" /> diff --git a/app/src/main/res/layout-port/dialog_chinese.xml b/app/src/main/res/layout-port/dialog_chinese.xml deleted file mode 100644 index 6727563..0000000 --- a/app/src/main/res/layout-port/dialog_chinese.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/dialog_english_basics.xml b/app/src/main/res/layout-port/dialog_english_basics.xml deleted file mode 100644 index e4b5aae..0000000 --- a/app/src/main/res/layout-port/dialog_english_basics.xml +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/dialog_foundation.xml b/app/src/main/res/layout-port/dialog_foundation.xml deleted file mode 100644 index 1a70e82..0000000 --- a/app/src/main/res/layout-port/dialog_foundation.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_biology.xml b/app/src/main/res/layout-port/fragment_biology.xml deleted file mode 100644 index d458f33..0000000 --- a/app/src/main/res/layout-port/fragment_biology.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_chemical.xml b/app/src/main/res/layout-port/fragment_chemical.xml deleted file mode 100644 index e9c0380..0000000 --- a/app/src/main/res/layout-port/fragment_chemical.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_chinese.xml b/app/src/main/res/layout-port/fragment_chinese.xml deleted file mode 100644 index f5da555..0000000 --- a/app/src/main/res/layout-port/fragment_chinese.xml +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_complex.xml b/app/src/main/res/layout-port/fragment_complex.xml deleted file mode 100644 index 77a03a8..0000000 --- a/app/src/main/res/layout-port/fragment_complex.xml +++ /dev/null @@ -1,517 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_english.xml b/app/src/main/res/layout-port/fragment_english.xml deleted file mode 100644 index 31cf328..0000000 --- a/app/src/main/res/layout-port/fragment_english.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_main.xml b/app/src/main/res/layout-port/fragment_main.xml deleted file mode 100644 index 21fed49..0000000 --- a/app/src/main/res/layout-port/fragment_main.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_math.xml b/app/src/main/res/layout-port/fragment_math.xml deleted file mode 100644 index a851ffd..0000000 --- a/app/src/main/res/layout-port/fragment_math.xml +++ /dev/null @@ -1,510 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_physics.xml b/app/src/main/res/layout-port/fragment_physics.xml deleted file mode 100644 index f4b99df..0000000 --- a/app/src/main/res/layout-port/fragment_physics.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_precision.xml b/app/src/main/res/layout-port/fragment_precision.xml deleted file mode 100644 index 3131f53..0000000 --- a/app/src/main/res/layout-port/fragment_precision.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_subject.xml b/app/src/main/res/layout-port/fragment_subject.xml deleted file mode 100644 index 3f9b01f..0000000 --- a/app/src/main/res/layout-port/fragment_subject.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/fragment_user.xml b/app/src/main/res/layout-port/fragment_user.xml deleted file mode 100644 index f11fee3..0000000 --- a/app/src/main/res/layout-port/fragment_user.xml +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-port/activity_main.xml b/app/src/main/res/layout-sw800dp/activity_main.xml similarity index 99% rename from app/src/main/res/layout-port/activity_main.xml rename to app/src/main/res/layout-sw800dp/activity_main.xml index 1eafadc..b676c01 100644 --- a/app/src/main/res/layout-port/activity_main.xml +++ b/app/src/main/res/layout-sw800dp/activity_main.xml @@ -34,7 +34,7 @@ android:id="@+id/constraintLayout2" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/dp_2" + android:layout_marginBottom="@dimen/dp_8" android:background="@drawable/custom_bg_ai" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -45,8 +45,8 @@ android:layout_height="match_parent" android:layout_marginTop="@dimen/dp_4" android:layout_marginEnd="@dimen/dp_4" - android:layout_marginStart="@dimen/dp_4" android:layout_marginBottom="@dimen/dp_2" + android:layout_marginStart="@dimen/dp_4" android:orientation="horizontal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout-sw800dp/fragment_biology.xml b/app/src/main/res/layout-sw800dp/fragment_biology.xml index 900f270..61ed1d8 100644 --- a/app/src/main/res/layout-sw800dp/fragment_biology.xml +++ b/app/src/main/res/layout-sw800dp/fragment_biology.xml @@ -22,8 +22,8 @@ @@ -73,8 +73,8 @@ android:layout_height="match_parent"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-sw800dp/fragment_math.xml b/app/src/main/res/layout-sw800dp/fragment_math.xml index d5de6da..1666004 100644 --- a/app/src/main/res/layout-sw800dp/fragment_math.xml +++ b/app/src/main/res/layout-sw800dp/fragment_math.xml @@ -21,8 +21,8 @@ - - @@ -219,7 +222,7 @@ android:maxLines="1" android:text="学习时长超过同用户" android:textColor="@color/white" - android:textSize="@dimen/sp_8" + android:textSize="@dimen/sp_7" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/tv_percent" /> @@ -232,7 +235,7 @@ android:maxLines="1" android:text="今日学习时间" android:textColor="@color/white" - android:textSize="@dimen/sp_8" + android:textSize="@dimen/sp_7" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView5" /> @@ -280,9 +283,9 @@ android:paddingEnd="@dimen/dp_6" android:paddingBottom="@dimen/dp_2" android:text="输入激活码" - android:visibility="gone" android:textColor="@color/white" android:textSize="@dimen/sp_8" + android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -357,7 +360,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_12" android:gravity="center_horizontal" - android:text="第二步\n通过小程序扫码绑定设备" + android:text="第二步\n扫码绑定设备" android:textColor="@color/white" android:textSize="@dimen/sp_6" app:layout_constraintEnd_toEndOf="@+id/iv_device_qrcode" @@ -376,12 +379,12 @@ android:id="@+id/tv_date2" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/dp_8" - android:layout_marginTop="@dimen/dp_8" + android:layout_marginStart="@dimen/dp_6" + android:layout_marginTop="@dimen/dp_6" android:maxLines="1" android:text="2月14日 星期二" android:textColor="@color/white" - android:textSize="@dimen/sp_12" + android:textSize="@dimen/sp_7" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -395,8 +398,8 @@ @@ -422,6 +425,8 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_margin="@dimen/dp_8" + android:scrollbars="vertical" + android:fadeScrollbars="false" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/tv_date2" /> diff --git a/app/src/main/res/layout/activity_moreapp.xml b/app/src/main/res/layout/activity_moreapp.xml new file mode 100644 index 0000000..3b4ff7c --- /dev/null +++ b/app/src/main/res/layout/activity_moreapp.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e946bee..107736f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -14,5 +14,7 @@ Hello blank fragment 努力不为感动谁,只为不与最好的自己失之交臂。趁着最美好的年华,继续奋斗吧。 + %d款应用 + 今日学习时间%s