Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de7120cd authored by ctso's avatar ctso Committed by Steve Kondik
Browse files

Do not install to SDEXT if cm.a2sd.active is false

parent 715e560d
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -3792,9 +3792,13 @@ class PackageManagerService extends IPackageManager.Stub {
    
    /* Called when a downloaded package installation is completed (usually by the Market) */
    public void installPackage(final Uri packageURI, final IPackageInstallObserver observer, final int flags, final String installerPackageName) {
    	Boolean a2sd = false;
    	Boolean a2sd = Settings.Secure.getInt(
            mContext.getContentResolver(),Settings.Secure.APPS2SD, 0) > 0;

    	a2sd = Settings.Secure.getInt(mContext.getContentResolver(),Settings.Secure.APPS2SD, 0) > 0;
        /* Do not allow a2sd if cm.a2sd.active is false */
        if (!SystemProperties.getBoolean("cm.a2sd.active", false)) {
            a2sd = false;
        }
    	
    	if (a2sd) { 		
    	    installPackageExt(packageURI, observer, flags, installerPackageName, true);