summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SettingsActivity.java
diff options
context:
space:
mode:
authorLuis Vidal <lvidal@cyngn.com>2016-03-21 10:08:14 -0700
committerLuis Vidal <lvidal@cyngn.com>2016-03-31 17:14:08 -0700
commit2703eb717e542ff225611cb9e0217815ee14661c (patch)
tree8b0152d2b3da7daf49cf45704df78e9ee5d00e83 /src/com/android/settings/SettingsActivity.java
parent44a5b78ccbfb7ab39451209cdfa6feeebb0508db (diff)
downloadpackages_apps_Settings-2703eb717e542ff225611cb9e0217815ee14661c.zip
packages_apps_Settings-2703eb717e542ff225611cb9e0217815ee14661c.tar.gz
packages_apps_Settings-2703eb717e542ff225611cb9e0217815ee14661c.tar.bz2
Add Weather Content Provider [2/5]
Introduce a new entry in the settings menu to select the available weather provider services. This entry will be parked in the System category between Date&Time and Accessibility Change-Id: Ida230f3be72eb575a2b09504c99eaa16851c99f8
Diffstat (limited to 'src/com/android/settings/SettingsActivity.java')
-rw-r--r--src/com/android/settings/SettingsActivity.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 8e0bb98..dfef1a4 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -84,6 +84,7 @@ import com.android.settings.bluetooth.BluetoothSettings;
import com.android.settings.contributors.ContributorsCloudFragment;
import com.android.settings.cyanogenmod.DisplayRotation;
import com.android.settings.cyanogenmod.LiveLockScreenSettings;
+import com.android.settings.cyanogenmod.WeatherServiceSettings;
import com.android.settings.dashboard.DashboardCategory;
import com.android.settings.dashboard.DashboardSummary;
import com.android.settings.dashboard.DashboardTile;
@@ -137,6 +138,7 @@ import com.android.settings.wifi.SavedAccessPointsWifiSettings;
import com.android.settings.wifi.WifiSettings;
import com.android.settings.wifi.p2p.WifiP2pSettings;
+import cyanogenmod.app.CMContextConstants;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -377,7 +379,8 @@ public class SettingsActivity extends Activity
ProfilesSettings.class.getName(),
ContributorsCloudFragment.class.getName(),
NotificationManagerSettings.class.getName(),
- LiveLockScreenSettings.class.getName()
+ LiveLockScreenSettings.class.getName(),
+ WeatherServiceSettings.class.getName()
};
@@ -1328,6 +1331,11 @@ public class SettingsActivity extends Activity
if (!hasDeviceKeys) {
removeTile = true;
}
+ } else if (id == R.id.weather_settings) {
+ if (!getPackageManager().hasSystemFeature(
+ CMContextConstants.Features.WEATHER_SERVICES)) {
+ removeTile = true;
+ }
}
if (UserHandle.MU_ENABLED && UserHandle.myUserId() != 0