Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void applyPermission(Context context) {
// ComponentName comp = new ComponentName("com.android.settings","com.android.settings.permission.single_app_activity");//此处可跳转到指定app对应的权限管理页面,但是需要相关权限,未解决
intent.setComponent(comp);
context.startActivity(intent);
e.printStackTrace();
Log.e("APlayer", "Error", e);
Log.e(TAG, Log.getStackTraceString(e));
} catch (Exception e) {
//抛出异常时提示信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static double getEmuiVersion() {
String version = emuiVersion.substring(emuiVersion.indexOf("_") + 1);
return Double.parseDouble(version);
} catch (Exception e) {
e.printStackTrace();
Log.e("APlayer", "Error", e);
}
return 4.0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package remix.myplayer.repo.usecase

import android.util.Log

import android.content.ContentResolver
import android.content.Context
import android.content.Intent
Expand Down Expand Up @@ -119,7 +121,7 @@ class PlayFromUriUseCase @Inject constructor(
return cursor.getString(columnIndex)
}
} catch (e: Exception) {
e.printStackTrace()
Log.e("APlayer", "Error", e)
} finally {
cursor?.close()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package remix.myplayer.service

import android.util.Log

import android.content.Context
import android.graphics.Bitmap
import android.graphics.drawable.BitmapDrawable
Expand Down Expand Up @@ -161,7 +163,7 @@ class MediaSessionUpdater @Inject constructor(
return try {
bitmap.copy(config, false)
} catch (e: OutOfMemoryError) {
e.printStackTrace()
Log.e("APlayer", "Error", e)
null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

package remix.myplayer.ui.blur;

import android.util.Log

import android.util.Log;

import android.graphics.Bitmap;
import java.io.FileOutputStream;
import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -81,7 +85,7 @@ public void saveIntoFile(String path) {
FileOutputStream out = new FileOutputStream(path);
_result.compress(Bitmap.CompressFormat.PNG, 90, out);
} catch (Exception e) {
e.printStackTrace();
Log.e("APlayer", "Error", e);
}
}

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/remix/myplayer/ui/screen/home/HomeScreen.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package remix.myplayer.ui.screen.home

import android.util.Log

import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.slideInVertically
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/remix/myplayer/util/AlipayUtil.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package remix.myplayer.util;

import android.util.Log

import android.util.Log;

import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
Expand Down Expand Up @@ -72,7 +76,7 @@ public static boolean hasInstalledAlipayClient(Context context) {
PackageInfo info = pm.getPackageInfo(ALIPAY_PACKAGE_NAME, 0);
return info != null;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
Log.e("APlayer", "Error", e);
return false;
}
}
Expand Down
18 changes: 10 additions & 8 deletions app/src/main/java/remix/myplayer/util/Util.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package remix.myplayer.util

import android.util.Log

import android.app.Activity
import android.app.ActivityManager
import android.app.ActivityManager.RunningAppProcessInfo
Expand Down Expand Up @@ -143,7 +145,7 @@ object Util {
}
}
} catch (e: Exception) {
e.printStackTrace()
Log.e("APlayer", "Error", e)
}
return size
}
Expand Down Expand Up @@ -385,7 +387,7 @@ object Util {
}
}
} catch (e: PackageManager.NameNotFoundException) {
e.printStackTrace()
Log.e("APlayer", "Error", e)
}
return channelNumber
}
Expand All @@ -407,7 +409,7 @@ object Util {
.setType("audio/*")
} catch (e: IllegalArgumentException) {
//the path is most likely not like /storage/emulated/0/... but something like /storage/28C7-75B0/...
e.printStackTrace()
Log.e("APlayer", "Error", e)
Toast.makeText(context, context.getString(R.string.cant_share_song), Toast.LENGTH_SHORT)
.show()
Intent()
Expand All @@ -430,7 +432,7 @@ object Util {
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
.setType("image/*")
} catch (e: IllegalArgumentException) {
e.printStackTrace()
Log.e("APlayer", "Error", e)
Toast.makeText(context, context.getString(R.string.cant_share_song), Toast.LENGTH_SHORT)
.show()
Intent()
Expand All @@ -446,7 +448,7 @@ object Util {
try {
closeable.close()
} catch (e: Exception) {
e.printStackTrace()
Log.e("APlayer", "Error", e)
}
}
}
Expand Down Expand Up @@ -489,12 +491,12 @@ object Util {
}
return processName
} catch (throwable: Throwable) {
throwable.printStackTrace()
throwablLog.e("APlayer", "Error", e)
} finally {
try {
reader?.close()
} catch (exception: IOException) {
exception.printStackTrace()
Log.e("APlayer", "Error", exception)
}
}
return null
Expand Down Expand Up @@ -530,7 +532,7 @@ object Util {
false
} else imm.hideSoftInputFromWindow(view.windowToken, 0)
} catch (e: Exception) {
e.printStackTrace()
Log.e("APlayer", "Error", e)
}
return false
}
Expand Down