Skip to content

Commit

Permalink
Fixed data saver issue.
Browse files Browse the repository at this point in the history
Refreshed coin lists.
Update to sdk 33
  • Loading branch information
hwki committed Sep 17, 2022
1 parent 0f6f96d commit e3c5a7b
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 15 deletions.
14 changes: 7 additions & 7 deletions bitcoin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ plugins {
}

android {
compileSdk 32
compileSdk 33

defaultConfig {
applicationId "com.brentpanther.bitcoinwidget"
minSdk 23
targetSdk 32
versionCode 301
versionName "8.2.5"
targetSdk 33
versionCode 303
versionName "8.2.6"

javaCompileOptions {
annotationProcessorOptions {
Expand Down Expand Up @@ -66,16 +66,16 @@ android {
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.core:core-ktx:1.8.0"
implementation "androidx.core:core-ktx:1.9.0"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.fragment:fragment-ktx:1.5.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.2'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.google.android.material:material:1.6.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ object NetworkStatusHelper {
private fun checkBackgroundData(context: Context): Int {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
val restrictBackgroundStatus = connectivityManager.restrictBackgroundStatus
if (restrictBackgroundStatus == ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED) {
if (connectivityManager.restrictBackgroundStatus == ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED &&
connectivityManager.isActiveNetworkMetered) {
return R.string.error_restricted_data_saver
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.brentpanther.bitcoinwidget.exchange.ExchangeHelper.getJsonArray
import com.brentpanther.bitcoinwidget.exchange.ExchangeHelper.getJsonObject
import com.google.gson.JsonObject
import okhttp3.Headers
import java.util.*
import kotlin.math.pow

enum class Exchange(val exchangeName: String, shortName: String? = null) {
Expand Down
2 changes: 1 addition & 1 deletion bitcoin/src/main/res/raw/cryptowidgetcoins_v2.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bitcoin/src/main/res/raw/othercoins.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bitcoin/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<item>ISO</item>
<item>NONE</item>
</string-array>
<string name="json_last_modified" translatable="false">Sat, 11 Jun 2022 23:31:36 GMT</string>
<string name="json_last_modified" translatable="false">Sat, 17 Sep 2022 18:42:47 GMT</string>
<string name="json_url" translatable="false">https://www.brentpanther.com/cryptowidgetcoins_v2.json</string>

<string name="settings_updating_data">Updating coin data…</string>
Expand Down
2 changes: 2 additions & 0 deletions bitcoin/src/main/res/xml/widget_price.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
android:updatePeriodMillis="0"
android:minWidth="110dp"
android:minHeight="40dp"
android:minResizeWidth="1dp"
android:minResizeHeight="1dp"
android:targetCellHeight="1"
android:targetCellWidth="2"
android:initialLayout="@layout/widget_price_solid_light"
Expand Down
2 changes: 2 additions & 0 deletions bitcoin/src/main/res/xml/widget_value.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
android:updatePeriodMillis="0"
android:minWidth="110dp"
android:minHeight="40dp"
android:minResizeWidth="1dp"
android:minResizeHeight="1dp"
android:targetCellHeight="1"
android:targetCellWidth="2"
android:initialLayout="@layout/widget_value_solid_light"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/303.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fixed issue where widgets wouldn't refresh while using data saver on wifi.
Refreshed coin lists.
Fix minimum resize issue.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit e3c5a7b

Please sign in to comment.