Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add work profile Icon #1510

Open
basings opened this issue Apr 21, 2023 · 6 comments
Open

Add work profile Icon #1510

basings opened this issue Apr 21, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@basings
Copy link
Contributor

basings commented Apr 21, 2023

A work profile app gets an additional icon in the lower right corner to be identifiable as a work profile app.

I am not able to find the icon within grapheneos source code (my current os), nor is it displayed with IconRequest. The icon may be within AOSP but I am not sure and I am not able to find the icon and hence its name. It is probably a .png file for anyone who knows more about the source than I do.

Following is a first draft for the work profile icon "work_profile.svg" and the appfilter entry:

	<!-- WORK_PROFILE_ICON_NAME -->
	<item component="ComponentInfo{XXXXX/YYYYY}" drawable="work_profile"/>

work_profile

I am not able to find the icon and hence I ask for help by someone who is able to find the icon info.

@basings basings added icon-request Request for new icons small request small icon request labels Apr 21, 2023
@Donnnno
Copy link
Collaborator

Donnnno commented Apr 21, 2023

Hmm I'll test it later today

@Donnnno
Copy link
Collaborator

Donnnno commented Apr 21, 2023

Can't find anything on how to change it... many have asked this before, but dunno the answer to it. You always could try asking a ROM developer :-)

@Donnnno Donnnno added enhancement New feature or request and removed icon-request Request for new icons small request small icon request labels Apr 21, 2023
@TotallyAvailable
Copy link
Contributor

TotallyAvailable commented Nov 13, 2023

 activity
  android:theme="@style/Theme.Translucent.NoTitleBar"
  android:label="@string/weeks"
  android:name="com.android.internal.app.IntentForwarderActivity"
  android:exported="true"
  android:excludeFromRecents="true"
  android:finishOnCloseSystemDialogs="true"
  android:visibleToInstantApps="true"

 activity-alias
  android:label="@string/weeks"
  android:name="com.android.internal.app.ForwardIntentToParent"
  android:exported="true"
  android:targetActivity="com.android.internal.app.IntentForwarderActivity"

 activity-alias
  android:label="@string/mediasize_iso_b1"
  android:icon="@drawable/ic_contact_picture_2"
  android:name="com.android.internal.app.ForwardIntentToManagedProfile"
  android:exported="true"
  android:targetActivity="com.android.internal.app.IntentForwarderActivity"

"/com.android.internal.app.ForwardIntentToManagedProfile" does indeed do have the icon attached to it we might be looking for.

While sitting in 'Android System' the shortcut binds to 'android/com.android.internal.app.ForwardIntentToManagedProfile'

Assuming I'm going to test it on an actual Work Setup, showing the Badge on App Internal Shortcuts does get themed just fine...and changes based on the host Icon, which may or may not be a dead end.

And yes indeed a .png in case anyone wants to do their own research and end up coming across a /drawable/ic_work_profile.xml at some point anyways.

@Donnnno
Copy link
Collaborator

Donnnno commented Feb 15, 2024

@TotallyAvailable did you go forward with your tests, or did it strand?

Anyway, cool that you dug into the files to find it out.

@TotallyAvailable
Copy link
Contributor

Besides the conflicting results I got while looking for references on how those things actually work, I never actually went ahead with setting up the test work profile and doing the PR with Icon and proper binding(s) to actually test the theory.

As for moving forward -> really comes down to figuring out where a launcher pulls the icon from and if it is considered a bindable "host app icon" (the part we know works)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants