Some GA for Floating Calculator
This commit is contained in:
parent
c0a7076c6b
commit
d82cbcb7fc
@ -47,9 +47,7 @@
|
||||
<option name="USE_CUSTOM_SETTINGS" value="true" />
|
||||
</AndroidXmlCodeStyleSettings>
|
||||
<XML>
|
||||
<option name="XML_KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
|
||||
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||
</XML>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<indentOptions>
|
||||
@ -68,7 +66,7 @@
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:android</NAME>
|
||||
<XML_NAMESPACE />
|
||||
<XML_NAMESPACE>Namespace:</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
@ -76,7 +74,7 @@
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:.*</NAME>
|
||||
<XML_NAMESPACE />
|
||||
<XML_NAMESPACE>Namespace:</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
|
@ -90,4 +90,19 @@ public final class Ga implements SharedPreferences.OnSharedPreferenceChangeListe
|
||||
reportLayout(Preferences.Gui.layout.getPreferenceNoError(preferences));
|
||||
reportTheme(Preferences.Gui.theme.getPreferenceNoError(preferences));
|
||||
}
|
||||
|
||||
public void onBootStart() {
|
||||
final HitBuilders.EventBuilder b = new HitBuilders.EventBuilder();
|
||||
b.setCategory("lifecycle");
|
||||
b.setAction("boot");
|
||||
tracker.send(b.build());
|
||||
}
|
||||
|
||||
public void onFloatingCalculatorOpened() {
|
||||
final HitBuilders.EventBuilder b = new HitBuilders.EventBuilder();
|
||||
b.setCategory("lifecycle");
|
||||
b.setAction("floating_calculator");
|
||||
b.setLabel("start");
|
||||
tracker.send(b.build());
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ import android.preference.PreferenceManager;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.solovyev.android.calculator.App;
|
||||
import org.solovyev.android.calculator.Preferences;
|
||||
|
||||
/**
|
||||
@ -50,6 +51,7 @@ public final class CalculatorOnscreenBroadcastReceiver extends BroadcastReceiver
|
||||
if (Preferences.OnscreenCalculator.startOnBoot.getPreferenceNoError(preferences)) {
|
||||
CalculatorOnscreenService.showNotification(context);
|
||||
}
|
||||
App.getGa().onBootStart();
|
||||
} else {
|
||||
final Intent newIntent = new Intent(intent);
|
||||
newIntent.setClass(context, CalculatorOnscreenService.class);
|
||||
|
@ -154,6 +154,7 @@ public class CalculatorOnscreenService extends Service implements OnscreenViewLi
|
||||
if (isShowWindowIntent(intent)) {
|
||||
hideNotification();
|
||||
createView();
|
||||
App.getGa().onFloatingCalculatorOpened();
|
||||
} else if (isShowNotificationIntent(intent)) {
|
||||
showNotification();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user