Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
Updater: 移除 cdn 链接
Browse files Browse the repository at this point in the history
* 均已失效
  • Loading branch information
YuKongA committed Jan 9, 2024
1 parent 3989098 commit 035ad6c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ class MainViewModel : ViewModel() {
var bigversion: String? = null
var officialDownload: String? = null
var officialText: String? = null
var cdnDownload: String? = null
var changelog: String? = null
}
5 changes: 0 additions & 5 deletions app/src/main/kotlin/top/yukonga/update/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ class MainActivity : AppCompatActivity() {
) else getString(R.string.official2_link, recoveryRomInfo.currentRom.version, recoveryRomInfo.currentRom.filename)
officialText = if (recoveryRomInfo.currentRom.md5 == recoveryRomInfo.latestRom?.md5) getString(R.string.official, "ultimateota")
else getString(R.string.official, "bigota")
cdnDownload = if (recoveryRomInfo.currentRom.md5 == recoveryRomInfo.latestRom?.md5) getString(
R.string.cdn_link, recoveryRomInfo.currentRom.version, recoveryRomInfo.latestRom.filename
) else getString(R.string.cdn_link, recoveryRomInfo.currentRom.version, recoveryRomInfo.currentRom.filename)
changelog = log.toString().trimEnd()
}
} else {
Expand Down Expand Up @@ -440,8 +437,6 @@ class MainActivity : AppCompatActivity() {
officialDownload.setDownloadClickListener(mainViewModel.filename, mainViewModel.officialDownload!!)
official.text = mainViewModel.officialText
officialCopy.setCopyClickListener(mainViewModel.officialDownload)
cdnDownload.setDownloadClickListener(mainViewModel.filename, mainViewModel.cdnDownload!!)
cdnCopy.setCopyClickListener(mainViewModel.cdnDownload)
} else {
secondViewArray.forEach {
if (it.isVisible) it.fadOutAnimation()
Expand Down
49 changes: 0 additions & 49 deletions app/src/main/res/layout-land/main_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -525,55 +525,6 @@

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:contentDescription="@string/cdn"
android:elegantTextHeight="true"
android:text="@string/cdn"
android:textColor="?attr/colorOnSurfaceVariant"
android:textIsSelectable="true"
android:textSize="15sp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:orientation="horizontal">

<com.google.android.material.button.MaterialButton
android:id="@+id/cdn_copy"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="18dp"
android:contentDescription="@string/copy_button"
android:elegantTextHeight="true"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/copy_button" />

<com.google.android.material.button.MaterialButton
android:id="@+id/cdn_download"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/download_button"
android:elegantTextHeight="true"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/download_button" />

</LinearLayout>

</LinearLayout>

</LinearLayout>

</com.google.android.material.card.MaterialCardView>
Expand Down
46 changes: 0 additions & 46 deletions app/src/main/res/layout/main_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -505,52 +505,6 @@

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:elegantTextHeight="true"
android:text="@string/cdn"
android:textColor="?attr/colorOnSurfaceVariant"
android:textIsSelectable="true"
android:textSize="15sp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:orientation="horizontal">

<com.google.android.material.button.MaterialButton
android:id="@+id/cdn_copy"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="18dp"
android:elegantTextHeight="true"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/copy_button" />

<com.google.android.material.button.MaterialButton
android:id="@+id/cdn_download"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elegantTextHeight="true"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/download_button" />

</LinearLayout>

</LinearLayout>

</LinearLayout>

</com.google.android.material.card.MaterialCardView>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
<string name="using_v2">Using v2 interface</string>
<string name="logged_in">Logged in</string>
<string name="official" translatable="false">Official (%1$s)</string>
<string name="cdn" translatable="false">CDN (orig.bigota)</string>
<string name="official1_link" translatable="false">https://ultimateota.d.miui.com/%1$s/%2$s</string>
<string name="official2_link" translatable="false">https://bigota.d.miui.com/%1$s/%2$s</string>
<string name="cdn_link" translatable="false">http://orig.bigota.d.miui.com/%1$s/%2$s</string>
<string name="copy_button">Copy</string>
<string name="download_button">Download</string>
<string name="unknown_error">Failed to get security key</string>
Expand Down

0 comments on commit 035ad6c

Please sign in to comment.