Skip to content

Commit 5c6d469

Browse files
committed
Breaking long line in code snippet
When I pull the Java "acquire wake lock" snippet into the DAC page, one code line is too long. Breaking that line at the assignment operator so the page user doesn't have to scroll horizontally.
1 parent 79a26f9 commit 5c6d469

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

misc/src/main/java/com/example/snippets/backgroundwork/WakeLockSnippetsJava.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
1515

1616
// [START android_backgroundwork_wakelock_create_java]
1717
PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
18-
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyClassName::MyWakelockTag");
18+
PowerManager.WakeLock wakeLock =
19+
powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyClassName::MyWakelockTag");
1920
wakeLock.acquire();
2021
// [END android_backgroundwork_wakelock_create_java]
2122

0 commit comments

Comments
 (0)