Log: Switch to android's log class everywhere
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -32,6 +32,7 @@ import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.os.PowerManager
|
||||
import android.util.Log
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import androidx.browser.customtabs.CustomTabsIntent
|
||||
@@ -41,9 +42,10 @@ import androidx.core.content.ContextCompat
|
||||
import com.aurora.Constants
|
||||
import com.aurora.gplayapi.data.models.App
|
||||
import com.aurora.store.R
|
||||
import com.aurora.store.util.Log
|
||||
import com.aurora.store.util.Preferences
|
||||
|
||||
private const val TAG = "Context"
|
||||
|
||||
val Context.inflater: LayoutInflater
|
||||
get() = LayoutInflater.from(this)
|
||||
|
||||
@@ -51,8 +53,8 @@ fun Context.browse(url: String) {
|
||||
try {
|
||||
val customTabsIntent = CustomTabsIntent.Builder()
|
||||
customTabsIntent.build().launchUrl(this, Uri.parse(url))
|
||||
} catch (e: Exception) {
|
||||
Log.e(e.message)
|
||||
} catch (exception: Exception) {
|
||||
Log.e(TAG, "Failed to open custom tab", exception)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +68,7 @@ fun Context.share(app: App) {
|
||||
}
|
||||
startActivity(Intent.createChooser(sendIntent, getString(R.string.action_share)))
|
||||
} catch (exception: Exception) {
|
||||
Log.e("Failed to share app", exception)
|
||||
Log.e(TAG, "Failed to share app", exception)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,8 +79,8 @@ fun Context.openInfo(packageName: String) {
|
||||
Uri.parse("package:$packageName")
|
||||
)
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
|
||||
} catch (exception: Exception) {
|
||||
Log.e(TAG, "Failed to open app info page", exception)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user