upcase name for ArrayList constant
This commit is contained in:
parent
8e8a7c0b74
commit
f0ddc16aea
@ -79,7 +79,7 @@ public class FDroidMetricsWorker extends Worker {
|
|||||||
|
|
||||||
static SimpleDateFormat weekFormatter = new SimpleDateFormat("yyyy ww", Locale.ENGLISH);
|
static SimpleDateFormat weekFormatter = new SimpleDateFormat("yyyy ww", Locale.ENGLISH);
|
||||||
|
|
||||||
private static final ArrayList<MatomoEvent> events = new ArrayList<>();
|
private static final ArrayList<MatomoEvent> EVENTS = new ArrayList<>();
|
||||||
|
|
||||||
public FDroidMetricsWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
|
public FDroidMetricsWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
|
||||||
super(context, workerParams);
|
super(context, workerParams);
|
||||||
@ -259,11 +259,11 @@ public class FDroidMetricsWorker extends Worker {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
App[] installedApps = InstalledAppProvider.Helper.all(context);
|
App[] installedApps = InstalledAppProvider.Helper.all(context);
|
||||||
events.add(getDeviceEvent(weekStart, "isPrivilegedInstallerEnabled",
|
EVENTS.add(getDeviceEvent(weekStart, "isPrivilegedInstallerEnabled",
|
||||||
Preferences.get().isPrivilegedInstallerEnabled()));
|
Preferences.get().isPrivilegedInstallerEnabled()));
|
||||||
events.add(getDeviceEvent(weekStart, "Build.VERSION.SDK_INT", Build.VERSION.SDK_INT));
|
EVENTS.add(getDeviceEvent(weekStart, "Build.VERSION.SDK_INT", Build.VERSION.SDK_INT));
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
events.add(getDeviceEvent(weekStart, "Build.SUPPORTED_ABIS", Arrays.toString(Build.SUPPORTED_ABIS)));
|
EVENTS.add(getDeviceEvent(weekStart, "Build.SUPPORTED_ABIS", Arrays.toString(Build.SUPPORTED_ABIS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (PackageInfo packageInfo : packageInfoList) {
|
for (PackageInfo packageInfo : packageInfoList) {
|
||||||
@ -283,8 +283,8 @@ public class FDroidMetricsWorker extends Worker {
|
|||||||
addLastUpdateTimeEvent(pm, packageInfo);
|
addLastUpdateTimeEvent(pm, packageInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
events.addAll(parseInstallHistoryCsv(context, weekStart));
|
EVENTS.addAll(parseInstallHistoryCsv(context, weekStart));
|
||||||
cleanInsightsReport.events = events.toArray(new MatomoEvent[0]);
|
cleanInsightsReport.events = EVENTS.toArray(new MatomoEvent[0]);
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
mapper.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY);
|
mapper.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY);
|
||||||
@ -330,13 +330,13 @@ public class FDroidMetricsWorker extends Worker {
|
|||||||
matomoEvent.action = action;
|
matomoEvent.action = action;
|
||||||
matomoEvent.name = pm.getInstallerPackageName(packageInfo.packageName);
|
matomoEvent.name = pm.getInstallerPackageName(packageInfo.packageName);
|
||||||
matomoEvent.times = 1;
|
matomoEvent.times = 1;
|
||||||
for (MatomoEvent me : events) {
|
for (MatomoEvent me : EVENTS) {
|
||||||
if (me.equals(matomoEvent)) {
|
if (me.equals(matomoEvent)) {
|
||||||
me.times++;
|
me.times++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
events.add(matomoEvent);
|
EVENTS.add(matomoEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user