Skip to content

Commit

Permalink
Upstream 3.0.10 source
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-mak committed Jul 27, 2016
2 parents 79db80f + b39c8bc commit 064b1c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,11 @@ public void onPasswordFailed(Context context, Intent intent) {
nm.notify(PASSWORD_FAILED_NOTIFICATION_ID, warn.getNotification());
}

@Override
public void onPasswordSucceeded(Context context, Intent intent) {
logFile(context).delete();
}

private static File logFile(Context context) {
File parent = context.getDir(LOGS_DIR, Context.MODE_PRIVATE);
return new File(parent, FAILED_PASSWORD_LOG_FILE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ public void onCreate(Bundle savedInstanceState) {
@Override
public void onCreatePreferences(Bundle bundle, String rootkey) {
PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(
getActivity());
getPreferenceManager().getContext());
setPreferenceScreen(preferenceScreen);

for (UserRestriction restriction : ALL_USER_RESTRICTIONS) {
SwitchPreference preference = new SwitchPreference(getActivity());
SwitchPreference preference = new SwitchPreference(getPreferenceManager().getContext());
preference.setTitle(restriction.titleResId);
preference.setKey(restriction.key);
preference.setOnPreferenceChangeListener(this);
Expand Down

0 comments on commit 064b1c7

Please sign in to comment.