Commit 68c89ab7 authored by Your Name's avatar Your Name

.

parent 7fdf81bb
Pipeline #1419 canceled with stages
...@@ -118,7 +118,12 @@ public class MainActivity extends AppCompatActivity { ...@@ -118,7 +118,12 @@ public class MainActivity extends AppCompatActivity {
return null; return null;
}, },
() -> { () -> {
startActivity(new Intent(this, BatteryInfoActivity.class)); binding.appProcess.postDelayed(new Runnable() {
@Override
public void run() {
startActivity(new Intent(getApplicationContext(), BatteryInfoActivity.class));
}
},200);
return null; return null;
}); });
...@@ -192,20 +197,20 @@ public class MainActivity extends AppCompatActivity { ...@@ -192,20 +197,20 @@ public class MainActivity extends AppCompatActivity {
return null; return null;
}); });
}); });
binding.similarPhotos.setOnClickListener(v -> { // binding.similarPhotos.setOnClickListener(v -> {
AdmobHelper.INSTANCE.showInterstitialAd(this, () -> { // AdmobHelper.INSTANCE.showInterstitialAd(this, () -> {
startActivity(new Intent(this, SimilarPhotosActivity.class)); // startActivity(new Intent(this, SimilarPhotosActivity.class));
return null; // return null;
}, // },
() -> { // () -> {
return null; // return null;
}, // },
() -> { // () -> {
startActivity(new Intent(this, SimilarPhotosActivity.class)); // startActivity(new Intent(this, SimilarPhotosActivity.class));
return null; // return null;
}); // });
//
}); // });
} }
private void checkAndRequestPermissions() { private void checkAndRequestPermissions() {
......
...@@ -42,7 +42,11 @@ public class BatteryInfoActivity extends AppCompatActivity { ...@@ -42,7 +42,11 @@ public class BatteryInfoActivity extends AppCompatActivity {
} }
private void initShow() { private void initShow() {
binding.idActivityAppmanagerLoading.setVisibility(View.VISIBLE);
new Thread(new Runnable() {
@Override
public void run() {
PackageManager packageManager = getPackageManager(); PackageManager packageManager = getPackageManager();
List<ApplicationInfo> installedApps = packageManager.getInstalledApplications(0); List<ApplicationInfo> installedApps = packageManager.getInstalledApplications(0);
...@@ -71,14 +75,25 @@ public class BatteryInfoActivity extends AppCompatActivity { ...@@ -71,14 +75,25 @@ public class BatteryInfoActivity extends AppCompatActivity {
AppInfoBean appInfoBean = new AppInfoBean(appName, appIcon, packageInfo.packageName); AppInfoBean appInfoBean = new AppInfoBean(appName, appIcon, packageInfo.packageName);
apps.add(appInfoBean); apps.add(appInfoBean);
} }
runOnUiThread(new Runnable() {
@Override
public void run() {
binding.tvBatteryInfoNum.setText("(" + apps.size() + " in total)"); binding.tvBatteryInfoNum.setText("(" + apps.size() + " in total)");
binding.batteryRecy.setLayoutManager(new LinearLayoutManager(this)); binding.batteryRecy.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
adapter = new AppInfoAdapter(apps, this); adapter = new AppInfoAdapter(apps, getApplicationContext());
binding.batteryRecy.setAdapter(adapter); binding.batteryRecy.setAdapter(adapter);
binding.ivReturn.setOnClickListener(v -> { binding.ivReturn.setOnClickListener(v -> {
initCustDialog(); initCustDialog();
}); });
binding.idActivityAppmanagerLoading.setVisibility(View.GONE);
}
});
}
}).start();
} }
private void initBar() { private void initBar() {
......
...@@ -354,11 +354,14 @@ public class CleanJunkActivity extends AppCompatActivity { ...@@ -354,11 +354,14 @@ public class CleanJunkActivity extends AppCompatActivity {
List<CleanFileBean> apkSelectedFiles = apkCleanAdapter.getSelectedFiles(); List<CleanFileBean> apkSelectedFiles = apkCleanAdapter.getSelectedFiles();
List<CleanFileBean> tempSelectedFiles = tempCleanAdapter.getSelectedFiles(); List<CleanFileBean> tempSelectedFiles = tempCleanAdapter.getSelectedFiles();
List<CleanFileBean> logsSelectedFiles = logsCleanAdapter.getSelectedFiles(); List<CleanFileBean> logsSelectedFiles = logsCleanAdapter.getSelectedFiles();
List<CleanFileBean> emptySelectedFiles = emptyCleanAdapter.getSelectedFiles(); List<CleanFileBean> emptySelectedFiles;
apkCleanFiles(apkSelectedFiles); apkCleanFiles(apkSelectedFiles);
tempCleanFiles(tempSelectedFiles); tempCleanFiles(tempSelectedFiles);
logsCleanFiles(logsSelectedFiles); logsCleanFiles(logsSelectedFiles);
if (emptyCleanAdapter!=null){
emptySelectedFiles= emptyCleanAdapter.getSelectedFiles();
emptyCleanFiles(emptySelectedFiles); emptyCleanFiles(emptySelectedFiles);
}
selectedSize = 0; selectedSize = 0;
updateButtonStatus(); updateButtonStatus();
initAnimation(formatFileSize(selectedSize)); initAnimation(formatFileSize(selectedSize));
......
...@@ -146,25 +146,25 @@ public class EndCleanJunkActivity extends AppCompatActivity { ...@@ -146,25 +146,25 @@ public class EndCleanJunkActivity extends AppCompatActivity {
); );
}); });
binding.buttonSimilarPhotos.setOnClickListener(v->{ // binding.buttonSimilarPhotos.setOnClickListener(v->{
AdmobHelper.INSTANCE.showInterstitialAd(this, // AdmobHelper.INSTANCE.showInterstitialAd(this,
() -> { // () -> {
startActivity(new Intent(this, SimilarPhotosActivity.class)); // startActivity(new Intent(this, SimilarPhotosActivity.class));
finish(); // finish();
return null; // return null;
}, // },
() -> { // () -> {
//
return null; // return null;
}, // },
() -> { // () -> {
startActivity(new Intent(this, SimilarPhotosActivity.class)); // startActivity(new Intent(this, SimilarPhotosActivity.class));
finish(); // finish();
return null; // return null;
} // }
); // );
//
}); // });
binding.buttonScreenshot.setOnClickListener(v->{ binding.buttonScreenshot.setOnClickListener(v->{
AdmobHelper.INSTANCE.showInterstitialAd(this, AdmobHelper.INSTANCE.showInterstitialAd(this,
() -> { () -> {
......
...@@ -268,7 +268,9 @@ public class LargeFileActivity extends AppCompatActivity { ...@@ -268,7 +268,9 @@ public class LargeFileActivity extends AppCompatActivity {
binding.radarview.setSearching(true); binding.radarview.setSearching(true);
handler = new Handler(); handler = new Handler();
Intent intent = new Intent(this, EndCleanJunkActivity.class); Intent intent = new Intent(this, EndCleanJunkActivity.class);
AdmobHelper.INSTANCE.showAppOpenAd(this,
handler.postDelayed(() -> {
AdmobHelper.INSTANCE.showInterstitialAd(this,
() -> { () -> {
binding.radarview.setSearching(false); binding.radarview.setSearching(false);
intent.putExtra("cleanstr", str); intent.putExtra("cleanstr", str);
...@@ -287,8 +289,8 @@ public class LargeFileActivity extends AppCompatActivity { ...@@ -287,8 +289,8 @@ public class LargeFileActivity extends AppCompatActivity {
finish(); finish();
return null; return null;
} }
); );
}, 3000);
// handler.postDelayed(() -> { // handler.postDelayed(() -> {
// binding.radarview.setSearching(false); // binding.radarview.setSearching(false);
// intent.putExtra("cleanstr", str); // intent.putExtra("cleanstr", str);
......
...@@ -186,9 +186,10 @@ object AdmobHelper { ...@@ -186,9 +186,10 @@ object AdmobHelper {
appOpenAd = ad appOpenAd = ad
appOpenAdLoadTime = System.currentTimeMillis() appOpenAdLoadTime = System.currentTimeMillis()
loaded?.invoke() loaded?.invoke()
calculate(KEY_REQUEST_NUMBER) calculate(KEY_REQUEST_NUMBER)
ReportAdUtils.pullAd(ad.responseInfo, APP_OPEN_AD_UNIT, reqId = reqId) ReportAdUtils.pullAd(ad.responseInfo, APP_OPEN_AD_UNIT, reqId = reqId)
ad.onPaidEventListener = ReportAdUtils.EventOnPaidEventListener(ad) ad.onPaidEventListener = ReportAdUtils.EventOnPaidEventListener(ad,APP_OPEN_AD_UNIT)
isLoadingAppOpenAd = false isLoadingAppOpenAd = false
} }
}) })
...@@ -278,7 +279,7 @@ object AdmobHelper { ...@@ -278,7 +279,7 @@ object AdmobHelper {
loaded?.invoke() loaded?.invoke()
calculate(KEY_REQUEST_NUMBER) calculate(KEY_REQUEST_NUMBER)
ReportAdUtils.pullAd(ad.responseInfo, INTERSTITIAL_AD_UNIT, reqId = reqId) ReportAdUtils.pullAd(ad.responseInfo, INTERSTITIAL_AD_UNIT, reqId = reqId)
ad.onPaidEventListener = ReportAdUtils.EventOnPaidEventListener(ad) ad.onPaidEventListener = ReportAdUtils.EventOnPaidEventListener(ad,INTERSTITIAL_AD_UNIT)
isLoadingInterstitialAd = false isLoadingInterstitialAd = false
} }
}) })
...@@ -558,7 +559,7 @@ object AdmobHelper { ...@@ -558,7 +559,7 @@ object AdmobHelper {
.forNativeAd { ad: NativeAd -> .forNativeAd { ad: NativeAd ->
Log.e(TAG, "forNativeAd") Log.e(TAG, "forNativeAd")
ReportAdUtils.showAd(ad.responseInfo, NATIVE_AD_UNIT, activity) ReportAdUtils.showAd(ad.responseInfo, NATIVE_AD_UNIT, activity)
ad.setOnPaidEventListener(ReportAdUtils.EventOnPaidEventListener(ad)) ad.setOnPaidEventListener(ReportAdUtils.EventOnPaidEventListener(ad,NATIVE_AD_UNIT))
nativeAd = ad nativeAd = ad
completed?.invoke(ad) completed?.invoke(ad)
} }
......
...@@ -72,7 +72,7 @@ object ReportAdUtils { ...@@ -72,7 +72,7 @@ object ReportAdUtils {
taichiPref.edit() taichiPref.edit()
} }
class EventOnPaidEventListener(private val ad: Any?) : OnPaidEventListener { class EventOnPaidEventListener(private val ad: Any?,private val mAd_unit:String) : OnPaidEventListener {
override fun onPaidEvent(adValue: AdValue) { override fun onPaidEvent(adValue: AdValue) {
val valueMicros = adValue.valueMicros val valueMicros = adValue.valueMicros
val currencyCode = adValue.currencyCode val currencyCode = adValue.currencyCode
...@@ -136,6 +136,7 @@ object ReportAdUtils { ...@@ -136,6 +136,7 @@ object ReportAdUtils {
val mediationABTestName = extras.getString("mediation_ab_test_name") val mediationABTestName = extras.getString("mediation_ab_test_name")
val mediationABTestVariant = extras.getString("mediation_ab_test_variant") val mediationABTestVariant = extras.getString("mediation_ab_test_variant")
obj.put("adUnitId", adUnitId) obj.put("adUnitId", adUnitId)
obj.put("ad_unit", mAd_unit)
obj.put("adSourceName", adSourceName) obj.put("adSourceName", adSourceName)
obj.put("adSourceId", adSourceId) obj.put("adSourceId", adSourceId)
obj.put("adSourceInstanceName", adSourceInstanceName) obj.put("adSourceInstanceName", adSourceInstanceName)
...@@ -167,6 +168,8 @@ object ReportAdUtils { ...@@ -167,6 +168,8 @@ object ReportAdUtils {
obj.put("mediationABTestName", mediationABTestName) obj.put("mediationABTestName", mediationABTestName)
obj.put("mediationABTestVariant", mediationABTestVariant) obj.put("mediationABTestVariant", mediationABTestVariant)
obj.put("session_id", sessionId) obj.put("session_id", sessionId)
obj.put("ad_unit", mAd_unit)
} }
is RewardedAd -> { is RewardedAd -> {
...@@ -188,6 +191,8 @@ object ReportAdUtils { ...@@ -188,6 +191,8 @@ object ReportAdUtils {
obj.put("mediationABTestName", mediationABTestName) obj.put("mediationABTestName", mediationABTestName)
obj.put("mediationABTestVariant", mediationABTestVariant) obj.put("mediationABTestVariant", mediationABTestVariant)
obj.put("session_id", sessionId) obj.put("session_id", sessionId)
obj.put("ad_unit", mAd_unit)
} }
is NativeAd -> { is NativeAd -> {
...@@ -209,6 +214,7 @@ object ReportAdUtils { ...@@ -209,6 +214,7 @@ object ReportAdUtils {
obj.put("mediationABTestName", mediationABTestName) obj.put("mediationABTestName", mediationABTestName)
obj.put("mediationABTestVariant", mediationABTestVariant) obj.put("mediationABTestVariant", mediationABTestVariant)
obj.put("session_id", sessionId) obj.put("session_id", sessionId)
obj.put("ad_unit", mAd_unit)
} }
} }
ZxHttp.getHttpReportInterface("ad_price", "", ext = obj) ZxHttp.getHttpReportInterface("ad_price", "", ext = obj)
......
...@@ -10,6 +10,7 @@ import kotlinx.coroutines.GlobalScope ...@@ -10,6 +10,7 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import org.json.JSONObject import org.json.JSONObject
import java.util.UUID import java.util.UUID
import kotlin.math.log
object DeviceUtils { object DeviceUtils {
fun getScreenHeight(): Int { fun getScreenHeight(): Int {
...@@ -76,7 +77,7 @@ object DeviceUtils { ...@@ -76,7 +77,7 @@ object DeviceUtils {
} }
fun getConfigParms(): JSONObject { fun getConfigParms(): JSONObject {
var packname = "com.a.xxxxxx.m.storage.zxcv" var packname = "com.swiftcleaner.chovey"
var jsonObject = JSONObject() var jsonObject = JSONObject()
jsonObject.put("${packname}_1", getScreenHeight())//高度 jsonObject.put("${packname}_1", getScreenHeight())//高度
jsonObject.put("${packname}_2", getScreenWidth())//宽度 jsonObject.put("${packname}_2", getScreenWidth())//宽度
...@@ -92,6 +93,10 @@ object DeviceUtils { ...@@ -92,6 +93,10 @@ object DeviceUtils {
jsonObject.put("${packname}_14", getAndroidVersionCode())//android版本,如:13 jsonObject.put("${packname}_14", getAndroidVersionCode())//android版本,如:13
// jsonObject.put("${packname}_23","en")//语言 // jsonObject.put("${packname}_23","en")//语言
// jsonObject.put("${packname}_24", BuildConfig.BUILD_TYPE)//环境 // jsonObject.put("${packname}_24", BuildConfig.BUILD_TYPE)//环境
Log.d("glc","GID:"+ZxApplication.GID)
Log.d("glc","getAndroidID:"+getAndroidID())
return jsonObject return jsonObject
} }
} }
\ No newline at end of file
...@@ -69,6 +69,8 @@ ...@@ -69,6 +69,8 @@
app:layout_constraintStart_toEndOf="@id/tv_battery_info_text" app:layout_constraintStart_toEndOf="@id/tv_battery_info_text"
app:layout_constraintTop_toBottomOf="@id/battery_cl1" /> app:layout_constraintTop_toBottomOf="@id/battery_cl1" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/battery_recy" android:id="@+id/battery_recy"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -80,4 +82,14 @@ ...@@ -80,4 +82,14 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/id_activity_appmanager_loading"
android:layout_width="wrap_content"
android:text="loading..."
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -469,6 +469,7 @@ ...@@ -469,6 +469,7 @@
android:layout_height="155dp" android:layout_height="155dp"
android:layout_marginHorizontal="16dp" android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:visibility="gone"
android:background="@drawable/shape_radio_10dp_white" android:background="@drawable/shape_radio_10dp_white"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
...@@ -416,6 +416,7 @@ ...@@ -416,6 +416,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="72dp" android:layout_height="72dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:visibility="gone"
android:background="@drawable/shape_radio_20dp_white" android:background="@drawable/shape_radio_20dp_white"
app:layout_constraintEnd_toEndOf="@id/cl4" app:layout_constraintEnd_toEndOf="@id/cl4"
app:layout_constraintStart_toStartOf="@id/cl4" app:layout_constraintStart_toStartOf="@id/cl4"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment