https://help.github.com/en/articles/managing-commit-signature-verification
-
Check for existing GPG keys
gpg --list-secret-keys --keyid-format LONG
/* Copyright 2019 The Android Open Source Project | |
* | |
* 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 | |
* | |
* https://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, |
https://help.github.com/en/articles/managing-commit-signature-verification
Check for existing GPG keys
gpg --list-secret-keys --keyid-format LONG
/* Copyright 2019 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
public class LiveDataTestUtil { | |
public static <T> T getOrAwaitValue(final LiveData<T> liveData) throws InterruptedException { | |
final Object[] data = new Object[1]; | |
final CountDownLatch latch = new CountDownLatch(1); | |
Observer<T> observer = new Observer<T>() { | |
@Override | |
public void onChanged(@Nullable T o) { | |
data[0] = o; |
public class Activity extends AppCompatActivity{ | |
... | |
private NetworkConnectionMonitor connectionMonitor; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity); | |
... | |
connectionMonitor = new NetworkConnectionMonitor(getApplicationContext()); |