Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_TvSettings
Commits
08b709bf
Commit
08b709bf
authored
10 years ago
by
RoboErik
Committed by
Android (Google) Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Unhide delete restricted profile option" into lmp-dev
parents
8f3ce417
657ddb05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
Settings/src/com/android/tv/settings/users/RestrictedProfileActivity.java
.../android/tv/settings/users/RestrictedProfileActivity.java
+22
-22
No files found.
Settings/src/com/android/tv/settings/users/RestrictedProfileActivity.java
View file @
08b709bf
...
...
@@ -340,26 +340,29 @@ public class RestrictedProfileActivity extends Activity implements Action.Listen
RestrictedProfileActivity
.
this
,
mRestrictedUserInfo
.
id
,
false
);
DialogFragment
.
add
(
getFragmentManager
(),
dialogFragment
);
}
else
if
(
ACTION_RESTRICTED_PROFILE_DELETE
.
equals
(
action
.
getKey
()))
{
ArrayList
<
Action
>
actions
=
new
ArrayList
<
Action
>();
actions
.
add
(
new
Action
.
Builder
()
.
key
(
ACTION_RESTRICTED_PROFILE_DELETE_CONFIRM
)
.
title
(
getString
(
R
.
string
.
title_ok
))
.
build
());
actions
.
add
(
new
Action
.
Builder
()
.
key
(
ACTION_RESTRICTED_PROFILE_DELETE_CANCEL
)
.
title
(
getString
(
R
.
string
.
title_cancel
))
.
build
());
DialogFragment
dialogFragment
=
new
DialogFragment
.
Builder
()
.
title
(
getString
(
R
.
string
.
restricted_profile_delete_dialog_title
))
.
iconResourceId
(
getIconResource
())
.
iconBackgroundColor
(
getResources
().
getColor
(
R
.
color
.
icon_background
))
.
actions
(
actions
).
build
();
DialogFragment
.
add
(
getFragmentManager
(),
dialogFragment
);
if
(
getFragmentManager
().
findFragmentByTag
(
PinDialogFragment
.
DIALOG_TAG
)
!=
null
)
{
return
;
}
new
RestrictedProfilePinDialogFragment
(
PinDialogFragment
.
PIN_DIALOG_TYPE_ENTER_PIN
,
new
PinDialogFragment
.
ResultListener
()
{
@Override
public
void
done
(
boolean
success
)
{
if
(
success
)
{
removeRestrictedUser
();
LockPatternUtils
lpu
=
new
LockPatternUtils
(
RestrictedProfileActivity
.
this
);
lpu
.
clearLock
(
false
);
}
}
},
new
LockPatternUtils
(
this
),
getLockSettings
()).
show
(
getFragmentManager
(),
PinDialogFragment
.
DIALOG_TAG
);
}
else
if
(
ACTION_RESTRICTED_PROFILE_DELETE_CONFIRM
.
equals
(
action
.
getKey
()))
{
// TODO remove once we confirm it's not needed
removeRestrictedUser
();
LockPatternUtils
lpu
=
new
LockPatternUtils
(
this
);
lpu
.
clearLock
(
false
);
}
else
if
(
ACTION_RESTRICTED_PROFILE_DELETE_CANCEL
.
equals
(
action
.
getKey
()))
{
// TODO remove once we confirm it's not needed
onBackPressed
();
}
else
if
(
ACTION_RESTRICTED_PROFILE_CREATE
.
equals
(
action
.
getKey
()))
{
if
(
hasLockscreenSecurity
(
new
LockPatternUtils
(
this
)))
{
...
...
@@ -390,13 +393,10 @@ public class RestrictedProfileActivity extends Activity implements Action.Listen
.
key
(
ACTION_RESTRICTED_PROFILE_CONFIG
)
.
title
(
getString
(
R
.
string
.
restricted_profile_configure_title
))
.
build
());
if
(
DEBUG
)
{
actions
.
add
(
new
Action
.
Builder
()
.
key
(
ACTION_RESTRICTED_PROFILE_DELETE
)
.
title
(
getString
(
R
.
string
.
restricted_profile_delete_title
))
.
description
(
getString
(
R
.
string
.
restricted_profile_delete_description
))
.
build
());
}
actions
.
add
(
new
Action
.
Builder
()
.
key
(
ACTION_RESTRICTED_PROFILE_DELETE
)
.
title
(
getString
(
R
.
string
.
restricted_profile_delete_title
))
.
build
());
}
else
{
actions
.
add
(
new
Action
.
Builder
()
.
key
(
ACTION_RESTRICTED_PROFILE_SWITCH_OUT
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment