am 5066ef8a: am 7224e1b2: am 7d98d0a0: Merge "Fix crash when launching Activities in \'android\' package" into lmp-dev
* commit '5066ef8a448a74619fa0083caf89eb3f925021cf': Fix crash when launching Activities in 'android' package
This commit is contained in:
@@ -178,8 +178,13 @@ public class ResourcesManager {
|
||||
//}
|
||||
|
||||
AssetManager assets = new AssetManager();
|
||||
if (assets.addAssetPath(resDir) == 0) {
|
||||
return null;
|
||||
// resDir can be null if the 'android' package is creating a new Resources object.
|
||||
// This is fine, since each AssetManager automatically loads the 'android' package
|
||||
// already.
|
||||
if (resDir != null) {
|
||||
if (assets.addAssetPath(resDir) == 0) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (splitResDirs != null) {
|
||||
|
||||
@@ -62,8 +62,12 @@ public final class ResourcesKey {
|
||||
return false;
|
||||
}
|
||||
ResourcesKey peer = (ResourcesKey) obj;
|
||||
if (!mResDir.equals(peer.mResDir)) {
|
||||
return false;
|
||||
if (mResDir != peer.mResDir) {
|
||||
if (mResDir == null || peer.mResDir == null) {
|
||||
return false;
|
||||
} else if (!mResDir.equals(peer.mResDir)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (mDisplayId != peer.mDisplayId) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user