@ -9,7 +9,8 @@ import android.app.AlertDialog;
import android.content.Context ;
import android.content.Context ;
import android.content.DialogInterface ;
import android.content.DialogInterface ;
import android.content.Intent ;
import android.content.Intent ;
import android.content.pm.ApplicationInfo ;
import android.content.pm.PackageInfo ;
import android.content.pm.PackageManager ;
import android.content.res.Resources ;
import android.content.res.Resources ;
import android.graphics.drawable.BitmapDrawable ;
import android.graphics.drawable.BitmapDrawable ;
import android.net.Uri ;
import android.net.Uri ;
@ -147,19 +148,19 @@ public class AddOnService {
* /
* /
private boolean isInstalled ( String packageName , boolean internal ) {
private boolean isInstalled ( String packageName , boolean internal ) {
Context context = ContextManager . getContext ( ) ;
Context context = ContextManager . getContext ( ) ;
ApplicationInfo application Info;
PackageInfo package Info;
try {
try {
application Info = context . getPackageManager ( ) . get ApplicationInfo(
package Info = context . getPackageManager ( ) . get PackageInfo( packageName ,
packageName, 0 ) ;
PackageManager. GET_SIGNATURES ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
return false ;
return false ;
}
}
if ( application Info = = null )
if ( package Info = = null )
return false ;
return false ;
if ( ! internal )
if ( ! internal )
return true ;
return true ;
return applicationInfo . uid = = context . getApplicationInfo ( ) . uid ;
return "30820265308201cea00302010202044954bd9c300d06092a864886f70d01010505003076310b3009060355040613025553310b3009060355040813024341311230100603550407130950616c6f20416c746f31183016060355040a130f6173747269642e6c7632352e636f6d311b3019060355040b131241737472696420446576656c6f706d656e74310f300d0603550403130654696d2053753020170d3038313232363131313835325a180f32303633303932393131313835325a3076310b3009060355040613025553310b3009060355040813024341311230100603550407130950616c6f20416c746f31183016060355040a130f6173747269642e6c7632352e636f6d311b3019060355040b131241737472696420446576656c6f706d656e74310f300d0603550403130654696d20537530819f300d06092a864886f70d010101050003818d00308189028181008b8f39e02a50e5f50723bb71208e99bd72dd3cb6266054809cce0dc33a38ebf79c2a1ab74264cc6c88d44a5092e34f45fc28c53188ebe5b7511f0e14862598a82e1a84b0c99e62b0603737c09501b92f723d9e561a0eedbc16ab494e93a513d170135e0e55af6bb40a9af1186df4cfe53ec3a6144336f9f8a338341656c5a3bd0203010001300d06092a864886f70d01010505000381810016352860629e5e17d2d747943170ddb8c01f014932cb4462f52295c2f764970e93fa461c73b44a678ecf8ab8480702fb746221a98ade8ab7562cae151be78973dfa47144d70b8d0b73220dd741755f62cc9230264f570ec21a4ab1f11b0528d799d3662d06354b56d0d7d28d05c260876a98151fb4e89b6ce2a5010c52b3e365" . equals ( packageInfo . signatures [ 0 ] . toCharsString ( ) ) ;
}
}
/ * *
/ * *
@ -180,7 +181,7 @@ public class AddOnService {
list [ 1 ] = new AddOn ( false , true , "Astrid Locale Plugin" , null ,
list [ 1 ] = new AddOn ( false , true , "Astrid Locale Plugin" , null ,
"Allows Astrid to make use of the Locale application to send you notifications based on filter conditions. Requires Locale" ,
"Allows Astrid to make use of the Locale application to send you notifications based on filter conditions. Requires Locale" ,
LOCALE_PACKAGE , "http://www.weloveastrid.com/store" ,
LOCALE_PACKAGE , "http://www.weloveastrid.com/store" ,
( ( BitmapDrawable ) r . getDrawable ( R . drawable . icon_ pp ) ) . getBitmap ( ) ) ;
( ( BitmapDrawable ) r . getDrawable ( R . drawable . icon_ locale ) ) . getBitmap ( ) ) ;
return list ;
return list ;
}
}