Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Wrong update notification #1112

Closed
Cyclu opened this issue Jan 16, 2014 · 9 comments
Closed

Wrong update notification #1112

Cyclu opened this issue Jan 16, 2014 · 9 comments

Comments

@Cyclu
Copy link

Cyclu commented Jan 16, 2014

Today I had an update for Google Play Services, but XPrivacy has alphabetical instead Android order for the shared uid, I had an wrong notification for Framework Google which is the first app in the shared item instead Google Play Services.
I think if you change the order for the package name for alphabetical order and the app name with respect to this order, everything will be ok. Latest version of the XPrivacy which have the right package order is 1.10.47 to 1.10.49.
application package order:
com.google.android.gms
com.google.android.gsf
com.google.android.gsf.login
com.google.android.location
com.google.android.syncadapters.bookmarks
com.google.android.syncadapters.contacts

@jpeg729
Copy link
Contributor

jpeg729 commented Jan 16, 2014

Whatever happens the restrictions are shared between all those packages. It might be less confusing if the notification listed a few of the package names with an ellipsis.

@Cyclu
Copy link
Author

Cyclu commented Jan 18, 2014

I think it maybe confusing, because only one application is updated. It is better and more simple change to the alphabetical order for the package name, like that this fix the problem. This also make not use sort application name respecting locale language, and displays the name of the application for the shared uid uniform for all language

@M66B M66B closed this as completed in f8b5760 Jan 19, 2014
@M66B
Copy link
Owner

M66B commented Jan 19, 2014

Android only reports the uid in an package change intent, so it is impossible to show the correct application name.
Moreover XPrivacy restricts based on uid, so all applications with the same uid are affected.

As a nice workaround XPrivacy will use inbox style notifications on JellyBean or better to show the first four applications names and an addition "..." if there are more applications.

@jpeg729
Copy link
Contributor

jpeg729 commented Jan 19, 2014

Android firewall does something like this.

String packageName = intent.getData().getSchemeSpecificPart();

@M66B
Copy link
Owner

M66B commented Jan 19, 2014

Yes, that would be possible, but XPrivacy works with uids, so listing as much as possible app names is IMHO better.

@jpeg729
Copy link
Contributor

jpeg729 commented Jan 19, 2014

Something like this, then...

// In ApplicationInfoEx.java

public String getApplicationName(String packageName) {
    for (Entry<String, ApplicationInfo> entry : mMapAppInfo.entrySet())
        if (entry.getValue().packageName.equals(packageName))
            return entry.getKey();
    return null;
}

// In PackageChange.java

String packageName = intent.getData().getSchemeSpecificPart();
String appName = appInfo.getApplicationName(packageName);

@M66B
Copy link
Owner

M66B commented Jan 19, 2014

Can you make a pull request for this?

@jpeg729
Copy link
Contributor

jpeg729 commented Jan 19, 2014

Do you want to keep the Inbox style notifications? or go back to the old simple ways?

jpeg729 added a commit to jpeg729/XPrivacy that referenced this issue Jan 19, 2014
@Cyclu
Copy link
Author

Cyclu commented Jan 20, 2014

Just for info, when I was Google Play Services in the user list with other shared app's, it was ranked first position and it had correct update notification.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants