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

Commit

Permalink
Restrict access to Gmail information
Browse files Browse the repository at this point in the history
Closes #1080
  • Loading branch information
M66B committed Jan 29, 2014
1 parent cf0e23d commit 92f4d52
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Test and beta releases will have experimental functions enabled by default.

**Next release**

* Restrict access to Gmail information ([issue](https://github.com/M66B/XPrivacy/issues/1080))
* Updated Lithuanian translation
* Updated Polish translation

Expand Down
1 change: 1 addition & 0 deletions src/biz/bokhorst/xprivacy/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public static List<Hook> get() {
listHook.add(new Hook("contacts", "contacts/profile", false, false, "READ_CONTACTS", 10, null, null));
listHook.add(new Hook("dictionary", "UserDictionary", false, false, "READ_USER_DICTIONARY", 10, null, null));
listHook.add(new Hook("email", "EMailProvider", false, false, "com.android.email.permission.ACCESS_PROVIDER", 10, null, null));
listHook.add(new Hook("email", "GMailProvider", false, false, "com.google.android.gm.permission.READ_CONTENT_PROVIDER", 8, "1.99.20", null));
listHook.add(new Hook("identification", "%hostname", false, false, "", 10, null, null));
listHook.add(new Hook("identification", "%imei", false, false, "", 10, null, null));
listHook.add(new Hook("identification", "%macaddr", false, false, "", 10, null, null));
Expand Down
4 changes: 2 additions & 2 deletions src/biz/bokhorst/xprivacy/Requirements.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.net.wifi.WifiInfo;
import android.os.Build;
Expand Down Expand Up @@ -143,8 +144,7 @@ public void onClick(DialogInterface dialog, int which) {
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();

} catch (Throwable ex) {
Util.bug(null, ex);
} catch (NameNotFoundException ex) {
}

// Check activity thread
Expand Down
8 changes: 8 additions & 0 deletions src/biz/bokhorst/xprivacy/XContentProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public String getClassName() {
// public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, CancellationSignal cancellationSignal)
// frameworks/base/core/java/android/content/ContentProvider.java
// http://developer.android.com/reference/android/content/ContentProvider.html
// https://developers.google.com/gmail/android/

// packages/apps/Browser/src/com/android/browser/provider/BrowserProvider2.java
// packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
Expand Down Expand Up @@ -107,6 +108,13 @@ else if (packageName.equals("com.android.email"))
listHook.add(new XContentProvider(PrivacyManager.cEMail, "EMailProvider",
"com.android.email.provider.EmailProvider"));

// Gmail provider
else if (packageName.equals("com.google.android.gm")) {
Util.log(null, Log.WARN, "Hooking Gmail");
listHook.add(new XContentProvider(PrivacyManager.cEMail, "GMailProvider",
"com.google.android.gm.provider.PublicContentProvider"));
}

// Google services provider
else if (packageName.equals("com.google.android.gsf"))
listHook.add(new XContentProvider(PrivacyManager.cIdentification, "GservicesProvider",
Expand Down

0 comments on commit 92f4d52

Please sign in to comment.