// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.apksize;

import android.content.Context;
import com.google.android.datatransport.Event;
import com.google.android.datatransport.Transport;
import com.google.android.datatransport.TransportFactory;
import com.google.android.datatransport.cct.LegacyFlgDestination;
import com.google.android.datatransport.runtime.TransportRuntime;

public class TransportSample implements SampleCode {

  @Override
  public void runSample(Context context) {

    TransportRuntime.initialize(context);

    TransportFactory f =
        TransportRuntime.getInstance().newFactory(LegacyFlgDestination.DEFAULT_INSTANCE);
    Transport<String> t = f.getTransport("123", String.class, String::getBytes);
    t.send(Event.ofData("Hello"));
    t.send(Event.ofTelemetry(1, "World"));
  }
}

@@ -843,25 +843,19 @@
 ort.cct.
-LegacyFlg
+CCT
 Destinat
@@ -1158,17 +1158,11 @@
 ory(
-LegacyFlg
+CCT
 Dest
@@ -1173,16 +1173,8 @@
 ion.
-DEFAULT_
 INST

Update sample app to use new CCTDestination. (#872)