Merge branch 'two-0.101-fixes' into 'master'
Two 0.101 fixes This includes two fixes for 0.101. One of them has already been included in stable-v0.100 for 0.100.1. See merge request !337
This commit is contained in:
		
						commit
						4f67437bc9
					
				@ -566,7 +566,7 @@ class DBHelper extends SQLiteOpenHelper {
 | 
			
		||||
     * table for the first time.
 | 
			
		||||
     */
 | 
			
		||||
    private void recreateInstalledAppTable(SQLiteDatabase db, int oldVersion) {
 | 
			
		||||
        if (oldVersion >= 57) {
 | 
			
		||||
        if (oldVersion >= 56) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        Utils.debugLog(TAG, "(re)creating 'installed app' database table.");
 | 
			
		||||
 | 
			
		||||
@ -459,11 +459,17 @@ public class InstallManagerService extends Service {
 | 
			
		||||
        return ACTIVE_APPS.get(getApkFromActive(urlString).packageName);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Remove the URL from this service, and return the {@link Apk}. This returns
 | 
			
		||||
     * an empty {@code Apk} instance if we get a null one so the code doesn't need
 | 
			
		||||
     * lots of null guards.
 | 
			
		||||
     */
 | 
			
		||||
    private static Apk removeFromActive(String urlString) {
 | 
			
		||||
        Apk apk = ACTIVE_APKS.remove(urlString);
 | 
			
		||||
        if (apk != null) {
 | 
			
		||||
            ACTIVE_APPS.remove(apk.packageName);
 | 
			
		||||
        if (apk == null) {
 | 
			
		||||
            return new Apk();
 | 
			
		||||
        }
 | 
			
		||||
        ACTIVE_APPS.remove(apk.packageName);
 | 
			
		||||
        return apk;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user