Skip to content

Commit

Permalink
Add missing debug messages to SystemHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
iSoron committed Mar 14, 2016
1 parent a080396 commit 988b39f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/src/androidTest/java/org/isoron/uhabits/ui/SystemHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");

}

Expand Down Expand Up @@ -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 + " :'(");
}
}
Expand Down

0 comments on commit 988b39f

Please sign in to comment.