Search code examples
androidinternal

Using internal android classes


I want to use an android internal class, com.android.internal.widget.LockPatternUtils .

I searched for examples and I got this:

LockPatternUtils lpu = new LockPatternUtils(this.getContentResolver());

However, i cant import, autimport does not appear and manually doing

import com.android.internal.widget.LockPatternUtils 

doesnt work.

How is this handled? I think there was something about creating an interface but not sure about it

EDIT: I got this:

  boolean patternLocked = android.provider.Settings.System.getInt(
     getContentResolver(),Settings.System.LOCK_PATTERN_ENABLED, 0)==1;

That works for the pattern lock, but i cant know about the pin or password lock


Solution

  • How is this handled?

    Those classes are only available as part of full firmware builds, not from Android SDK apps.