feat(build): 添加G122J平台构建配置并适配平台逻辑
This commit is contained in:
1 parent
b3bf7c77f5
commit
7458216cbc
6 files changed
+47
-12
No files matched your search
@@ -283,9 +283,32 @@ android {
|
|||||||
v1SigningEnabled true
|
v1SigningEnabled true
|
||||||
v2SigningEnabled true
|
v2SigningEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G122J {
|
||||||
|
storeFile file("keystore/G122J.p12")
|
||||||
|
storePassword "123456"
|
||||||
|
keyAlias "g122j"
|
||||||
|
keyPassword "123456"
|
||||||
|
v1SigningEnabled true
|
||||||
|
v2SigningEnabled true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
G122JDebug.initWith(debug)
|
||||||
|
G122JDebug {
|
||||||
|
buildConfigField "String", "platform", '"G122J"'
|
||||||
|
versionNameSuffix "_debug"
|
||||||
|
debuggable true
|
||||||
|
signingConfig signingConfigs.G122J
|
||||||
|
}
|
||||||
|
|
||||||
|
G122JRelease.initWith(release)
|
||||||
|
G122JRelease {
|
||||||
|
buildConfigField "String", "platform", '"G122J"'
|
||||||
|
signingConfig signingConfigs.G122J
|
||||||
|
}
|
||||||
|
|
||||||
G12NLDebug.initWith(debug)
|
G12NLDebug.initWith(debug)
|
||||||
G12NLDebug {
|
G12NLDebug {
|
||||||
buildConfigField "String", "platform", '"G12NL"'
|
buildConfigField "String", "platform", '"G12NL"'
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
G122JDebug {}
|
||||||
|
G122JRelease {}
|
||||||
MX11Debug {}
|
MX11Debug {}
|
||||||
MX11Release {}
|
MX11Release {}
|
||||||
G12NLDebug {}
|
G12NLDebug {}
|
||||||
|
|||||||
Binary file not shown.
@@ -208,12 +208,14 @@ public class NetInterfaceManager {
|
|||||||
set.add(JgyUtils.AUDG104Tag);
|
set.add(JgyUtils.AUDG104Tag);
|
||||||
} else if (platform == JgyUtils.seewoPlatform) {
|
} else if (platform == JgyUtils.seewoPlatform) {
|
||||||
set.add(JgyUtils.seewoTag);
|
set.add(JgyUtils.seewoTag);
|
||||||
} else if (platform == JgyUtils.QualcommPlatform) {
|
} else if (platform == JgyUtils.QualcommPlatform) {
|
||||||
set.add(JgyUtils.Qualcomm_TAG);
|
set.add(JgyUtils.Qualcomm_TAG);
|
||||||
} else if (platform == JgyUtils.DX11Platform) {
|
} else if (platform == JgyUtils.DX11Platform) {
|
||||||
set.add(JgyUtils.DX11_TAG);
|
set.add(JgyUtils.DX11_TAG);
|
||||||
} else if (platform == JgyUtils.G12NLPlatform) {
|
} else if (platform == JgyUtils.G12NLPlatform) {
|
||||||
set.add(JgyUtils.G12NL_TAG);
|
set.add(JgyUtils.G12NL_TAG);
|
||||||
|
} else if (platform == JgyUtils.G122JPlatform) {
|
||||||
|
set.add(JgyUtils.G122J_TAG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -111,16 +111,18 @@ public class ItemClickHandler {
|
|||||||
|
|
||||||
Object tag = v.getTag();
|
Object tag = v.getTag();
|
||||||
|
|
||||||
// 点击系统设置时,重定向到 onyx 设置页面
|
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.QualcommPlatform) {
|
||||||
String pkgName = getTagPackageName(tag);
|
// 点击系统设置时,重定向到 onyx 设置页面
|
||||||
if ("com.android.settings".equals(pkgName)) {
|
String pkgName = getTagPackageName(tag);
|
||||||
Intent onyxSettingsIntent = new Intent();
|
if ("com.android.settings".equals(pkgName)) {
|
||||||
onyxSettingsIntent.setComponent(
|
Intent onyxSettingsIntent = new Intent();
|
||||||
new ComponentName("com.onyx", "com.onyx.tablet.settings.SettingsActivity"));
|
onyxSettingsIntent.setComponent(
|
||||||
onyxSettingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
new ComponentName("com.onyx", "com.onyx.tablet.settings.SettingsActivity"));
|
||||||
launcher.startActivitySafely(v, onyxSettingsIntent,
|
onyxSettingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
tag instanceof ItemInfo ? (ItemInfo) tag : null, sourceContainer);
|
launcher.startActivitySafely(v, onyxSettingsIntent,
|
||||||
return;
|
tag instanceof ItemInfo ? (ItemInfo) tag : null, sourceContainer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag instanceof WorkspaceItemInfo) {
|
if (tag instanceof WorkspaceItemInfo) {
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class JgyUtils {
|
|||||||
public static final int QualcommPlatform = 30;
|
public static final int QualcommPlatform = 30;
|
||||||
public static final int DX11Platform = 31;
|
public static final int DX11Platform = 31;
|
||||||
public static final int G12NLPlatform = 32;
|
public static final int G12NLPlatform = 32;
|
||||||
|
public static final int G122JPlatform = 34;
|
||||||
|
|
||||||
|
|
||||||
public static final String Other = "其他";
|
public static final String Other = "其他";
|
||||||
@@ -69,7 +70,7 @@ public class JgyUtils {
|
|||||||
public static final String Qualcomm_TAG = "QualcommA";
|
public static final String Qualcomm_TAG = "QualcommA";
|
||||||
public static final String DX11_TAG = "DX11";
|
public static final String DX11_TAG = "DX11";
|
||||||
public static final String G12NL_TAG = "G12NL";
|
public static final String G12NL_TAG = "G12NL";
|
||||||
|
public static final String G122J_TAG = "G122J";
|
||||||
|
|
||||||
private JgyUtils(Context context) {
|
private JgyUtils(Context context) {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
@@ -136,6 +137,9 @@ public class JgyUtils {
|
|||||||
} else if (G12NL_TAG.equalsIgnoreCase(platform)) {
|
} else if (G12NL_TAG.equalsIgnoreCase(platform)) {
|
||||||
Log.i(TAG, "checkAppPlatform: " + "G12NL");
|
Log.i(TAG, "checkAppPlatform: " + "G12NL");
|
||||||
return G12NLPlatform;
|
return G12NLPlatform;
|
||||||
|
} else if (G122J_TAG.equalsIgnoreCase(platform)) {
|
||||||
|
Log.i(TAG, "checkAppPlatform: " + "G122J");
|
||||||
|
return G122JPlatform;
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||||
return UnknowPlatform;
|
return UnknowPlatform;
|
||||||
@@ -176,6 +180,8 @@ public class JgyUtils {
|
|||||||
getAppPlatformCallback.AppPlatform(DX11Platform);
|
getAppPlatformCallback.AppPlatform(DX11Platform);
|
||||||
} else if (G12NL_TAG.equalsIgnoreCase(platform)) {
|
} else if (G12NL_TAG.equalsIgnoreCase(platform)) {
|
||||||
getAppPlatformCallback.AppPlatform(G12NLPlatform);
|
getAppPlatformCallback.AppPlatform(G12NLPlatform);
|
||||||
|
} else if (G122J_TAG.equalsIgnoreCase(platform)) {
|
||||||
|
getAppPlatformCallback.AppPlatform(G122JPlatform);
|
||||||
} else {
|
} else {
|
||||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user