Loading packages/SystemUI/AndroidManifest.xml +14 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,20 @@ android:excludeFromRecents="true"> </activity> <activity android:name=".tuner.TunerActivity" android:enabled="false" android:icon="@drawable/icon" android:theme="@android:style/Theme.Material.Settings" android:label="@string/system_ui_tuner" android:exported="true"> <intent-filter> <action android:name="com.android.settings.action.EXTRA_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.device" /> </activity> <!-- Alternate Recents --> <activity android:name=".recents.RecentsActivity" android:label="@string/accessibility_desc_recent_apps" Loading packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1021,4 +1021,7 @@ <string name="volume_stream_muted_dnd" translatable="false">%s silent — Total silence</string> <string name="volume_stream_limited_dnd" translatable="false">%s — Priority only</string> <string name="volume_stream_vibrate_dnd" translatable="false">%s vibrate — Priority only</string> <!-- Name of special SystemUI debug settings --> <string name="system_ui_tuner">SystemUI Tuner</string> </resources> packages/SystemUI/res/xml/tuner_prefs.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2015 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/system_ui_tuner"> <!-- Tuner prefs go here --> </PreferenceScreen> packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.tuner; import android.app.Activity; import android.os.Bundle; public class TunerActivity extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getFragmentManager().beginTransaction().replace(android.R.id.content, new TunerFragment()) .commit(); } } packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.tuner; import android.os.Bundle; import android.preference.PreferenceFragment; import android.view.MenuItem; import com.android.systemui.R; public class TunerFragment extends PreferenceFragment { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.tuner_prefs); getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); setHasOptionsMenu(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: getActivity().finish(); return true; } return super.onOptionsItemSelected(item); } } Loading
packages/SystemUI/AndroidManifest.xml +14 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,20 @@ android:excludeFromRecents="true"> </activity> <activity android:name=".tuner.TunerActivity" android:enabled="false" android:icon="@drawable/icon" android:theme="@android:style/Theme.Material.Settings" android:label="@string/system_ui_tuner" android:exported="true"> <intent-filter> <action android:name="com.android.settings.action.EXTRA_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.device" /> </activity> <!-- Alternate Recents --> <activity android:name=".recents.RecentsActivity" android:label="@string/accessibility_desc_recent_apps" Loading
packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1021,4 +1021,7 @@ <string name="volume_stream_muted_dnd" translatable="false">%s silent — Total silence</string> <string name="volume_stream_limited_dnd" translatable="false">%s — Priority only</string> <string name="volume_stream_vibrate_dnd" translatable="false">%s vibrate — Priority only</string> <!-- Name of special SystemUI debug settings --> <string name="system_ui_tuner">SystemUI Tuner</string> </resources>
packages/SystemUI/res/xml/tuner_prefs.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2015 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/system_ui_tuner"> <!-- Tuner prefs go here --> </PreferenceScreen>
packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.tuner; import android.app.Activity; import android.os.Bundle; public class TunerActivity extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getFragmentManager().beginTransaction().replace(android.R.id.content, new TunerFragment()) .commit(); } }
packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.tuner; import android.os.Bundle; import android.preference.PreferenceFragment; import android.view.MenuItem; import com.android.systemui.R; public class TunerFragment extends PreferenceFragment { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.tuner_prefs); getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); setHasOptionsMenu(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: getActivity().finish(); return true; } return super.onOptionsItemSelected(item); } }