forked from SlimRoms/frameworks_base
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom lockscreen Accessible via launcher wallpaper selector and Settings - Display - Wallpaper - Lock screen Change-Id: I2e4722d1a6d4ba80a3c656306ceb251d630a8e21 Conflicts: packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java Themes: Keyguard: Fix NPE setting lockscreen wallpaper After boot the view might not be laid out and so getWidth() and getHeight() return 0 and will cause a NullPointerException in createBitmap(). Bug AOSPA-448 Change-Id: Ibacf4199a69709dc34d21695732c2a5360533a23 Signed-off-by: Dirk Rettschlag <[email protected]> Keyguard: fix NPE setting lockscreen wallpaper Continue previous patchset (check history) ------- Cherry-picked commit ------- After boot the view might not be laid out and so getWidth() and getHeight() return 0 and will cause a NullPointerException in createBitmap(). Signed-off-by: Dirk Rettschlag <[email protected]>
- Loading branch information
1 parent
aa731e1
commit 52db480
Showing
11 changed files
with
641 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/WallpaperCropper/res/layout/actionbar_set_lockscreen.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* | ||
** | ||
** Copyright 2013, The Android Open Source Project | ||
** | ||
** Licensed under the Apache License, Version 2.0 (the "License"); | ||
** you may not use this file except in compliance with the License. | ||
** You may obtain a copy of the License at | ||
** | ||
** http://www.apache.org/licenses/LICENSE-2.0 | ||
** | ||
** Unless required by applicable law or agreed to in writing, software | ||
** distributed under the License is distributed on an "AS IS" BASIS, | ||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
** See the License for the specific language governing permissions and | ||
** limitations under the License. | ||
*/ | ||
--> | ||
|
||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
style="?android:actionButtonStyle" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" > | ||
<TextView style="?android:actionBarTabTextStyle" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="start|center_vertical" | ||
android:paddingRight="20dp" | ||
android:drawableLeft="@drawable/ic_actionbar_accept" | ||
android:drawablePadding="8dp" | ||
android:gravity="center_vertical" | ||
android:text="@string/lockscreen_instructions" /> | ||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* | ||
** | ||
** Copyright 2014, ParanoidAndroid Project | ||
** | ||
** Licensed under the Apache License, Version 2.0 (the "License"); | ||
** you may not use this file except in compliance with the License. | ||
** You may obtain a copy of the License at | ||
** | ||
** http://www.apache.org/licenses/LICENSE-2.0 | ||
** | ||
** Unless required by applicable law or agreed to in writing, software | ||
** distributed under the License is distributed on an "AS IS" BASIS, | ||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
** See the License for the specific language governing permissions and | ||
** limitations under the License. | ||
*/ | ||
--> | ||
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/blur_dialog" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<SeekBar | ||
android:id="@+id/blur_seekbar" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="14dp" | ||
android:progress="16" | ||
android:max="25" /> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* | ||
** | ||
** Copyright 2014, ParanoidAndroid Project | ||
** | ||
** Licensed under the Apache License, Version 2.0 (the "License"); | ||
** you may not use this file except in compliance with the License. | ||
** You may obtain a copy of the License at | ||
** | ||
** http://www.apache.org/licenses/LICENSE-2.0 | ||
** | ||
** Unless required by applicable law or agreed to in writing, software | ||
** distributed under the License is distributed on an "AS IS" BASIS, | ||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
** See the License for the specific language governing permissions and | ||
** limitations under the License. | ||
*/ | ||
--> | ||
|
||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/lockscreen_root" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<ImageView android:id="@+id/picker_background" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:adjustViewBounds="true" | ||
/> | ||
</LinearLayout> | ||
<ImageView android:id="@+id/lockscreen_preview" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
/> | ||
<Button | ||
android:id="@+id/lockscreen_reset" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentBottom="true" | ||
android:text="@string/lockscreen_reset" /> | ||
<Button | ||
android:id="@+id/lockscreen_select" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerHorizontal="true" | ||
android:layout_alignParentBottom="true" | ||
android:text="@string/lockscreen_select" /> | ||
<Button | ||
android:id="@+id/lockscreen_blur" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentRight="true" | ||
android:layout_alignParentBottom="true" | ||
android:text="@string/lockscreen_blur" /> | ||
</RelativeLayout> |
Binary file added
BIN
+4.31 KB
packages/WallpaperCropper/res/mipmap-hdpi/ic_lockscreen_wallpaper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.92 KB
packages/WallpaperCropper/res/mipmap-xhdpi/ic_lockscreen_wallpaper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.42 KB
packages/WallpaperCropper/res/mipmap-xxhdpi/ic_lockscreen_wallpaper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2013 ParanoidAndroid Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> | ||
<string name="pick_lockscreen">Lock screen</string> | ||
<string name="lockscreen_reset">Reset</string> | ||
<string name="lockscreen_select">Browse</string> | ||
<string name="lockscreen_blur">Blur</string> | ||
<string name="blur_radius">Blur radius</string> | ||
<string name="lockscreen_instructions">Set lockscreen image</string> | ||
<string name="lockscreen_image_set">Lockscreen image updated</string> | ||
<string name="lockscreen_image_reset">Lockscreen image reset</string> | ||
</resources> |
Oops, something went wrong.