OSDN Git Service

Settings: implicitly link to lls settings
authorRoman Birg <roman@cyngn.com>
Fri, 25 Mar 2016 22:34:31 +0000 (15:34 -0700)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Wed, 30 Mar 2016 15:49:39 +0000 (08:49 -0700)
Ticket: CYNGNOS-2241
Change-Id: I39e883dd52ed4574a1ce1c2becb104c5458e800f
Signed-off-by: Roman Birg <roman@cyngn.com>
AndroidManifest.xml
src/com/android/settings/SecuritySettings.java
src/com/android/settings/Settings.java

index f38e0bc..9196532 100755 (executable)
                        android:resource="@id/lockscreen_settings" />
         </activity>
 
+        <activity android:name=".Settings$LiveLockScreenSettingsActivity"
+                  android:label="@string/live_lock_screen_title"
+                  android:taskAffinity="">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.VOICE_LAUNCH" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.SHORTCUT" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="cyanogenmod.intent.action.OPEN_LIVE_LOCKSCREEN_SETTINGS" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                       android:value="com.android.settings.cyanogenmod.LiveLockScreenSettings" />
+        </activity>
+
         <provider
             android:name=".search.SettingsSearchIndexablesProvider"
             android:authorities="com.android.settings"
index 8f2db6b..d311134 100644 (file)
@@ -71,6 +71,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
+import static cyanogenmod.content.Intent.ACTION_OPEN_LIVE_LOCKSCREEN_SETTINGS;
 
 /**
  * Gesture lock pattern settings.
@@ -349,7 +350,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
                     root.findPreference(KEY_GENERAL_CATEGORY);
             if (pm.hasSystemFeature(LIVE_LOCK_SCREEN_FEATURE) && generalCategory != null) {
                 Preference liveLockPreference = new Preference(getContext(), null);
-                liveLockPreference.setFragment(LiveLockScreenSettings.class.getCanonicalName());
+                liveLockPreference.setIntent(new Intent(ACTION_OPEN_LIVE_LOCKSCREEN_SETTINGS));
                 liveLockPreference.setOrder(0);
                 liveLockPreference.setTitle(R.string.live_lock_screen_title);
                 liveLockPreference.setSummary(R.string.live_lock_screen_summary);
index d392a0a..692b292 100644 (file)
@@ -126,5 +126,6 @@ public class Settings extends SettingsActivity {
     public static class ContributorsCloudActivity extends SettingsActivity { /* empty */ }
     public static class SoundSettingsActivity extends SettingsActivity { /* empty */ }
     public static class LockScreenSettingsActivity extends SettingsActivity { /* empty */ }
+    public static class LiveLockScreenSettingsActivity extends SettingsActivity { /* empty */ }
     public static class NotificationManagerActivity extends SettingsActivity { /* empty */ }
 }