[APP] Lockscreen Policy - Disable Android 4.2+ Lockscreen Widgets, Camera

Search This thread

chislon

Member
Mar 26, 2012
29
195
Toronto
play.google.com
t5NGh.png



Published to Google Play, Here
(Attached v1.2.2, v1.2.3)

This gets rid of the lockscreen widgets and camera on the homescreen on Android 4.2 or higher.

If you have root, you can disable the bold-hour clock widget from the action bar menu, under 'Clock Hack'. (since 1.2)

The app is completely free. I don't foresee adding anything much to this app (I could add a couple of toggle widgets).
This is a lightweight app at 80KB.

There's a known issue under 4.2.2:
With the clock hack disabled, the clock widget toggles between the bold hour clock and the non-bold hour clock every other unlock. If your device is rooted, you can use the clock hack to get the device to consistently display the non-bold hour clock. Otherwise, there isn't anything I can do for you immediately. Sorry for the inconvenience, but I had no control over this.

Disable widgets and/or camera access on the lockscreen under Android 4.2.

Usage:
1) Run application
2) Make selections, and press activate
3) In the 'Activate device administrator' screen, choose 'Activate'
4) Verify settings, and press 'Apply'
5) To change settings, either press the 'Reset' button or hit the back key from the app to return to the setup screen

Uninstall:
To uninstall, uncheck the application from the 'Device Administrator' list under 'Security' in 'Settings'.

Privacy:
I do not collect any personal information with this completely free application.

No permissions other than device administrator required.

Google Play developer link

Ratings, reviews welcome :)


Implements root tooles by Stericson
http://code.google.com/p/roottools/
 

Attachments

  • LockscreenPolicy_v1.2.2.apk
    58.1 KB · Views: 1,037
  • LockscreenPolicy_v1.2.4.apk
    139.6 KB · Views: 2,607
Last edited:

PMOttawa

Senior Member
Oct 17, 2012
122
32
Ottawa
Thank goodness...

The lockscreen was seriously driving me nuts. I hated seeing that widget box every time I turned it on. Thank you for providing a way to turn it off. I just wish Google had made it optional in the first place.

Now, if you could just help me change that ugly, ugly clock font. :good:
 

xaueious

Senior Member
Dec 17, 2009
980
176
Toronto
It might be possible to change the default clock as more devs support lockscreen widgets, because I think it's just a widget there...
 

knzo

Senior Member
Nov 24, 2010
1,992
3,899
I'll test it for you on Nexus S, send me the apk via PM or open it on Google Play.
 

chislon

Member
Mar 26, 2012
29
195
Toronto
play.google.com
Thanks for the report for the Nexus 7. I checked out some videos and realized that tablets don't have a camera swipe gesture on the lockscreen. Checking the 'camera' option doesn't really hurt anything though, at least as of the currently available Android API.

Functionally the app is not going to change much. The icon is hideous, but I know it's annoying to have to update for something minor like that, so that's not coming until there's a good idea for something that needs to be in the app.

I'll test it for you on Nexus S, send me the apk via PM or open it on Google Play.

It doesn't do anything for devices not running Android 4.2. If your device runs Android 4.2 already, you will see it in the Play Store.
 

treetz

New member
Jul 12, 2012
2
0
APK Download?

Hey, could you please share the APK?
I can't download it on Play Store because my Galaxy Nexus on 4.2 seems to be incompatible...
 

AnsenBayer

Member
Sep 16, 2010
7
1
Allow Clock Replacement Widget?

Thanks for getting this app up so quickly!

I know you're probably not going to add much to it, but I have one request. Is it possible to make it work with clock replacement widgets like the "Fixed 4.2 Clock Widget" (can't link to it in the Play Store because I haven't posted 10 times yet).

That widget fixes the weird bolded-hour clock thing Google decided to do for 4.2, but I can't use it if I disable widgets with your app. If there was a way to disable the addition of new widgets (swiping to the left) but still allow a replacement widget on the primary lock screen, that would be perfect.
 
  • Like
Reactions: slider112

Turbocom

Senior Member
May 5, 2010
187
21
Toronto
Would it be possible to disable Google Now? I'd really appreciate that ability. How did Google screw the lock screen so bad?!
 

xaueious

Senior Member
Dec 17, 2009
980
176
Toronto
Not sure how the clock widget can be changed.

Also noticed that if a music player has lockscreen widgets, they show up on a new page...

You can disable system apps in Android 4.2. If you disable Google Search in Applications, you lose the swipe up gesture from the soft buttons, but the lockscreen will still show a weird looking dot where Google Now is activated.
 
Last edited:

slider112

Senior Member
Thanks for getting this app up so quickly!

I know you're probably not going to add much to it, but I have one request. Is it possible to make it work with clock replacement widgets like the "Fixed 4.2 Clock Widget" (can't link to it in the Play Store because I haven't posted 10 times yet).

That widget fixes the weird bolded-hour clock thing Google decided to do for 4.2, but I can't use it if I disable widgets with your app. If there was a way to disable the addition of new widgets (swiping to the left) but still allow a replacement widget on the primary lock screen, that would be perfect.


Was just thinking the exact same thing. You're right, if this could be done it would be absolutely perfect. :good:
 

refoot

New member
Jul 12, 2008
3
0
Why oh why do we have to look at that awful clock font? If only there was a way to remove it completely. And why did they decide to have that place holder flash up on the left every single time I unlock? I know I can add a widget, there's no need to remind me every single time I unlock!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 174
    t5NGh.png



    Published to Google Play, Here
    (Attached v1.2.2, v1.2.3)

    This gets rid of the lockscreen widgets and camera on the homescreen on Android 4.2 or higher.

    If you have root, you can disable the bold-hour clock widget from the action bar menu, under 'Clock Hack'. (since 1.2)

    The app is completely free. I don't foresee adding anything much to this app (I could add a couple of toggle widgets).
    This is a lightweight app at 80KB.

    There's a known issue under 4.2.2:
    With the clock hack disabled, the clock widget toggles between the bold hour clock and the non-bold hour clock every other unlock. If your device is rooted, you can use the clock hack to get the device to consistently display the non-bold hour clock. Otherwise, there isn't anything I can do for you immediately. Sorry for the inconvenience, but I had no control over this.

    Disable widgets and/or camera access on the lockscreen under Android 4.2.

    Usage:
    1) Run application
    2) Make selections, and press activate
    3) In the 'Activate device administrator' screen, choose 'Activate'
    4) Verify settings, and press 'Apply'
    5) To change settings, either press the 'Reset' button or hit the back key from the app to return to the setup screen

    Uninstall:
    To uninstall, uncheck the application from the 'Device Administrator' list under 'Security' in 'Settings'.

    Privacy:
    I do not collect any personal information with this completely free application.

    No permissions other than device administrator required.

    Google Play developer link

    Ratings, reviews welcome :)


    Implements root tooles by Stericson
    http://code.google.com/p/roottools/
    3
    The app controls whether or not widgets show up. All the feature requests you guys have are direct changes to either system apps (DeskClock) or the system framework, meaning root...

    Stuff like having the lockscreen expanded by default is almostly certainly a system framework change. Ask your custom ROM maker or DIY.

    Did some investigation, and here the easiest working workaround to get the 'right-aligned' clock without bold hours. This only apples to Google compiiled ROMS, not AOSP ROMs.

    With root shell, type the following exactly: (adb shell..., su required if you don't have insecure shell)
    Code:
    su
    pm disable com.google.android.deskclock/com.android.alarmclock.DigitalAppWidgetProvider

    To bring it back
    Code:
    su
    pm enable com.google.android.deskclock/com.android.alarmclock.DigitalAppWidgetProvider

    This has the added side effect of disabling the digital clock widget completely.


    * * *
    On a fresh install, if you don't remove the right-aligned clock that comes stock, isn't that one skinny for both hours and minutes?
    attachment.php


    About the right-aligned clock (default status widget)

    The right aligned clock is a built-in clock (ClockView) in the framework lockscreen code. It's the 'DefaultStatusWidget' (layout file at https://android.googlesource.com/pl.../core/res/res/layout/keyguard_status_view.xml)

    The conditions for this right-aligned clock showing up are here: https://android.googlesource.com/pl...al/policy/impl/keyguard/KeyguardHostView.java

    Also see: https://android.googlesource.com/pl...android/internal/widget/LockPatternUtils.java

    Why AOSP builds are not affected

    In the secure Android settings, the entry of interest:
    lock_screen_fallback_appwidget_id:

    In LockPatternUtils.java, the code saves a alternate default fallback widget from the function writeFallbackAppWidgetId. The call is made from KeyguardHostView.java to look for an alternate default clock widget, using framework strings 'widget_default_package_name and widget_default_class_name'.

    Google definitely renamed their DeskClock package and perhaps added additional code to it, because it has the package name of com.google.android.deskclock on my Galaxy Nexus. AOSP builds of DeskClock end up with the package name of com.android.alarmclock.

    They probably have a framework device overlay for: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/config.xml


    I have not decompiled my framework-res.apk (used this one instead), but I see that Google uses the following in their config overlay:
    Code:
        <string name="widget_default_package_name">com.google.android.deskclock</string>
        <string name="widget_default_class_name">com.android.alarmclock.DigitalAppWidgetProvider</string>


    It doesn't look like these values are up in the AOSP device files.
    2
    can I just only put one widget page?:/ seems like I cant..I wanna change the stock clock as I hate it
    2
    Sorry guys.


    Under 4.2.2, several users have reported that the lockscreen clock widget toggles between the centered bold hour clock (DigitalClock from DeskClock) and the right non-bold hour clock (frameworks clock). I've tested this to be true under the following conditions:
    • bold hour clock removal hack disabled
    • camera -> on/off
    • widgets -> off

    This strange behavior is most likely an Android operating system bug. If someone figures out how this can be fixed, I can update this app to include that. But until then, I know this is going to render the app useless for many of you :(

    If you are rooted, there is 'sort of' a workaround for this:
    Enabling the bold hour clock removal hack will at least give you a consistent looking clock (always non-bold). This is why I never noticed until someone emailed me.


    I haven't had the time to look into this yet, but someone needs to look at what Google screwed up under the framework source code to see if this is something I can include as a fix into this app:
    https://android.googlesource.com/pl...rc/com/android/internal/policy/impl/keyguard/

    Specifically there's probably a logical fail under this file here somewhere:
    https://android.googlesource.com/pl...al/policy/impl/keyguard/KeyguardHostView.java



    I haven't had the time to file the bug to Google yet... Needs more testing.
    2
    For the 4.2.2 problem, Logcat shows that the widget is being removed and a new one is created every other time the screen turns on. I found the frameworks commit that causes the widget removal, but I couldn't spot the problem during my quick glance into the code and don't have a AOSP test bed to check this against.

    I filed the bug with Google here: http://code.google.com/p/android/issues/detail?id=48164

    I also notified an Android team engineer about the issue, and he said he might look into this. Hopefully it will make it into the next Android release.