summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SettingsLicenseActivity.java
diff options
context:
space:
mode:
authorInseob Kim <inseob@google.com>2018-12-19 12:05:22 +0900
committerInseob Kim <inseob@google.com>2018-12-19 12:25:34 +0900
commit4d56f11c4aac1ddbd3bbea173e152dceb4436f10 (patch)
treedf338d1eafc015aaaa05252525190146cc80ea1b /src/com/android/settings/SettingsLicenseActivity.java
parent6c403a876dd2051081143a1c866bc1d0eb53ade9 (diff)
downloadpackages_apps_Settings-4d56f11c4aac1ddbd3bbea173e152dceb4436f10.tar.gz
packages_apps_Settings-4d56f11c4aac1ddbd3bbea173e152dceb4436f10.tar.bz2
packages_apps_Settings-4d56f11c4aac1ddbd3bbea173e152dceb4436f10.zip
Remove unused system properties
Properties ro.config.license_path and ro.config.manual_path are not set from anywhere but only from a test. Bug: N/A Test: mma -j Change-Id: I651405f3a201f5129bf37059e96e7bcc5efa73bf (cherry picked from commit 31e37683f0e859d355d0bbb57500498cc0de3962)
Diffstat (limited to 'src/com/android/settings/SettingsLicenseActivity.java')
-rw-r--r--src/com/android/settings/SettingsLicenseActivity.java31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/com/android/settings/SettingsLicenseActivity.java b/src/com/android/settings/SettingsLicenseActivity.java
index 2581ed9134..6f620578ce 100644
--- a/src/com/android/settings/SettingsLicenseActivity.java
+++ b/src/com/android/settings/SettingsLicenseActivity.java
@@ -21,7 +21,6 @@ import android.content.ContentResolver;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
-import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;
@@ -44,8 +43,7 @@ public class SettingsLicenseActivity extends FragmentActivity implements
LoaderManager.LoaderCallbacks<File> {
private static final String TAG = "SettingsLicenseActivity";
- private static final String DEFAULT_LICENSE_PATH = "/system/etc/NOTICE.html.gz";
- private static final String PROPERTY_LICENSE_PATH = "ro.config.license_path";
+ private static final String LICENSE_PATH = "/system/etc/NOTICE.html.gz";
private static final int LOADER_ID_LICENSE_HTML_LOADER = 0;
@@ -53,10 +51,9 @@ public class SettingsLicenseActivity extends FragmentActivity implements
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- final String licenseHtmlPath =
- SystemProperties.get(PROPERTY_LICENSE_PATH, DEFAULT_LICENSE_PATH);
- if (isFilePathValid(licenseHtmlPath)) {
- showSelectedFile(licenseHtmlPath);
+ File file = new File(LICENSE_PATH);
+ if (isFileValid(file)) {
+ showHtmlFromUri(Uri.fromFile(file));
} else {
showHtmlFromDefaultXmlFiles();
}
@@ -95,22 +92,6 @@ public class SettingsLicenseActivity extends FragmentActivity implements
}
}
- private void showSelectedFile(final String path) {
- if (TextUtils.isEmpty(path)) {
- Log.e(TAG, "The system property for the license file is empty");
- showErrorAndFinish();
- return;
- }
-
- final File file = new File(path);
- if (!isFileValid(file)) {
- Log.e(TAG, "License file " + path + " does not exist");
- showErrorAndFinish();
- return;
- }
- showHtmlFromUri(Uri.fromFile(file));
- }
-
private void showHtmlFromUri(Uri uri) {
// Kick off external viewer due to WebView security restrictions; we
// carefully point it at HTMLViewer, since it offers to decompress
@@ -139,10 +120,6 @@ public class SettingsLicenseActivity extends FragmentActivity implements
finish();
}
- private boolean isFilePathValid(final String path) {
- return !TextUtils.isEmpty(path) && isFileValid(new File(path));
- }
-
@VisibleForTesting
boolean isFileValid(final File file) {
return file.exists() && file.length() != 0;