From 988b39f2e5e7da1fb24fba2eaf433e3d0fe65362 Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Mon, 14 Mar 2016 08:33:46 -0400 Subject: [PATCH] Add missing debug messages to SystemHelper --- .../java/org/isoron/uhabits/ui/SystemHelper.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/androidTest/java/org/isoron/uhabits/ui/SystemHelper.java b/app/src/androidTest/java/org/isoron/uhabits/ui/SystemHelper.java index 5fa69e80e..718ac4ba3 100644 --- a/app/src/androidTest/java/org/isoron/uhabits/ui/SystemHelper.java +++ b/app/src/androidTest/java/org/isoron/uhabits/ui/SystemHelper.java @@ -24,27 +24,30 @@ public final class SystemHelper extends AndroidJUnitRunner void unlockScreen() { + Log.i("SystemHelper", "Trying to unlock screen"); try { KeyguardManager mKeyGuardManager = (KeyguardManager) context .getSystemService(Context.KEYGUARD_SERVICE); KeyguardManager.KeyguardLock mLock = mKeyGuardManager.newKeyguardLock("lock"); mLock.disableKeyguard(); + Log.e("SystemHelper", "Successfully unlocked screen"); } catch (Exception e) { + Log.e("SystemHelper", "Could not unlock screen"); e.printStackTrace(); } } void disableAllAnimations() { - Log.i("SystemAnimations", "Trying to disable animations"); + Log.i("SystemHelper", "Trying to disable animations"); int permStatus = context.checkCallingOrSelfPermission(ANIMATION_PERMISSION); if (permStatus == PackageManager.PERMISSION_GRANTED) setSystemAnimationsScale(DISABLED); else - Log.e("SystemAnimations", "Permission denied"); + Log.e("SystemHelper", "Permission denied"); } @@ -78,11 +81,11 @@ private void setSystemAnimationsScale(float animationScale) currentScales[i] = animationScale; setAnimationScales.invoke(windowManagerObj, new Object[]{currentScales}); - Log.i("SystemAnimations", "All animations successfully disabled"); + Log.i("SystemHelper", "All animations successfully disabled"); } catch (Exception e) { - Log.e("SystemAnimations", + Log.e("SystemHelper", "Could not change animation scale to " + animationScale + " :'("); } }