增加一级菜单。
diff --git a/packages/apps/Settings/AndroidManifest.xml b/packages/apps/Settings/AndroidManifest.xml
index fc29128..60124d9 100755
--- a/packages/apps/Settings/AndroidManifest.xml
+++ b/packages/apps/Settings/AndroidManifest.xml
@@ -1768,6 +1768,33 @@
android:excludeFromRecents="true"
android:exported="false" />
+ <activity android:name="Settings$FlashSettingActivity"
+ android:label="@string/wifi_menu_scan"
+ android:icon="@drawable/ic_scanservice"
+ android:taskAffinity="">
+ <intent-filter android:priority="1">
+ <action android:name="com.android.settings.FLASH_SETTING" />
+ <action android:name="android.settings.FLASH_SETTING" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.VOICE_LAUNCH" />
+ <category android:name="com.android.settings.SHORTCUT" />
+ </intent-filter>
+ <intent-filter android:priority="9">
+ <action android:name="com.android.settings.action.SETTINGS" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.category"
+ android:value="com.android.settings.category.ia.homepage" />
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.FlashSetting" />
+
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity>
+
<activity android:name=".password.SetNewPasswordActivity"
android:theme="@android:style/Theme.NoDisplay"
android:excludeFromRecents="true" >
diff --git a/packages/apps/Settings/src/com/android/settings/Settings.java b/packages/apps/Settings/src/com/android/settings/Settings.java
old mode 100644
new mode 100755
index ebf2d13..e016ba8
--- a/packages/apps/Settings/src/com/android/settings/Settings.java
+++ b/packages/apps/Settings/src/com/android/settings/Settings.java
@@ -120,7 +120,8 @@ public class Settings extends SettingsActivity {
/* empty */
}
public static class DirectoryAccessSettingsActivity extends SettingsActivity { /* empty */ }
-
+ public static class FlashSettingActivity extends SettingsActivity { /* empty */ }
+
public static class TopLevelSettings extends SettingsActivity { /* empty */ }
public static class ApnSettingsActivity extends SettingsActivity { /* empty */ }
public static class WifiCallingSettingsActivity extends SettingsActivity { /* empty */ }
diff --git a/packages/apps/Settings/src/com/android/settings/SettingsActivity.java b/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
old mode 100644
new mode 100755
index b6a5e76..0c22952
--- a/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
+++ b/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
@@ -602,6 +602,16 @@ public class SettingsActivity extends SettingsDrawerActivity
finish();
return null;
linjiayuan@chainway-PowerEdge-packages/apps/Settings$ git diff .
diff --git a/packages/apps/Settings/AndroidManifest.xml b/packages/apps/Settings/AndroidManifest.xml
index fc29128..60124d9 100755
--- a/packages/apps/Settings/AndroidManifest.xml
+++ b/packages/apps/Settings/AndroidManifest.xml
@@ -1768,6 +1768,33 @@
android:excludeFromRecents="true"
android:exported="false" />
+ <activity android:name="Settings$FlashSettingActivity"
+ android:label="@string/wifi_menu_scan"
+ android:icon="@drawable/ic_scanservice"
+ android:taskAffinity="">
+ <intent-filter android:priority="1">
+ <action android:name="com.android.settings.FLASH_SETTING" />
+ <action android:name="android.settings.FLASH_SETTING" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.VOICE_LAUNCH" />
+ <category android:name="com.android.settings.SHORTCUT" />
+ </intent-filter>
+ <intent-filter android:priority="9">
+ <action android:name="com.android.settings.action.SETTINGS" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.category"
+ android:value="com.android.settings.category.ia.homepage" />
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.FlashSetting" />
+
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity>
+
<activity android:name=".password.SetNewPasswordActivity"
android:theme="@android:style/Theme.NoDisplay"
android:excludeFromRecents="true" >
diff --git a/packages/apps/Settings/src/com/android/settings/Settings.java b/packages/apps/Settings/src/com/android/settings/Settings.java
old mode 100644
new mode 100755
index ebf2d13..97c7972
--- a/packages/apps/Settings/src/com/android/settings/Settings.java
+++ b/packages/apps/Settings/src/com/android/settings/Settings.java
@@ -120,6 +120,7 @@ public class Settings extends SettingsActivity {
/* empty */
}
public static class DirectoryAccessSettingsActivity extends SettingsActivity { /* empty */ }
+ public static class FlashSettingActivity extends SettingsActivity { /* empty */ }
public static class TopLevelSettings extends SettingsActivity { /* empty */ }
public static class ApnSettingsActivity extends SettingsActivity { /* empty */ }
diff --git a/packages/apps/Settings/src/com/android/settings/SettingsActivity.java b/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
old mode 100644
new mode 100755
index b6a5e76..0c22952
--- a/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
+++ b/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
@@ -602,6 +602,16 @@ public class SettingsActivity extends SettingsDrawerActivity
finish();
return null;
}
+ if ("com.android.settings.FlashSetting".equals(fragmentName)) {
+ Intent ZsSystemUpdateIntent = new Intent();
+ String pakagename="com.rscja.scanner";
+ String classname="com.rscja.scanner.ui.MainActivity";
+ ComponentName component = new ComponentName(pakagename, classname);
+ ZsSystemUpdateIntent.setComponent(component);
+ startActivity(ZsSystemUpdateIntent);
+ finish();
+ return null;
+ }
Log.d(LOG_TAG, "Switching to fragment " + fragmentName);
IExtTelephony extTelephony =