Read additional_repos.xml from /product as well
Change-Id: Id4a99204e4be467f4e3b1d6684eeb86a19a614f2
This commit is contained in:
		
							parent
							
								
									345915cdf4
								
							
						
					
					
						commit
						240b7af585
					
				@ -322,16 +322,16 @@ public class DBHelper extends SQLiteOpenHelper {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Look for additional, initial repositories from the device's filesystem.
 | 
			
		||||
     * These can be added as part of the ROM ({@code /system} or included later
 | 
			
		||||
     * by vendors/OEMs ({@code /vendor}, {@code /odm}, {@code /oem}). These are
 | 
			
		||||
     * always added at a lower priority than the repos embedded in the APK via
 | 
			
		||||
     * These can be added as part of the ROM ({@code /system} or {@code /product}
 | 
			
		||||
     * or included later by vendors/OEMs ({@code /vendor}, {@code /odm}, {@code /oem}).
 | 
			
		||||
     * These are always added at a lower priority than the repos embedded in the APK via
 | 
			
		||||
     * {@code default_repos.xml}.
 | 
			
		||||
     * <p>
 | 
			
		||||
     * ROM has the lowest priority, then Vendor, ODM, and OEM.
 | 
			
		||||
     * ROM (System) has the lowest priority, then Product, Vendor, ODM, and OEM.
 | 
			
		||||
     */
 | 
			
		||||
    private static List<String> loadAdditionalRepos(String packageName) {
 | 
			
		||||
        List<String> repoItems = new LinkedList<>();
 | 
			
		||||
        for (String root : Arrays.asList("/system", "/vendor", "/odm", "/oem")) {
 | 
			
		||||
        for (String root : Arrays.asList("/system", "/product", "/vendor", "/odm", "/oem")) {
 | 
			
		||||
            File additionalReposFile = new File(root + "/etc/" + packageName + "/additional_repos.xml");
 | 
			
		||||
            try {
 | 
			
		||||
                if (additionalReposFile.isFile()) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user