|
|
|
@ -2,7 +2,6 @@ package io.legado.app.help |
|
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint |
|
|
|
|
import android.content.Context |
|
|
|
|
import android.content.pm.PackageManager |
|
|
|
|
import io.legado.app.App |
|
|
|
|
import io.legado.app.R |
|
|
|
|
import io.legado.app.constant.PreferKey |
|
|
|
@ -139,15 +138,3 @@ object AppConfig { |
|
|
|
|
val isGooglePlay: Boolean get() = App.INSTANCE.channel == "google" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val Context.channel: String |
|
|
|
|
get() { |
|
|
|
|
try { |
|
|
|
|
val pm = packageManager |
|
|
|
|
val appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA); |
|
|
|
|
return appInfo.metaData.getString("channel") ?: "" |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
return "" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|