mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Previously, the usage analytics would generate a write to the user's HOME directory during the Fuchsia build. We're tightening down the environment in which we run the Fuchsia build, and these writes are now more obvious. This patch removes the usage analytics during the Fuchsia build, avoiding the write to the user's HOME directory.
49 lines
1.1 KiB
Dart
49 lines
1.1 KiB
Dart
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'dart:async';
|
|
|
|
import 'usage.dart';
|
|
|
|
class DisabledUsage implements Usage {
|
|
@override
|
|
bool get isFirstRun => false;
|
|
|
|
@override
|
|
bool get suppressAnalytics => true;
|
|
|
|
@override
|
|
set suppressAnalytics(bool value) { }
|
|
|
|
@override
|
|
bool get enabled => false;
|
|
|
|
@override
|
|
set enabled(bool value) { }
|
|
|
|
@override
|
|
String get clientId => null;
|
|
|
|
@override
|
|
void sendCommand(String command, { Map<String, String> parameters }) { }
|
|
|
|
@override
|
|
void sendEvent(String category, String parameter, { Map<String, String> parameters }) { }
|
|
|
|
@override
|
|
void sendTiming(String category, String variableName, Duration duration, { String label }) { }
|
|
|
|
@override
|
|
void sendException(dynamic exception, StackTrace trace) { }
|
|
|
|
@override
|
|
Stream<Map<String, dynamic>> get onSend => null;
|
|
|
|
@override
|
|
Future<Null> ensureAnalyticsSent() => new Future<Null>.value();
|
|
|
|
@override
|
|
void printWelcome() { }
|
|
}
|