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

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

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

parent 63ff81e7
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -3562,9 +3562,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);