A mistake - The patch is really for:
frameworks/base/services/java/com/android/server/am/ActivityManagerService.java

not ActivityManager.java as stated below.



----- Original Message -----
From: Richard Haines <[email protected]>
To: seandroid <[email protected]>
Cc: 
Sent: Sunday, 14 July 2013, 13:25
Subject: CP_MAC - Fix activity manager content provider permission check

In the ActivityManagerService.java source there is the following comment:
  // Is this the best spot for this? Should we specifically let the
  // other tests below try first and then right before a return
  // is made do we try to apply our checks? That approach might
  // make sense becuase maybe that provider doesn't even exist.

The author is correct in that this is not the correct place. This is because
apps like "com.android.inputmethod.latin" can never run as it needs to load a
dictionary CP as a part of its process. I've therefore added the checkPolicy
call to various return points in the process. It may be that the call should
be added to more places, however the patch works with my simple tests.

The attached patches:
frameworks/base/services/java/com/android/server/am/ActivityManager.java

The main symptom is that the popup keyboards did not work when editing text
and is shown in the logs as:
D/ActivityManager(  336): Denied USE permission between caller=xxx and content 
authority=com.android.inputmethod.latin.dictionarypack
Where caller=xxx is the pid of the com.android.inputmethod.latin app

"com.android.inputmethod.latin.dictionarypack" is defined in:
packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/BinaryDictionary.java
String DICTIONARY_PACK_AUTHORITY = 
"com.android.inputmethod.latin.dictionarypack";

Richard



--
This message was distributed to subscribers of the seandroid-list mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe seandroid-list" without quotes as the message.

Reply via email to