Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
a5c94e61
Commit
a5c94e61
authored
11 months ago
by
Anna Bauza
Committed by
Gerrit Code Review
11 months ago
Browse files
Options
Downloads
Plain Diff
Merge "Integrating new Avatar Picker App in Settings" into main
parents
487165c6
c6487432
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/java/android/content/pm/multiuser.aconfig
+8
-0
8 additions, 0 deletions
core/java/android/content/pm/multiuser.aconfig
packages/SettingsLib/src/com/android/settingslib/users/EditUserPhotoController.java
+11
-2
11 additions, 2 deletions
...om/android/settingslib/users/EditUserPhotoController.java
with
19 additions
and
2 deletions
core/java/android/content/pm/multiuser.aconfig
+
8
−
0
View file @
a5c94e61
...
...
@@ -56,3 +56,11 @@ flag {
description: "Add support to lock private space automatically after a time period"
bug: "303201022"
}
flag {
name: "avatar_sync"
namespace: "multiuser"
description: "Implement new Avatar Picker outside of SetttingsLib with ability to select avatars from Google Account and synchronise to any changes."
bug: "296829976"
is_fixed_read_only: true
}
This diff is collapsed.
Click to expand it.
packages/SettingsLib/src/com/android/settingslib/users/EditUserPhotoController.java
+
11
−
2
View file @
a5c94e61
...
...
@@ -22,6 +22,7 @@ import android.content.res.Resources;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.drawable.Drawable
;
import
android.multiuser.Flags
;
import
android.net.Uri
;
import
android.util.Log
;
import
android.widget.ImageView
;
...
...
@@ -59,6 +60,9 @@ public class EditUserPhotoController {
private
static
final
String
IMAGES_DIR
=
"multi_user"
;
private
static
final
String
NEW_USER_PHOTO_FILE_NAME
=
"NewUserPhoto.png"
;
private
static
final
String
AVATAR_PICKER_ACTION
=
"com.android.avatarpicker"
+
".FULL_SCREEN_ACTIVITY"
;
private
final
Activity
mActivity
;
private
final
ActivityStarter
mActivityStarter
;
private
final
ImageView
mImageView
;
...
...
@@ -105,7 +109,6 @@ public class EditUserPhotoController {
onPhotoCropped
(
data
.
getData
());
return
true
;
}
}
return
false
;
}
...
...
@@ -115,7 +118,13 @@ public class EditUserPhotoController {
}
private
void
showAvatarPicker
()
{
Intent
intent
=
new
Intent
(
mImageView
.
getContext
(),
AvatarPickerActivity
.
class
);
Intent
intent
;
if
(
Flags
.
avatarSync
())
{
intent
=
new
Intent
(
AVATAR_PICKER_ACTION
);
intent
.
addCategory
(
Intent
.
CATEGORY_DEFAULT
);
}
else
{
intent
=
new
Intent
(
mImageView
.
getContext
(),
AvatarPickerActivity
.
class
);
}
intent
.
putExtra
(
AvatarPickerActivity
.
EXTRA_FILE_AUTHORITY
,
mFileAuthority
);
mActivityStarter
.
startActivityForResult
(
intent
,
REQUEST_CODE_PICK_AVATAR
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment