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" />
|
<option name="USE_CUSTOM_SETTINGS" value="true" />
|
||||||
</AndroidXmlCodeStyleSettings>
|
</AndroidXmlCodeStyleSettings>
|
||||||
<XML>
|
<XML>
|
||||||
<option name="XML_KEEP_LINE_BREAKS" value="false" />
|
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||||
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
|
|
||||||
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
||||||
</XML>
|
</XML>
|
||||||
<codeStyleSettings language="JAVA">
|
<codeStyleSettings language="JAVA">
|
||||||
<indentOptions>
|
<indentOptions>
|
||||||
@ -68,7 +66,7 @@
|
|||||||
<match>
|
<match>
|
||||||
<AND>
|
<AND>
|
||||||
<NAME>xmlns:android</NAME>
|
<NAME>xmlns:android</NAME>
|
||||||
<XML_NAMESPACE />
|
<XML_NAMESPACE>Namespace:</XML_NAMESPACE>
|
||||||
</AND>
|
</AND>
|
||||||
</match>
|
</match>
|
||||||
</rule>
|
</rule>
|
||||||
@ -76,7 +74,7 @@
|
|||||||
<match>
|
<match>
|
||||||
<AND>
|
<AND>
|
||||||
<NAME>xmlns:.*</NAME>
|
<NAME>xmlns:.*</NAME>
|
||||||
<XML_NAMESPACE />
|
<XML_NAMESPACE>Namespace:</XML_NAMESPACE>
|
||||||
</AND>
|
</AND>
|
||||||
</match>
|
</match>
|
||||||
<order>BY_NAME</order>
|
<order>BY_NAME</order>
|
||||||
|
@ -90,4 +90,19 @@ public final class Ga implements SharedPreferences.OnSharedPreferenceChangeListe
|
|||||||
reportLayout(Preferences.Gui.layout.getPreferenceNoError(preferences));
|
reportLayout(Preferences.Gui.layout.getPreferenceNoError(preferences));
|
||||||
reportTheme(Preferences.Gui.theme.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 javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import org.solovyev.android.calculator.App;
|
||||||
import org.solovyev.android.calculator.Preferences;
|
import org.solovyev.android.calculator.Preferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,6 +51,7 @@ public final class CalculatorOnscreenBroadcastReceiver extends BroadcastReceiver
|
|||||||
if (Preferences.OnscreenCalculator.startOnBoot.getPreferenceNoError(preferences)) {
|
if (Preferences.OnscreenCalculator.startOnBoot.getPreferenceNoError(preferences)) {
|
||||||
CalculatorOnscreenService.showNotification(context);
|
CalculatorOnscreenService.showNotification(context);
|
||||||
}
|
}
|
||||||
|
App.getGa().onBootStart();
|
||||||
} else {
|
} else {
|
||||||
final Intent newIntent = new Intent(intent);
|
final Intent newIntent = new Intent(intent);
|
||||||
newIntent.setClass(context, CalculatorOnscreenService.class);
|
newIntent.setClass(context, CalculatorOnscreenService.class);
|
||||||
|
@ -154,6 +154,7 @@ public class CalculatorOnscreenService extends Service implements OnscreenViewLi
|
|||||||
if (isShowWindowIntent(intent)) {
|
if (isShowWindowIntent(intent)) {
|
||||||
hideNotification();
|
hideNotification();
|
||||||
createView();
|
createView();
|
||||||
|
App.getGa().onFloatingCalculatorOpened();
|
||||||
} else if (isShowNotificationIntent(intent)) {
|
} else if (isShowNotificationIntent(intent)) {
|
||||||
showNotification();
|
showNotification();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user