зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1566367 - [3.0] Add GVE example telemetry delegate. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38900 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2708b11d94
Коммит
5efb6dc130
|
@ -19,6 +19,7 @@ import org.mozilla.geckoview.GeckoView;
|
|||
import org.mozilla.geckoview.WebExtension;
|
||||
import org.mozilla.geckoview.WebExtensionController;
|
||||
import org.mozilla.geckoview.WebRequestError;
|
||||
import org.mozilla.geckoview.RuntimeTelemetry;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
|
@ -152,7 +153,8 @@ public class GeckoViewActivity extends AppCompatActivity {
|
|||
.contentBlocking(new ContentBlocking.Settings.Builder()
|
||||
.categories(ContentBlocking.AT_DEFAULT)
|
||||
.build())
|
||||
.crashHandler(ExampleCrashHandler.class);
|
||||
.crashHandler(ExampleCrashHandler.class)
|
||||
.telemetryDelegate(new ExampleTelemetryDelegate());
|
||||
|
||||
sGeckoRuntime = GeckoRuntime.create(this, runtimeSettingsBuilder.build());
|
||||
|
||||
|
@ -1145,4 +1147,12 @@ public class GeckoViewActivity extends AppCompatActivity {
|
|||
notificationManager.notify(mNotificationId, builder.build());
|
||||
}
|
||||
}
|
||||
|
||||
private final class ExampleTelemetryDelegate
|
||||
implements RuntimeTelemetry.Delegate {
|
||||
@Override
|
||||
public void onTelemetryReceived(final @NonNull RuntimeTelemetry.Metric metric) {
|
||||
Log.d(LOGTAG, "onTelemetryReceived " + metric);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче