version:1.2.9
update: fix: add:
This commit is contained in:
@@ -105,9 +105,9 @@ android {
|
|||||||
|
|
||||||
newl {
|
newl {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
// versionCode 168
|
versionCode 169
|
||||||
versionCode 1036
|
// versionCode 1036
|
||||||
versionName "1.2.8"
|
versionName "1.2.9"
|
||||||
/*********************************极光推送************************************/
|
/*********************************极光推送************************************/
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ public class MainPresenter implements MainContact.Presenter {
|
|||||||
int code = jsonObject.get("code").getAsInt();
|
int code = jsonObject.get("code").getAsInt();
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
String data = jsonObject.get("data").getAsJsonObject().get("result").getAsString();
|
String data = jsonObject.get("data").getAsJsonObject().get("result").getAsString();
|
||||||
JGYUtils.getInstance().writeAppPackageList(data);
|
JGYUtils.getInstance().writeAppPackageList(mContext,data);
|
||||||
mView.getAppLimitFinished(data);
|
mView.getAppLimitFinished(data);
|
||||||
} else {
|
} else {
|
||||||
mView.getAppLimitFinished("");
|
mView.getAppLimitFinished("");
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.provider.Settings;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
@@ -60,10 +61,10 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
// setWebView();
|
// setWebView();
|
||||||
// hideStatusBar();
|
// hideStatusBar();
|
||||||
Log.e(TAG, "DebugTest: " + HttpHeaders.getUserAgent());
|
Log.e(TAG, "DebugTest: " + HttpHeaders.getUserAgent());
|
||||||
|
boolean qch_force_app = Settings.System.putString(getContentResolver(), "qch_launcher_icon_app", "");
|
||||||
|
Log.e(TAG, "DebugTest: "+ Settings.System.getString(getContentResolver(), "qch_launcher_icon_app"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
private void hideStatusBar() {
|
private void hideStatusBar() {
|
||||||
StatusBarManager mStatusBarManager = (StatusBarManager) getApplicationContext().getSystemService(Context.STATUS_BAR_SERVICE);
|
StatusBarManager mStatusBarManager = (StatusBarManager) getApplicationContext().getSystemService(Context.STATUS_BAR_SERVICE);
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public class MainService extends Service implements MainContact.MainView {
|
|||||||
mPresenter = new MainPresenter(this);
|
mPresenter = new MainPresenter(this);
|
||||||
mPresenter.attachView(this);
|
mPresenter.attachView(this);
|
||||||
registerReceivers();
|
registerReceivers();
|
||||||
|
addShortcut();
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,6 +91,11 @@ public class MainService extends Service implements MainContact.MainView {
|
|||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addShortcut(){
|
||||||
|
String result = Settings.System.getString(getContentResolver(), "qch_app_forbid");
|
||||||
|
ApkUtils.addShortcut(MainService.this, result);
|
||||||
|
}
|
||||||
|
|
||||||
private void registerReceivers() {
|
private void registerReceivers() {
|
||||||
registerLockScreenReceiver();
|
registerLockScreenReceiver();
|
||||||
registerTimeReceiver();
|
registerTimeReceiver();
|
||||||
|
|||||||
@@ -994,14 +994,16 @@ public class ApkUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void addShortcut(Context context, String packageList) {
|
public static void addShortcut(Context context, String packageList) {
|
||||||
|
Log.e("addShortcut", "addShortcut: " + packageList);
|
||||||
if (TextUtils.isEmpty(packageList)) {
|
if (TextUtils.isEmpty(packageList)) {
|
||||||
|
Settings.System.putString(context.getContentResolver(), "qch_launcher_icon_app", "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String[] stringList = packageList.split(",");
|
String[] stringList = packageList.split(",");
|
||||||
List<String> packages = new ArrayList<>(Arrays.asList(stringList));
|
List<String> packages = new ArrayList<>(Arrays.asList(stringList));
|
||||||
String installedList = "";
|
String installedList = "";
|
||||||
for (String s : packages) {
|
for (String s : packages) {
|
||||||
if (s.equals("com.jiaoguanyi.store") || s.equals("com.jiaoguanyi.appstore")) {
|
if ("com.jiaoguanyi.store".equals(s) || "com.jiaoguanyi.appstore".equals(s)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!ApkUtils.isAvailable(context, s)) {
|
if (!ApkUtils.isAvailable(context, s)) {
|
||||||
|
|||||||
@@ -427,7 +427,8 @@ public class JGYUtils {
|
|||||||
SysSettingUtils.setSystemSetting(mContext, data);
|
SysSettingUtils.setSystemSetting(mContext, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeAppPackageList(String result) {
|
public void writeAppPackageList(Context context, String result) {
|
||||||
|
ApkUtils.addShortcut(context, result);
|
||||||
String appstore = "com.jiaoguanyi.appstore";
|
String appstore = "com.jiaoguanyi.appstore";
|
||||||
String store = "com.jiaoguanyi.store";
|
String store = "com.jiaoguanyi.store";
|
||||||
String info = "com.info.sn";
|
String info = "com.info.sn";
|
||||||
|
|||||||
Reference in New Issue
Block a user