reformat files recently touched
This commit is contained in:
@@ -67,13 +67,21 @@ open class AuthWorker @AssistedInject constructor(
|
|||||||
when (tokenPair.second) {
|
when (tokenPair.second) {
|
||||||
AuthHelper.Token.AAS -> {
|
AuthHelper.Token.AAS -> {
|
||||||
Log.i(TAG, "Refreshing AuthData for personal account")
|
Log.i(TAG, "Refreshing AuthData for personal account")
|
||||||
authProvider.buildGoogleAuthData(email, tokenPair.first, AuthHelper.Token.AAS).getOrThrow()
|
authProvider.buildGoogleAuthData(
|
||||||
|
email,
|
||||||
|
tokenPair.first,
|
||||||
|
AuthHelper.Token.AAS
|
||||||
|
).getOrThrow()
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthHelper.Token.AUTH -> {
|
AuthHelper.Token.AUTH -> {
|
||||||
Log.i(TAG, "Refreshing AuthData for personal account using AccountManager")
|
Log.i(
|
||||||
|
TAG,
|
||||||
|
"Refreshing AuthData for personal account using AccountManager"
|
||||||
|
)
|
||||||
val newToken = fetchAuthToken(email, tokenPair.first)
|
val newToken = fetchAuthToken(email, tokenPair.first)
|
||||||
authProvider.buildGoogleAuthData(email, newToken, AuthHelper.Token.AAS).getOrThrow()
|
authProvider.buildGoogleAuthData(email, newToken, AuthHelper.Token.AAS)
|
||||||
|
.getOrThrow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,7 +298,8 @@ class DownloadWorker @AssistedInject constructor(
|
|||||||
* @param gFile A [GPlayFile] to download
|
* @param gFile A [GPlayFile] to download
|
||||||
* @return A [Boolean] indicating whether the file was downloaded or not.
|
* @return A [Boolean] indicating whether the file was downloaded or not.
|
||||||
*/
|
*/
|
||||||
private suspend fun downloadFile(packageName: String, gFile: GPlayFile): Boolean = withContext(Dispatchers.IO) {
|
private suspend fun downloadFile(packageName: String, gFile: GPlayFile): Boolean =
|
||||||
|
withContext(Dispatchers.IO) {
|
||||||
Log.i(TAG, "Downloading $packageName @ ${gFile.name}")
|
Log.i(TAG, "Downloading $packageName @ ${gFile.name}")
|
||||||
val file = PathUtil.getLocalFile(appContext, gFile, download)
|
val file = PathUtil.getLocalFile(appContext, gFile, download)
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,12 @@ object NotificationUtil {
|
|||||||
builder.setContentIntent(getContentIntentForDetails(context, download.packageName))
|
builder.setContentIntent(getContentIntentForDetails(context, download.packageName))
|
||||||
|
|
||||||
// Show install action if app cannot be silently installed
|
// Show install action if app cannot be silently installed
|
||||||
if (!AppInstaller.canInstallSilently(context, download.packageName, download.targetSdk)) {
|
if (!AppInstaller.canInstallSilently(
|
||||||
|
context,
|
||||||
|
download.packageName,
|
||||||
|
download.targetSdk
|
||||||
|
)
|
||||||
|
) {
|
||||||
builder.addAction(
|
builder.addAction(
|
||||||
NotificationCompat.Action.Builder(
|
NotificationCompat.Action.Builder(
|
||||||
R.drawable.ic_install,
|
R.drawable.ic_install,
|
||||||
|
|||||||
Reference in New Issue
Block a user