This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4395: Uplift Theme.resolveAttribute from Fenix r=pocmo a=NotWoods Uplifts functions from Fenix to get a color int from a theme. 4542: Public Suffix List update (20190926-142145) r=pocmo a=MickeyMoz Co-authored-by: Tiger Oakes <toakes@mozilla.com> Co-authored-by: MickeyMoz <sebastian@mozilla.com>
- Loading branch information
Showing
11 changed files
with
76 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+4 Bytes
(100%)
components/lib/publicsuffixlist/src/main/assets/publicsuffixes
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...nts/support/ktx/src/main/java/mozilla/components/support/ktx/android/content/res/Theme.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package mozilla.components.support.ktx.android.content.res | ||
|
||
import android.content.res.Resources | ||
import android.util.TypedValue | ||
import androidx.annotation.AnyRes | ||
import androidx.annotation.AttrRes | ||
|
||
/** | ||
* Resolves the resource ID corresponding to the given attribute. | ||
* | ||
* @sample | ||
* context.theme.resolveAttribute(R.attr.textColor) == R.color.light_text_color | ||
*/ | ||
@AnyRes | ||
fun Resources.Theme.resolveAttribute(@AttrRes attribute: Int): Int { | ||
val outValue = TypedValue() | ||
resolveAttribute(attribute, outValue, true) | ||
return outValue.resourceId | ||
} |
2 changes: 2 additions & 0 deletions
2
components/support/ktx/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mock-maker-inline | ||
// This allows mocking final classes (classes are final by default in Kotlin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters