diff options
author | Xavier Ducrohet <xav@android.com> | 2010-03-11 18:48:56 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2010-03-12 11:54:27 -0800 |
commit | d00fc08cf78849145dfb1cb371ea271e831bdb07 (patch) | |
tree | fac3086e404d1f9ee09e209446c200cac72ea271 /sdkmanager | |
parent | ed88cf93fbef99a878be3c5e6691615b34f09045 (diff) | |
download | sdk-d00fc08cf78849145dfb1cb371ea271e831bdb07.zip sdk-d00fc08cf78849145dfb1cb371ea271e831bdb07.tar.gz sdk-d00fc08cf78849145dfb1cb371ea271e831bdb07.tar.bz2 |
Disable writting the apk settings.
This is not fully supported. Its presence in
default.properties can be confusing the devs
in thinking this is supported.
Also removed a useless helper class.
Change-Id: Ia26b31e258f53964a437c7bbe202da857796df8e
Diffstat (limited to 'sdkmanager')
-rw-r--r-- | sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkConfigurationHelper.java | 48 | ||||
-rw-r--r-- | sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkSettings.java | 20 |
2 files changed, 20 insertions, 48 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkConfigurationHelper.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkConfigurationHelper.java deleted file mode 100644 index 4ba6fa6..0000000 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkConfigurationHelper.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.sdklib.internal.project; - - -/** - * Helper class to read and write Apk Configuration into a {@link ProjectProperties} file. - */ -public class ApkConfigurationHelper { - /** - * Reads the project settings from a {@link ProjectProperties} file and returns them as a - * {@link ApkSettings} object. - */ - public static ApkSettings getSettings(ProjectProperties properties) { - ApkSettings apkSettings = new ApkSettings(); - - boolean splitByDensity = Boolean.parseBoolean(properties.getProperty( - ProjectProperties.PROPERTY_SPLIT_BY_DENSITY)); - apkSettings.setSplitByDensity(splitByDensity); - - - return apkSettings; - } - - /** - * Sets the content of a {@link ApkSettings} into a {@link ProjectProperties}. - * @param properties the {@link ProjectProperties} in which to store the settings. - * @param settings the project settings to store. - */ - public static void setProperties(ProjectProperties properties, ApkSettings settings) { - properties.setProperty(ProjectProperties.PROPERTY_SPLIT_BY_DENSITY, - Boolean.toString(settings.isSplitByDpi())); - } -} diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkSettings.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkSettings.java index ff9028a..1c57b33 100644 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkSettings.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ApkSettings.java @@ -29,6 +29,16 @@ public class ApkSettings { } /** + * Creates an ApkSettings and fills it from the project settings read from a + * {@link ProjectProperties} file. + */ + public ApkSettings(ProjectProperties properties) { + boolean splitByDensity = Boolean.parseBoolean(properties.getProperty( + ProjectProperties.PROPERTY_SPLIT_BY_DENSITY)); + setSplitByDensity(splitByDensity); + } + + /** * Returns a map of configuration filters to be used by the -c option of aapt. * <p/>The map stores (key, value) pairs where the keys is a filename modifier and the value * is the parameter to pass to aapt through the -c option. @@ -56,6 +66,16 @@ public class ApkSettings { mSplitByDpi = split; } + /** + * Writes the receiver into a {@link ProjectProperties}. + * @param properties the {@link ProjectProperties} in which to store the settings. + */ + public void write(ProjectProperties properties) { + // TODO: this is not supported at the moment, so we dont write the property into the file. +// propertiessetProperty(ProjectProperties.PROPERTY_SPLIT_BY_DENSITY, +// Boolean.toString(isSplitByDpi())); + } + @Override public boolean equals(Object obj) { if (obj instanceof ApkSettings) { |