Skip to content

Commit

Permalink
Sanitize error messages
Browse files Browse the repository at this point in the history
Error messages should only be used for error conditions. Demote several
messages to debug messages as they are not critical errors.
  • Loading branch information
svillar committed Nov 20, 2024
1 parent f8ea11e commit c764170
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private boolean preload() {
}
try {
MediaPlayer mediaPlayer = new MediaPlayer();
Log.e(LOGTAG, "Preloading Android Media Player for " + sound);
Log.d(LOGTAG, "Preloading Android Media Player for " + sound);
AssetFileDescriptor fd = mContext.getAssets().openFd(vrAudioTheme.getPath(sound));
mediaPlayer.setDataSource(fd.getFileDescriptor(), fd.getStartOffset(), fd.getLength());
mediaPlayer.prepare();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class Services(val context: Context, places: Places): WSession.NavigationDelegat
wResult.complete(WAllowOrDeny.DENY)

} else {
android.util.Log.e(LOGTAG, "Authentication successfully completed.")
android.util.Log.d(LOGTAG, "Authentication successfully completed.")
wResult.complete(WAllowOrDeny.ALLOW)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ public boolean dispatchKeyEvent(final KeyEvent event) {
}
// Android Components do not support InputConnection.sendKeyEvent()
if (event.getAction() == KeyEvent.ACTION_DOWN) {
Log.e("reb", "key = " + KeyEvent.keyCodeToString(keyCode));
Log.d("reb", "key = " + KeyEvent.keyCodeToString(keyCode));

switch (keyCode) {
case KeyEvent.KEYCODE_DEL:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void updateUI() {
}

public void showPermissionsRationalePrompt(@NonNull List<String> permissions, @NonNull WSession.PermissionDelegate.Callback aCallback) {
Log.e(LOGTAG, "showPermissionsRationalePrompt "+aCallback);
Log.d(LOGTAG, "showPermissionsRationalePrompt "+aCallback);
if (permissions.isEmpty()) {
aCallback.reject();
return;
Expand Down
16 changes: 8 additions & 8 deletions app/src/hvr/java/com/igalia/wolvic/PlatformActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ private void stopHmsMessageService() {

@Override
protected void onDestroy() {
Log.i(TAG, "PlatformActivity onDestroy");
Log.d(TAG, "PlatformActivity onDestroy");

stopHmsMessageService();
unregisterReceiver(mHmsMessageBroadcastReceiver);
Expand All @@ -332,20 +332,20 @@ protected void onDestroy() {
@Override
protected void onStart() {
super.onStart();
Log.i(TAG, "PlatformActivity onStart");
Log.d(TAG, "PlatformActivity onStart");
}

@Override
protected void onStop() {
super.onStop();
Log.i(TAG, "PlatformActivity onStop");
Log.d(TAG, "PlatformActivity onStop");
queueRunnable(this::nativeOnStop);
}

@Override
protected void onPause() {
super.onPause();
Log.i(TAG, "PlatformActivity onPause");
Log.d(TAG, "PlatformActivity onPause");
queueRunnable(this::nativeOnPause);
}

Expand All @@ -360,25 +360,25 @@ public void onBackPressed() {
@Override
protected void onResume() {
super.onResume();
Log.i(TAG, "PlatformActivity onResume");
Log.d(TAG, "PlatformActivity onResume");
queueRunnable(this::nativeOnResume);
}

@Override
public void surfaceCreated(SurfaceHolder holder) {
Log.e(TAG, "makelele life surfaceCreated");
Log.d(TAG, "surfaceCreated");
}

@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
Log.i(TAG, "PlatformActivity surfaceChanged");
Log.d(TAG, "PlatformActivity surfaceChanged");
queueRunnable(() -> nativeOnSurfaceChanged(holder.getSurface()));
}

@Override
public void surfaceDestroyed(SurfaceHolder holder)
{
Log.i(TAG, "PlatformActivity surfaceDestroyed");
Log.d(TAG, "PlatformActivity surfaceDestroyed");
queueRunnable(this::nativeOnSurfaceDestroyed);
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/noapi/java/com/igalia/wolvic/PlatformActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected Intent getStoreIntent() {

@Override
protected void onCreate(Bundle savedInstanceState) {
Log.e(LOGTAG, "PlatformActivity onCreate");
Log.d(LOGTAG, "PlatformActivity onCreate");
super.onCreate(savedInstanceState);

setContentView(R.layout.noapi_layout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected Intent getStoreIntent() {

@Override
protected void onCreate(Bundle savedInstanceState) {
Log.e(LOGTAG,"in onCreate");
Log.d(LOGTAG,"in onCreate");
super.onCreate(savedInstanceState);
//getWindow().takeInputQueue(null);
// Keep the screen on
Expand Down

0 comments on commit c764170

Please sign in to comment.