/* * Copyright © 2020 WireGuard LLC. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ package com.wireguard.android.util import android.content.Context import android.util.TypedValue import androidx.annotation.AttrRes fun Context.resolveAttribute(@AttrRes attrRes: Int): Int { val typedValue = TypedValue() theme.resolveAttribute(attrRes, typedValue, true) return typedValue.data }