android:title="@string/details"
android:visible="true"
android:showAsAction="never" />
+ <item android:id="@+id/action_help_and_feedback"
+ android:title="@string/setting_google_help_and_feedback"
+ android:visible="true"
+ android:showAsAction="never" />
</menu>
<!-- Text shown in camera settings list for selecting the camera mode that will be used by default when the app starts [CHAR LIMIT=25] -->
<string name="setting_default_camera">Default Camera</string>
- <!-- Text shown in camera settings list for sending user feedback to the app publisher [CHAR LIMIT=25] -->
- <string name="setting_send_feedback">Send feedback</string>
<!-- Text shown in camera settings list for launching Google Help [CHAR LIMIT=25] -->
- <string name="setting_google_help">Help</string>
+ <string name="setting_google_help_and_feedback">Help & feedback</string>
<!-- TODO: don't ship with these. -->
<string name="focus_ring_toggle" translatable="false">FR</string>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
- <PreferenceCategory android:title="@string/pref_category_general" >
-
- <!-- Resolutions and Quality -->
- <PreferenceScreen
- android:key="pref_category_resolution"
- android:title="@string/pref_category_resolution_quality" >
- <PreferenceCategory android:title="@string/mode_camera" >
-
- <!-- BACK camera PHOTO resolution -->
- <ListPreference
- android:defaultValue="@string/pref_camera_picturesize_default"
- android:entryValues="@array/pref_camera_picturesize_entryvalues"
- android:key="pref_camera_picturesize_back_key"
- android:title="@string/setting_back_camera_photo" />
- <!-- FRONT camera PHOTO resolution -->
- <ListPreference
- android:defaultValue="@string/pref_camera_picturesize_default"
- android:entryValues="@array/pref_camera_picturesize_entryvalues"
- android:key="pref_camera_picturesize_front_key"
- android:title="@string/setting_front_camera_photo" />
- </PreferenceCategory>
- <PreferenceCategory android:title="@string/mode_video" >
-
- <!-- BACK camera VIDEO resolution -->
- <ListPreference
- android:defaultValue="@string/pref_camera_picturesize_default"
- android:entryValues="@array/pref_video_quality_entryvalues"
- android:key="pref_video_quality_back_key"
- android:title="@string/setting_back_camera_video" />
- <!-- FRONT camera VIDEO resolution -->
- <ListPreference
- android:defaultValue="@string/pref_camera_picturesize_default"
- android:entryValues="@array/pref_video_quality_entryvalues"
- android:key="pref_video_quality_front_key"
- android:title="@string/setting_front_camera_video" />
- </PreferenceCategory>
- </PreferenceScreen>
-
- <!-- Location -->
- <SwitchPreference
- android:defaultValue="false"
- android:key="pref_camera_recordlocation_key"
- android:title="@string/pref_camera_save_location_title" />
-
- <!-- Exposure Compensation -->
- <PreferenceScreen
- android:key="pref_category_advanced"
- android:title="@string/pref_category_advanced" >
-
- <SwitchPreference
- android:defaultValue="false"
- android:key="pref_camera_exposure_compensation_key"
- android:title="@string/pref_camera_exposure_compensation" />
- </PreferenceScreen>
-
+ <!-- Resolutions and Quality -->
+ <PreferenceScreen
+ android:key="pref_category_resolution"
+ android:title="@string/pref_category_resolution_quality" >
+ <PreferenceCategory android:title="@string/mode_camera" >
+
+ <!-- BACK camera PHOTO resolution -->
+ <ListPreference
+ android:defaultValue="@string/pref_camera_picturesize_default"
+ android:entryValues="@array/pref_camera_picturesize_entryvalues"
+ android:key="pref_camera_picturesize_back_key"
+ android:title="@string/setting_back_camera_photo" />
+ <!-- FRONT camera PHOTO resolution -->
+ <ListPreference
+ android:defaultValue="@string/pref_camera_picturesize_default"
+ android:entryValues="@array/pref_camera_picturesize_entryvalues"
+ android:key="pref_camera_picturesize_front_key"
+ android:title="@string/setting_front_camera_photo" />
</PreferenceCategory>
- <PreferenceCategory android:title="@string/pref_category_about" >
-
- <!-- Build version. -->
- <Preference
- android:key="build_version"
- android:title="@string/pref_title_build_version" />
-
- <!-- Open Source Licenses -->
- <Preference
- android:key="pref_open_source_licenses"
- android:title="@string/open_source_licenses" >
- <intent
- android:targetClass="com.android.camera.app.LicensesActivity"
- android:targetPackage="com.google.android.GoogleCamera" />
- </Preference>
-
- <!-- Send Feedback -->
- <Preference
- android:key="pref_send_feedback"
- android:title="@string/setting_send_feedback" />
-
- <!-- GoogleHelp launcher -->
- <Preference
- android:key="pref_launch_help"
- android:title="@string/setting_google_help" />
+ <PreferenceCategory android:title="@string/mode_video" >
+
+ <!-- BACK camera VIDEO resolution -->
+ <ListPreference
+ android:defaultValue="@string/pref_camera_picturesize_default"
+ android:entryValues="@array/pref_video_quality_entryvalues"
+ android:key="pref_video_quality_back_key"
+ android:title="@string/setting_back_camera_video" />
+ <!-- FRONT camera VIDEO resolution -->
+ <ListPreference
+ android:defaultValue="@string/pref_camera_picturesize_default"
+ android:entryValues="@array/pref_video_quality_entryvalues"
+ android:key="pref_video_quality_front_key"
+ android:title="@string/setting_front_camera_video" />
</PreferenceCategory>
+ </PreferenceScreen>
+
+ <!-- Location -->
+ <SwitchPreference
+ android:defaultValue="false"
+ android:key="pref_camera_recordlocation_key"
+ android:title="@string/pref_camera_save_location_title" />
+
+ <!-- Exposure Compensation -->
+ <PreferenceScreen
+ android:key="pref_category_advanced"
+ android:title="@string/pref_category_advanced" >
+
+ <SwitchPreference
+ android:defaultValue="false"
+ android:key="pref_camera_exposure_compensation_key"
+ android:title="@string/pref_camera_exposure_compensation" />
+ </PreferenceScreen>
+
+ <!-- Google Help and feedback launcher -->
+ <Preference
+ android:key="pref_launch_help"
+ android:title="@string/setting_google_help_and_feedback" />
</PreferenceScreen>
\ No newline at end of file
import com.android.camera.util.FeedbackHelper;
import com.android.camera.util.GalleryHelper;
import com.android.camera.util.GcamHelper;
+import com.android.camera.util.GoogleHelpHelper;
import com.android.camera.util.IntentHelper;
import com.android.camera.util.PhotoSphereHelper.PanoramaViewHelper;
import com.android.camera.util.ReleaseDialogHelper;
case R.id.action_details:
showDetailsDialog(mFilmstripController.getCurrentId());
return true;
+ case R.id.action_help_and_feedback:
+ mResetToPreviewOnResume = false;
+ GoogleHelpHelper.launchGoogleHelp(this);
+ return true;
default:
return super.onOptionsItemSelected(item);
}
package com.android.camera.settings;
-import android.accounts.Account;
-import android.accounts.AccountManager;
import android.app.ActionBar;
import android.app.Activity;
import android.app.Dialog;
import com.android.camera.debug.Log;
import com.android.camera.settings.SettingsUtil.SelectedPictureSizes;
import com.android.camera.settings.SettingsUtil.SelectedVideoQualities;
-import com.android.camera.util.FeedbackHelper;
import com.android.camera.util.GoogleHelpHelper;
import com.android.camera.util.SettingsHelper;
import com.android.camera.util.Size;
public static class CameraSettingsFragment extends PreferenceFragment implements
OnSharedPreferenceChangeListener {
- public static final String PREF_OPEN_SOURCE_LICENSES = "pref_open_source_licenses";
public static final String PREF_CATEGORY_RESOLUTION = "pref_category_resolution";
public static final String PREF_CATEGORY_ADVANCED = "pref_category_advanced";
- public static final String PREF_SEND_FEEDBACK = "pref_send_feedback";
public static final String PREF_LAUNCH_HELP = "pref_launch_help";
- private static final String BUILD_VERSION = "build_version";
private static final Log.Tag TAG = new Log.Tag("SettingsFragment");
private static DecimalFormat sMegaPixelFormat = new DecimalFormat("##0.0");
- private FeedbackHelper mFeedbackHelper;
private String[] mCamcorderProfileNames;
// Selected resolutions for the different cameras and sizes.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Context context = this.getActivity().getApplicationContext();
- mFeedbackHelper = new FeedbackHelper(context);
addPreferencesFromResource(R.xml.camera_preferences);
SettingsHelper.addAdditionalPreferences(this, context);
mCamcorderProfileNames = getResources().getStringArray(R.array.camcorder_profile_names);
super.onResume();
final Activity activity = this.getActivity();
- // Only show open source licenses in GoogleCamera build.
- if (!SettingsHelper.isOpenSourceLicensesShown()) {
- Preference pref = findPreference(PREF_OPEN_SOURCE_LICENSES);
- recursiveDelete(getPreferenceScreen(), pref);
- }
-
// Load the camera sizes.
loadSizes();
(PreferenceScreen) findPreference(PREF_CATEGORY_ADVANCED);
configureHomeAsUp(advancedScreen);
- // Set build number.
- try {
- final PackageInfo packageInfo = activity.getPackageManager().getPackageInfo(
- getActivity().getPackageName(), 0);
- findPreference(BUILD_VERSION).setSummary(packageInfo.versionName);
- } catch (PackageManager.NameNotFoundException e) {
- findPreference(BUILD_VERSION).setSummary("?");
- }
- getPreferenceScreen().getSharedPreferences()
- .registerOnSharedPreferenceChangeListener(this);
-
- // Set-Up Feedback entry to launch the feedback flow on click.
- findPreference(PREF_SEND_FEEDBACK).setOnPreferenceClickListener(
- new OnPreferenceClickListener() {
-
- @Override
- public boolean onPreferenceClick(Preference preference) {
- mFeedbackHelper.startFeedback();
- return true;
- }
- });
-
- final Account account = getFirstGoogleAccount();
Preference helpPref = findPreference(PREF_LAUNCH_HELP);
helpPref.setOnPreferenceClickListener(
new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
- GoogleHelpHelper.launchGoogleHelp(activity, account);
+ GoogleHelpHelper.launchGoogleHelp(activity);
return true;
}
});
}
/**
- * Tries to get one Google account for this user,
- * which is used to customize the GoogleHelp screen.
- */
- private Account getFirstGoogleAccount() {
- Account[] accounts = AccountManager.get(this.getActivity()
- .getApplicationContext()).getAccountsByType("com.google");
- if (accounts.length == 0) {
- return null;
- } else {
- return accounts[0];
- }
- }
-
- /**
* Configure home-as-up for sub-screens.
*/
private void configureHomeAsUp(final PreferenceScreen preferenceScreen) {
}
@Override
- public void onStop() {
- mFeedbackHelper.stopFeedback();
- super.onStop();
- }
-
- @Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
setSummary(findPreference(key));
}