diff options
author | Roman Birg <roman@cyngn.com> | 2014-09-17 10:37:05 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-26 16:11:13 -0700 |
commit | 6455208e1334114881be837cfbc26d3ae06f9ce3 (patch) | |
tree | 219d326bff3a7a8d451f10f08fc31fe8b27fbe44 /src/com/android/settings/SettingsActivity.java | |
parent | 0f8cf2c7f9ebf6ce40f905a3090b47ad6a87d0bc (diff) | |
download | packages_apps_Settings-6455208e1334114881be837cfbc26d3ae06f9ce3.zip packages_apps_Settings-6455208e1334114881be837cfbc26d3ae06f9ce3.tar.gz packages_apps_Settings-6455208e1334114881be837cfbc26d3ae06f9ce3.tar.bz2 |
Settings: squash of new profile UI for cm-12.0
Additions for cm-12.0:
- removed expanded desktop
- added add profile FAB
- updated tabs for meterial style
- added enabler switch bar
Squashed commits:
-------------------------------
Settings: refactor Profiles to be more user friendly
* Remove the notion of Profile app groups
* Rearrange profile setup flow, now we first present the user with ways
which will trigger the profile, then allow them to set what happens when
the profile is triggered.
Change-Id: I2870df894046cd43c21c67991fb5efc9c3fec837
Signed-off-by: Roman Birg <roman@cyngn.com>
Settings: cleanup new profiles UI
* cleanup old code
* for configuring profiles, add options to modify triggers and remove
the profile
* remove separate activity
* don't hardcode padding pixel sizes
Change-Id: I6b1d05c9f918714249411006c7562496e2a7539e
Signed-off-by: Roman Birg <roman@cyngn.com>
Profiles: fix expanded desktop settings not applying
Change-Id: Ia523145bf47bfc189c29b035ad5ec6e053cf9296
Settings: Fix profiles volume override summary.
Change-Id: I499cfb3006a7fc7b5e931ac854a7437f5d141523
Settings: fix Profiles expanded desktop choice mapping
Change-Id: Ib96811a0c268ca68a7b9732283c5abc142d143a4
Signed-off-by: Roman Birg <roman@cyngn.com>
Settings: add "Untouched" ring mode option in profiles
Change-Id: I4ac2d63119b328533217104a799cb0660ecddfb9
Signed-off-by: Roman Birg <roman@cyngn.com>
Settings: profiles: fix volume streams override behavior
Before we would always assume to override the stream, but that is not
always the case. Add a checkbox to turn the override on and off.
Signed-off-by: Roman Birg <roman@cyngn.com>
Change-Id: Ic1a58d59a9e514d4c2ccf376191ac7989bbead26
Diffstat (limited to 'src/com/android/settings/SettingsActivity.java')
-rw-r--r-- | src/com/android/settings/SettingsActivity.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java index 8edec09..09d97a6 100644 --- a/src/com/android/settings/SettingsActivity.java +++ b/src/com/android/settings/SettingsActivity.java @@ -37,6 +37,7 @@ import android.content.res.Configuration; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import android.nfc.NfcAdapter; +import android.nfc.Tag; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -91,6 +92,10 @@ import com.android.settings.deviceinfo.StorageSettings; import com.android.settings.fuelgauge.BatterySaverSettings; import com.android.settings.fuelgauge.PowerUsageDetail; import com.android.settings.fuelgauge.PowerUsageSummary; +import com.android.settings.notification.OtherSoundSettings; +import com.android.settings.profiles.NFCProfileTagCallback; +import com.android.settings.search.DynamicIndexableContentMonitor; +import com.android.settings.search.Index; import com.android.settings.inputmethod.InputMethodAndLanguageSettings; import com.android.settings.inputmethod.KeyboardLayoutPickerFragment; import com.android.settings.inputmethod.SpellCheckersSettings; @@ -251,6 +256,8 @@ public class SettingsActivity extends Activity private CharSequence mInitialTitle; private int mInitialTitleResId; + private NFCProfileTagCallback mNfcProfileCallback; + // Show only these settings for restricted users private int[] SETTINGS_FOR_RESTRICTED = { R.id.wireless_section, @@ -1525,4 +1532,21 @@ public class SettingsActivity extends Activity public void setResultIntentData(Intent resultIntentData) { mResultIntentData = resultIntentData; } + + public void setNfcProfileCallback(NFCProfileTagCallback callback) { + mNfcProfileCallback = callback; + } + + @Override + protected void onNewIntent(Intent intent) { + if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) { + Tag detectedTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); + if (mNfcProfileCallback != null) { + mNfcProfileCallback.onTagRead(detectedTag); + } + return; + } + super.onNewIntent(intent); + } + } |