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

Commit 99e1cdae authored by Xavier Ducrohet's avatar Xavier Ducrohet
Browse files

Fix in layoutlib due to some changes in the frameworks.

Some methods disappear or became abstract in the base class
(breaking @Override)

Change-Id: Id4d298ee84ba008ac97ecaaf90b19003ac09f104
parent 7356b0b0
Loading
Loading
Loading
Loading
+3 −28
Original line number Diff line number Diff line
@@ -17,9 +17,6 @@
package com.android.layoutlib.bridge;

import android.content.res.AssetManager;
import android.content.res.Configuration;

import java.util.Locale;

public class BridgeAssetManager extends AssetManager {

@@ -51,26 +48,4 @@ public class BridgeAssetManager extends AssetManager {

    private BridgeAssetManager() {
    }
    
    /**
     * Change the configuration used when retrieving resources.  Not for use by applications.
     */
    @Override
    public void setConfiguration(int mcc, int mnc, String locale,
            int orientation, int touchscreen, int density, int keyboard,
            int keyboardHidden, int navigation, int screenWidth, int screenHeight,
            int screenLayout, int uiMode, int version)  {
        
        Configuration c = new Configuration();
        c.mcc = mcc;
        c.mnc = mnc;
        c.locale = new Locale(locale);
        c.touchscreen = touchscreen;
        c.keyboard = keyboard;
        c.keyboardHidden = keyboardHidden;
        c.navigation = navigation;
        c.orientation = orientation;
        c.screenLayout = screenLayout;
        c.uiMode = uiMode;
    }
}
+7 −9
Original line number Diff line number Diff line
@@ -66,14 +66,14 @@ import java.util.Map.Entry;
 */
public final class BridgeContext extends Context {

    private Resources mResources;
    private Theme mTheme;
    private HashMap<View, Object> mViewKeyMap = new HashMap<View, Object>();
    private IStyleResourceValue mThemeValues;
    private final Resources mResources;
    private final Theme mTheme;
    private final HashMap<View, Object> mViewKeyMap = new HashMap<View, Object>();
    private final IStyleResourceValue mThemeValues;
    private final Object mProjectKey;
    private Map<String, Map<String, IResourceValue>> mProjectResources;
    private Map<String, Map<String, IResourceValue>> mFrameworkResources;
    private Map<IStyleResourceValue, IStyleResourceValue> mStyleInheritanceMap;
    private final Map<String, Map<String, IResourceValue>> mProjectResources;
    private final Map<String, Map<String, IResourceValue>> mFrameworkResources;
    private final Map<IStyleResourceValue, IStyleResourceValue> mStyleInheritanceMap;

    // maps for dynamically generated id representing style objects (IStyleResourceValue)
    private Map<Integer, IStyleResourceValue> mDynamicIdToStyleMap;
@@ -927,7 +927,6 @@ public final class BridgeContext extends Context {
        return null;
    }

    @Override
    public File getExternalCacheDir() {
        // TODO Auto-generated method stub
        return null;
@@ -965,7 +964,6 @@ public final class BridgeContext extends Context {
        return null;
    }

    @Override
    public File getExternalFilesDir(String type) {
        // TODO Auto-generated method stub
        return null;