version:1.1.5
update: bugfixes:优化闹钟自动接听
This commit is contained in:
@@ -19,6 +19,7 @@ import com.xxpatx.os.bean.DailyAppBean;
|
||||
import com.xxpatx.os.dialog.DailyAppDialog;
|
||||
import com.xxpatx.os.manager.AppStatusManager;
|
||||
import com.xxpatx.os.network.NetInterfaceManager;
|
||||
import com.xxpatx.os.service.NotificationService;
|
||||
import com.xxpatx.os.utils.ApkUtils;
|
||||
import com.xxpatx.os.utils.AppUsedTimeUtils;
|
||||
|
||||
@@ -66,6 +67,16 @@ public class DailyAppAdapter extends RecyclerView.Adapter<DailyAppAdapter.Holder
|
||||
// SendRunningApp(mContext);
|
||||
}
|
||||
});
|
||||
int size = NotificationService.getNotificationLength(dailyAppBean.getPackageName());
|
||||
if (size == 0) {
|
||||
holder.bg.setVisibility(View.GONE);
|
||||
} else if (size < 99) {
|
||||
holder.bg.setVisibility(View.VISIBLE);
|
||||
holder.bg.setText(String.valueOf(size));
|
||||
} else {
|
||||
holder.bg.setVisibility(View.VISIBLE);
|
||||
holder.bg.setText("99+");
|
||||
}
|
||||
}
|
||||
|
||||
private void SendRunningApp(Context context) {
|
||||
@@ -135,12 +146,14 @@ public class DailyAppAdapter extends RecyclerView.Adapter<DailyAppAdapter.Holder
|
||||
ConstraintLayout root;
|
||||
ImageView iv_icon;
|
||||
TextView tv_name;
|
||||
TextView bg;
|
||||
|
||||
Holder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
root = itemView.findViewById(R.id.root);
|
||||
iv_icon = itemView.findViewById(R.id.iv_icon);
|
||||
tv_name = itemView.findViewById(R.id.tv_name);
|
||||
bg = itemView.findViewById(R.id.bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user