基线备份:thirdparty 变体完成 + Android 4.2 兼容改造前

包含内容:
- thirdparty flavor 独立 applicationId + Intent 入口(ThirdPartyEntryActivity)
- 58 后端接口适配(单 /api 路径、code 0/200、camelCase 字段、UNBOUND 轮询)
- MAC 硬件锚定校验(防一凭证多设备共用)
- EPG mac 覆盖 SDK init(sMacOverride)+ ChannelManger 初始化对齐
- 提示文案优化(设备未注册/权益未绑定)
This commit is contained in:
zhaogd
2026-08-25 11:16:40 +08:00
commit d11464d466
1287 changed files with 154945 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package com.pukka.jiecheng.utils;
public class PageNumberUtil {
/**
* 计算总页数
* */
public static int calculateTotalPages(int totalItems, int pageSize) {
if (totalItems <= 0) {
return 0; // 没有数据时返回0页
}
if (pageSize <= 0) {
throw new IllegalArgumentException("每页大小必须大于0");
}
return (totalItems - 1) / pageSize + 1;
}
/**
* 计算当前页数
* @param position 当前position
* @param itemsPerPage 每页项数
* */
public static int calculatePage(int position, int itemsPerPage) {
return (position / itemsPerPage) + 1;
}
}