Merge branch 'master' into honeycomb-release
* master: Fixes a regression in launching certain settings activities. Fix bug #3248308 (On account set up, turn on sync for all apps by default; delay sync until after user selects Finish) Revert: Add checkbox to enable PTP USB mode. Fix 3148496: Update LockScreen layouts on large device Remove skip button from datetime settings Fix an NPE for monkey stability.
This commit is contained in:
@@ -248,6 +248,22 @@
|
|||||||
android:value="com.android.settings.Settings$WirelessSettingsActivity" />
|
android:value="com.android.settings.Settings$WirelessSettingsActivity" />
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<!-- Keep compatibility with old shortcuts. -->
|
||||||
|
<activity-alias android:name=".TetherSettings"
|
||||||
|
android:label="@string/tether_settings_title_all"
|
||||||
|
android:clearTaskOnLaunch="true"
|
||||||
|
android:exported="true"
|
||||||
|
android:targetActivity="Settings$TetherSettingsActivity">
|
||||||
|
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||||
|
android:value="com.android.settings.TetherSettings" />
|
||||||
|
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
|
||||||
|
android:resource="@id/wireless_settings" />
|
||||||
|
<meta-data android:name="com.android.settings.PARENT_FRAGMENT_TITLE"
|
||||||
|
android:resource="@string/wireless_networks_settings_title" />
|
||||||
|
<meta-data android:name="com.android.settings.PARENT_FRAGMENT_CLASS"
|
||||||
|
android:value="com.android.settings.Settings$WirelessSettingsActivity" />
|
||||||
|
</activity-alias>
|
||||||
|
|
||||||
<activity android:name="Settings$VpnSettingsActivity"
|
<activity android:name="Settings$VpnSettingsActivity"
|
||||||
android:theme="@android:style/Theme.Holo"
|
android:theme="@android:style/Theme.Holo"
|
||||||
android:label="@string/vpn_settings_activity_title"
|
android:label="@string/vpn_settings_activity_title"
|
||||||
@@ -689,23 +705,13 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name="ChooseLockPattern"
|
<activity android:name="ChooseLockPattern" android:exported="false"/>
|
||||||
android:label="@string/lockpattern_change_lock_pattern_label"
|
|
||||||
android:exported="false">
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity android:name="ChooseLockPassword"
|
<activity android:name="ChooseLockPassword" android:exported="false"/>
|
||||||
android:label="@string/lockpattern_change_lock_pin_label"
|
|
||||||
android:exported="false">
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity android:name="ChooseLockPatternTutorial"
|
<activity android:name="ChooseLockPatternTutorial"/>
|
||||||
android:label="@string/lockpattern_change_lock_pattern_label">
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity android:name="ChooseLockPatternExample"
|
<activity android:name="ChooseLockPatternExample"/>
|
||||||
android:label="@string/lockpattern_change_lock_pattern_label">
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<!-- Runs in the phone process since it needs access to the Phone object -->
|
<!-- Runs in the phone process since it needs access to the Phone object -->
|
||||||
<activity android:name=".deviceinfo.Status"
|
<activity android:name=".deviceinfo.Status"
|
||||||
@@ -781,6 +787,7 @@
|
|||||||
android:clearTaskOnLaunch="true">
|
android:clearTaskOnLaunch="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<action android:name="android.settings.APPLICATION_DEVELOPMENT_SETTINGS" />
|
||||||
<action android:name="com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS" />
|
<action android:name="com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
@@ -794,6 +801,26 @@
|
|||||||
android:value="com.android.settings.Settings$ApplicationSettingsActivity" />
|
android:value="com.android.settings.Settings$ApplicationSettingsActivity" />
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<activity-alias android:name="DevelopmentSettings"
|
||||||
|
android:clearTaskOnLaunch="true"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/development_settings_title"
|
||||||
|
android:targetActivity="Settings$DevelopmentSettingsActivity">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<action android:name="android.settings.APPLICATION_DEVELOPMENT_SETTINGS" />
|
||||||
|
<action android:name="com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
|
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||||
|
android:value="com.android.settings.DevelopmentSettings" />
|
||||||
|
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
|
||||||
|
android:resource="@id/application_settings" />
|
||||||
|
<meta-data android:name="com.android.settings.PARENT_FRAGMENT_TITLE"
|
||||||
|
android:resource="@string/applications_settings_header" />
|
||||||
|
<meta-data android:name="com.android.settings.PARENT_FRAGMENT_CLASS"
|
||||||
|
android:value="com.android.settings.Settings$ApplicationSettingsActivity" />
|
||||||
|
</activity-alias>
|
||||||
|
|
||||||
|
|
||||||
<!-- Bluetooth stuff -->
|
<!-- Bluetooth stuff -->
|
||||||
|
|||||||
@@ -16,15 +16,16 @@
|
|||||||
** limitations under the License.
|
** limitations under the License.
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent">
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="72dip"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<!-- "Enter PIN(Password) to unlock" -->
|
<!-- "Enter PIN(Password) to unlock" -->
|
||||||
@@ -61,12 +62,31 @@
|
|||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Spacer between password entry and keyboard -->
|
<!-- confirm / restart buttons -->
|
||||||
<View
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dip"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- left / top button: skip, or re-try -->
|
||||||
|
<Button android:id="@+id/cancel_button"
|
||||||
|
android:layout_width="140dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/lockpassword_cancel_label"/>
|
||||||
|
|
||||||
|
<!-- right / bottom button: confirm or ok -->
|
||||||
|
<Button android:id="@+id/next_button"
|
||||||
|
android:layout_width="140dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/lockpassword_continue_label"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
<!-- Alphanumeric keyboard -->
|
<!-- Alphanumeric keyboard -->
|
||||||
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
@@ -77,33 +97,4 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dip"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<Button android:id="@+id/cancel_button"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="140dip"
|
|
||||||
android:ellipsize="marquee"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_toLeftOf="@id/next_button"
|
|
||||||
android:text="@string/lockpassword_cancel_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Button android:id="@+id/next_button"
|
|
||||||
android:layout_width="140dip"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="marquee"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:text="@string/lockpassword_continue_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,62 +21,69 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<!-- left side: lock pattern -->
|
<RelativeLayout
|
||||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<!-- right side: pattern and messages -->
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1.0">
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<!-- left side: lock pattern -->
|
||||||
|
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||||
|
android:layout_width="354dip"
|
||||||
|
android:layout_height="354dip"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="72dip"
|
||||||
|
android:layout_marginLeft="111dip"
|
||||||
|
aspect="square"/>
|
||||||
|
|
||||||
|
<!-- right side: instructions and buttons -->
|
||||||
<!-- header message -->
|
<!-- header message -->
|
||||||
<TextView android:id="@+id/headerText"
|
<TextView android:id="@+id/headerText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="542dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="78dip"
|
||||||
android:textSize="22sp"
|
android:layout_marginTop="88dip"
|
||||||
android:gravity="left"/>
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_toRightOf="@id/lockPattern"
|
||||||
|
android:layout_marginLeft="100dip"
|
||||||
|
android:textSize="22sp"/>
|
||||||
|
|
||||||
<!-- footer message -->
|
<!-- footer message -->
|
||||||
<TextView android:id="@+id/footerText"
|
<TextView android:id="@+id/footerText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="542dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/headerText"
|
||||||
|
android:layout_marginTop="16dip"
|
||||||
|
android:layout_toRightOf="@id/lockPattern"
|
||||||
|
android:layout_marginLeft="100dip"
|
||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:layout_marginTop="40dip"
|
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<!-- confirm / restart buttons -->
|
<!-- confirm / restart buttons -->
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dip"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<!-- right / bottom button: confirm or ok -->
|
|
||||||
<Button android:id="@+id/footerRightButton"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="140dip"
|
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:ellipsize="marquee"
|
android:orientation="horizontal">
|
||||||
android:singleLine="true"
|
|
||||||
android:text="@string/lockpattern_confirm_button_text"/>
|
|
||||||
|
|
||||||
<!-- left / top button: skip, or re-try -->
|
<!-- left / top button: skip, or re-try -->
|
||||||
<Button android:id="@+id/footerLeftButton"
|
<Button android:id="@+id/footerLeftButton"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="140dip"
|
android:layout_width="140dip"
|
||||||
android:layout_toLeftOf="@id/footerRightButton"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/lockpattern_restart_button_text"/>
|
android:text="@string/lockpattern_restart_button_text"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
<!-- right / bottom button: confirm or ok -->
|
||||||
|
<Button android:id="@+id/footerRightButton"
|
||||||
|
android:layout_width="140dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/lockpattern_confirm_button_text"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,16 @@
|
|||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- This is the same layout as choose_lock_password. TODO: find out why merge fails -->
|
<!-- This is the same layout as choose_lock_password. TODO: find out why merge tag fails -->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent">
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="72dip"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<!-- "Enter PIN(Password) to unlock" -->
|
<!-- "Enter PIN(Password) to unlock" -->
|
||||||
@@ -63,12 +63,31 @@
|
|||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Spacer between password entry and keyboard -->
|
<!-- confirm / restart buttons -->
|
||||||
<View
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dip"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- left / top button: skip, or re-try -->
|
||||||
|
<Button android:id="@+id/cancel_button"
|
||||||
|
android:layout_width="140dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/lockpassword_cancel_label"/>
|
||||||
|
|
||||||
|
<!-- right / bottom button: confirm or ok -->
|
||||||
|
<Button android:id="@+id/next_button"
|
||||||
|
android:layout_width="140dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/lockpassword_continue_label"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
<!-- Alphanumeric keyboard -->
|
<!-- Alphanumeric keyboard -->
|
||||||
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
@@ -79,30 +98,4 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:visibility="visible">
|
|
||||||
|
|
||||||
<Button android:id="@+id/cancel_button"
|
|
||||||
android:layout_width="150dip"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="5dip"
|
|
||||||
android:layout_toLeftOf="@id/next_button"
|
|
||||||
android:text="@string/lockpassword_cancel_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Button android:id="@+id/next_button"
|
|
||||||
android:layout_width="150dip"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="5dip"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:drawableRight="@drawable/ic_btn_next"
|
|
||||||
android:drawablePadding="10dip"
|
|
||||||
android:text="@string/lockpassword_continue_label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,33 +21,42 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<!-- left side: lock pattern -->
|
<RelativeLayout
|
||||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<!-- right side: instructions and buttons -->
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1.0">
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<!-- left side: lock pattern -->
|
||||||
|
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||||
|
android:layout_width="354dip"
|
||||||
|
android:layout_height="354dip"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="72dip"
|
||||||
|
android:layout_marginLeft="111dip"
|
||||||
|
aspect="square"/>
|
||||||
|
|
||||||
|
<!-- right side: instructions and buttons -->
|
||||||
<!-- header message -->
|
<!-- header message -->
|
||||||
<TextView android:id="@+id/headerText"
|
<TextView android:id="@+id/headerText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="542dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="left"
|
android:layout_marginTop="88dip"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_toRightOf="@id/lockPattern"
|
||||||
|
android:layout_marginLeft="100dip"
|
||||||
android:textSize="22sp"/>
|
android:textSize="22sp"/>
|
||||||
|
|
||||||
<!-- footer message -->
|
<!-- footer message -->
|
||||||
<TextView android:id="@+id/footerText"
|
<TextView android:id="@+id/footerText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="542dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="40dip"
|
android:layout_below="@id/headerText"
|
||||||
android:gravity="left"
|
android:layout_marginTop="16dip"
|
||||||
|
android:layout_toRightOf="@id/lockPattern"
|
||||||
|
android:layout_marginLeft="100dip"
|
||||||
android:textSize="22sp"/>
|
android:textSize="22sp"/>
|
||||||
</LinearLayout>
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@android:color/background_dark"
|
|
||||||
android:gravity="center_horizontal">
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<!-- header text ('Enter Pin') -->
|
<!-- header text ('Enter Pin') -->
|
||||||
@@ -72,6 +71,7 @@
|
|||||||
android:background="#00000000"
|
android:background="#00000000"
|
||||||
android:layout_marginBottom="30dip"
|
android:layout_marginBottom="30dip"
|
||||||
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
||||||
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@@ -91,8 +91,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dip"
|
android:layout_margin="5dip"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:drawableRight="@drawable/ic_btn_next"
|
|
||||||
android:drawablePadding="10dip"
|
|
||||||
android:text="@string/lockpassword_continue_label"
|
android:text="@string/lockpassword_continue_label"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -17,75 +17,66 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/topLayout"
|
android:id="@+id/topLayout"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black">
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<!-- takes up all space above button bar at bottom -->
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dip"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
|
<!-- top: instructions and buttons -->
|
||||||
|
<!-- header message -->
|
||||||
<TextView android:id="@+id/headerText"
|
<TextView android:id="@+id/headerText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="542dip"
|
||||||
android:layout_height="0dip"
|
android:layout_height="78dip"
|
||||||
android:layout_weight="1"
|
android:layout_marginTop="96dip"
|
||||||
android:gravity="center"
|
android:textSize="22sp"/>
|
||||||
android:textSize="18sp"/>
|
|
||||||
|
<!-- footer message -->
|
||||||
|
<TextView android:id="@+id/footerText"
|
||||||
|
android:layout_width="542dip"
|
||||||
|
android:layout_height="78dip"
|
||||||
|
android:layout_marginTop="16dip"
|
||||||
|
android:textSize="22sp"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<!-- bottom: lock pattern -->
|
||||||
|
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||||
|
android:layout_width="354dip"
|
||||||
|
android:layout_height="354dip"
|
||||||
|
android:layout_marginTop="80dip"
|
||||||
|
aspect="square"/>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:background="@*android:drawable/code_lock_top"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="2dip" />
|
|
||||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<!-- bottom line looks bad when button bar is their too, omit in this case -->
|
|
||||||
<!--View
|
|
||||||
android:background="@*android:drawable/code_lock_bottom"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="8dip" /-->
|
|
||||||
|
|
||||||
<TextView android:id="@+id/footerText"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"/>
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
<RelativeLayout
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout style="@android:style/ButtonBar"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<Button android:id="@+id/footerLeftButton"
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- left / top button: skip, or re-try -->
|
||||||
|
<Button android:id="@+id/footerLeftButton"
|
||||||
android:layout_width="140dip"
|
android:layout_width="140dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/lockpattern_restart_button_text"/>
|
android:text="@string/lockpattern_restart_button_text"/>
|
||||||
|
|
||||||
<View
|
<!-- right / bottom button: confirm or ok -->
|
||||||
android:visibility="invisible"
|
|
||||||
android:layout_height="0dip"
|
|
||||||
android:layout_width="1dip"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<Button android:id="@+id/footerRightButton"
|
<Button android:id="@+id/footerRightButton"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="140dip"
|
android:layout_width="140dip"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:drawableRight="@drawable/ic_btn_next"
|
|
||||||
android:drawablePadding="3dip"
|
|
||||||
android:text="@string/lockpattern_confirm_button_text"/>
|
android:text="@string/lockpattern_confirm_button_text"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@android:color/background_dark"
|
|
||||||
android:gravity="center_horizontal">
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<!-- header text ('Enter Pin') -->
|
<!-- header text ('Enter Pin') -->
|
||||||
@@ -75,6 +74,7 @@
|
|||||||
android:background="#00000000"
|
android:background="#00000000"
|
||||||
android:layout_marginBottom="30dip"
|
android:layout_marginBottom="30dip"
|
||||||
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
||||||
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -17,35 +17,35 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/topLayout"
|
android:id="@+id/topLayout"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black">
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
|
<!-- top: instructions and buttons -->
|
||||||
|
<!-- header message -->
|
||||||
<TextView android:id="@+id/headerText"
|
<TextView android:id="@+id/headerText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="542dip"
|
||||||
android:layout_height="0dip"
|
android:layout_height="78dip"
|
||||||
android:layout_weight="1.0"
|
android:layout_marginTop="96dip"
|
||||||
android:gravity="center"
|
android:textSize="22sp"/>
|
||||||
android:textSize="18sp"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:background="@*android:drawable/code_lock_top"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="2dip" />
|
|
||||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
<View
|
|
||||||
android:background="@*android:drawable/code_lock_bottom"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="8dip" />
|
|
||||||
|
|
||||||
|
<!-- footer message -->
|
||||||
<TextView android:id="@+id/footerText"
|
<TextView android:id="@+id/footerText"
|
||||||
|
android:layout_width="542dip"
|
||||||
|
android:layout_height="78dip"
|
||||||
|
android:layout_marginTop="16dip"
|
||||||
|
android:textSize="22sp"/>
|
||||||
|
|
||||||
|
<!-- bottom: lock pattern -->
|
||||||
|
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||||
|
android:layout_width="354dip"
|
||||||
|
android:layout_height="354dip"
|
||||||
|
android:layout_marginTop="80dip"
|
||||||
|
aspect="square"/>
|
||||||
|
|
||||||
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1"/>
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
|
|
||||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- TODO: remove this button when we are sure it is needless -->
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/skip_button"
|
android:id="@+id/skip_button"
|
||||||
android:layout_width="250dip"
|
android:layout_width="250dip"
|
||||||
@@ -135,7 +136,8 @@
|
|||||||
android:layout_toLeftOf="@+id/next_button"
|
android:layout_toLeftOf="@+id/next_button"
|
||||||
android:layout_marginRight="20dip"
|
android:layout_marginRight="20dip"
|
||||||
android:textSize="24dip"
|
android:textSize="24dip"
|
||||||
android:text="@string/skip_label"/>
|
android:text="@string/skip_label"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/next_button"
|
android:id="@+id/next_button"
|
||||||
|
|||||||
@@ -1456,9 +1456,6 @@
|
|||||||
<!-- SD card & phone storage settings item title that will result in the phone unmounting the SD card. This will be done before the user phyiscally removes the SD card from the phone. Kind of like the "Safely remove" on some operating systems. -->
|
<!-- SD card & phone storage settings item title that will result in the phone unmounting the SD card. This will be done before the user phyiscally removes the SD card from the phone. Kind of like the "Safely remove" on some operating systems. -->
|
||||||
<string name="sd_eject_summary" product="default">Unmount the SD card so you can safely remove it</string>
|
<string name="sd_eject_summary" product="default">Unmount the SD card so you can safely remove it</string>
|
||||||
<!-- SD card & phone storage settings item title for toggling PTP mode on and off. When PTP mode is on the device will appear on the USB bus as a PTP camera device instead of an MTP music player. -->
|
<!-- SD card & phone storage settings item title for toggling PTP mode on and off. When PTP mode is on the device will appear on the USB bus as a PTP camera device instead of an MTP music player. -->
|
||||||
<string name="ptp_mode">Enable PTP mode</string>
|
|
||||||
<!-- SD card & phone storage settings item summary for toggling PTP mode on and off. When PTP mode is on the device will appear on the USB bus as a PTP camera device instead of an MTP music player. -->
|
|
||||||
<string name="ptp_mode_summary">Appear on USB as a PTP camera device instead of an MTP device</string>
|
|
||||||
|
|
||||||
<!-- SD card & phone storage settings item summary that is displayed when no SD card is inserted. This version of the string can probably never come up on current hardware. [CHAR LIMIT=25] -->
|
<!-- SD card & phone storage settings item summary that is displayed when no SD card is inserted. This version of the string can probably never come up on current hardware. [CHAR LIMIT=25] -->
|
||||||
<string name="sd_insert_summary" product="nosdcard">Insert USB storage for mounting</string>
|
<string name="sd_insert_summary" product="nosdcard">Insert USB storage for mounting</string>
|
||||||
|
|||||||
@@ -53,9 +53,6 @@
|
|||||||
android:icon="@color/memory_avail"
|
android:icon="@color/memory_avail"
|
||||||
android:title="@string/memory_available"
|
android:title="@string/memory_available"
|
||||||
android:summary="00"/>
|
android:summary="00"/>
|
||||||
<CheckBoxPreference android:key="ptp_mode_toggle"
|
|
||||||
android:title="@string/ptp_mode"
|
|
||||||
android:summary="@string/ptp_mode_summary"/>
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
import android.text.InputType;
|
||||||
import android.text.Selection;
|
import android.text.Selection;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -191,6 +192,10 @@ public class ChooseLockPassword extends PreferenceActivity {
|
|||||||
mHeaderText = (TextView) view.findViewById(R.id.headerText);
|
mHeaderText = (TextView) view.findViewById(R.id.headerText);
|
||||||
mKeyboardView.requestFocus();
|
mKeyboardView.requestFocus();
|
||||||
|
|
||||||
|
int currentType = mPasswordEntry.getInputType();
|
||||||
|
mPasswordEntry.setInputType(mIsAlphaMode ? currentType
|
||||||
|
: (currentType | InputType.TYPE_CLASS_NUMBER));
|
||||||
|
|
||||||
Intent intent = getActivity().getIntent();
|
Intent intent = getActivity().getIntent();
|
||||||
final boolean confirmCredentials = intent.getBooleanExtra("confirm_credentials", true);
|
final boolean confirmCredentials = intent.getBooleanExtra("confirm_credentials", true);
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
|
import android.text.InputType;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -98,6 +99,11 @@ public class ConfirmLockPassword extends PreferenceActivity {
|
|||||||
mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA
|
mKeyboardHelper.setKeyboardMode(isAlpha ? PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA
|
||||||
: PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
|
: PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
|
||||||
mKeyboardView.requestFocus();
|
mKeyboardView.requestFocus();
|
||||||
|
|
||||||
|
int currentType = mPasswordEntry.getInputType();
|
||||||
|
mPasswordEntry.setInputType(isAlpha ? currentType
|
||||||
|
: (currentType | InputType.TYPE_CLASS_NUMBER));
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import android.app.Activity;
|
|||||||
import android.app.AlarmManager;
|
import android.app.AlarmManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
@@ -91,6 +92,8 @@ public class DateTimeSettingsSetupWizard extends Activity
|
|||||||
mAutoTimeZoneButton.setText(autoTimeZoneEnabled ? R.string.zone_auto_summaryOn :
|
mAutoTimeZoneButton.setText(autoTimeZoneEnabled ? R.string.zone_auto_summaryOn :
|
||||||
R.string.zone_auto_summaryOff);*/
|
R.string.zone_auto_summaryOff);*/
|
||||||
|
|
||||||
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
|
|
||||||
final TimeZone tz = TimeZone.getDefault();
|
final TimeZone tz = TimeZone.getDefault();
|
||||||
mSelectedTimeZone = tz;
|
mSelectedTimeZone = tz;
|
||||||
mTimeZoneButton = (Button)findViewById(R.id.time_zone_button);
|
mTimeZoneButton = (Button)findViewById(R.id.time_zone_button);
|
||||||
|
|||||||
@@ -261,6 +261,8 @@ public class SoundSettings extends SettingsPreferenceFragment implements
|
|||||||
|
|
||||||
// updateState in fact updates the UI to reflect the system state
|
// updateState in fact updates the UI to reflect the system state
|
||||||
private void updateState(boolean force) {
|
private void updateState(boolean force) {
|
||||||
|
if (getActivity() == null) return;
|
||||||
|
|
||||||
final int ringerMode = mAudioManager.getRingerMode();
|
final int ringerMode = mAudioManager.getRingerMode();
|
||||||
|
|
||||||
// NB: in the UI we now simply call this "silent mode". A separate
|
// NB: in the UI we now simply call this "silent mode". A separate
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ import android.view.MenuInflater;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@@ -74,17 +72,17 @@ public class AccountSyncSettings extends AccountPreferenceBase {
|
|||||||
private TextView mProviderId;
|
private TextView mProviderId;
|
||||||
private ImageView mProviderIcon;
|
private ImageView mProviderIcon;
|
||||||
private TextView mErrorInfoView;
|
private TextView mErrorInfoView;
|
||||||
protected View mRemoveAccountArea;
|
|
||||||
private java.text.DateFormat mDateFormat;
|
private java.text.DateFormat mDateFormat;
|
||||||
private java.text.DateFormat mTimeFormat;
|
private java.text.DateFormat mTimeFormat;
|
||||||
private Account mAccount;
|
private Account mAccount;
|
||||||
// List of all accounts, updated when accounts are added/removed
|
// List of all accounts, updated when accounts are added/removed
|
||||||
// We need to re-scan the accounts on sync events, in case sync state changes.
|
// We need to re-scan the accounts on sync events, in case sync state changes.
|
||||||
private Account[] mAccounts;
|
private Account[] mAccounts;
|
||||||
private Button mRemoveAccountButton;
|
|
||||||
private ArrayList<SyncStateCheckBoxPreference> mCheckBoxes =
|
private ArrayList<SyncStateCheckBoxPreference> mCheckBoxes =
|
||||||
new ArrayList<SyncStateCheckBoxPreference>();
|
new ArrayList<SyncStateCheckBoxPreference>();
|
||||||
private ArrayList<String> mInvisibleAdapters = Lists.newArrayList();
|
private ArrayList<String> mInvisibleAdapters = Lists.newArrayList();
|
||||||
|
// Tell if we will use the current SyncManager data or just the User input
|
||||||
|
protected boolean mUseSyncManagerFeedsState = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(final int id) {
|
public Dialog onCreateDialog(final int id) {
|
||||||
@@ -266,7 +264,7 @@ public class AccountSyncSettings extends AccountPreferenceBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceTreeClick(PreferenceScreen preferences, Preference preference) {
|
public boolean onPreferenceTreeClick(PreferenceScreen preferences, Preference preference) {
|
||||||
if (preference instanceof SyncStateCheckBoxPreference) {
|
if (preference instanceof SyncStateCheckBoxPreference && mUseSyncManagerFeedsState) {
|
||||||
SyncStateCheckBoxPreference syncPref = (SyncStateCheckBoxPreference) preference;
|
SyncStateCheckBoxPreference syncPref = (SyncStateCheckBoxPreference) preference;
|
||||||
String authority = syncPref.getAuthority();
|
String authority = syncPref.getAuthority();
|
||||||
Account account = syncPref.getAccount();
|
Account account = syncPref.getAccount();
|
||||||
@@ -347,6 +345,10 @@ public class AccountSyncSettings extends AccountPreferenceBase {
|
|||||||
@Override
|
@Override
|
||||||
protected void onSyncStateUpdated() {
|
protected void onSyncStateUpdated() {
|
||||||
if (!isResumed()) return;
|
if (!isResumed()) return;
|
||||||
|
setFeedsState(mUseSyncManagerFeedsState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setFeedsState(boolean useSyncManager) {
|
||||||
// iterate over all the preferences, setting the state properly for each
|
// iterate over all the preferences, setting the state properly for each
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
List<SyncInfo> currentSyncs = ContentResolver.getCurrentSyncs();
|
List<SyncInfo> currentSyncs = ContentResolver.getCurrentSyncs();
|
||||||
@@ -365,6 +367,7 @@ public class AccountSyncSettings extends AccountPreferenceBase {
|
|||||||
String authority = syncPref.getAuthority();
|
String authority = syncPref.getAuthority();
|
||||||
Account account = syncPref.getAccount();
|
Account account = syncPref.getAccount();
|
||||||
|
|
||||||
|
if (useSyncManager) {
|
||||||
SyncStatusInfo status = ContentResolver.getSyncStatus(account, authority);
|
SyncStatusInfo status = ContentResolver.getSyncStatus(account, authority);
|
||||||
boolean syncEnabled = ContentResolver.getSyncAutomatically(account, authority);
|
boolean syncEnabled = ContentResolver.getSyncAutomatically(account, authority);
|
||||||
boolean authorityIsPending = status == null ? false : status.pending;
|
boolean authorityIsPending = status == null ? false : status.pending;
|
||||||
@@ -408,6 +411,9 @@ public class AccountSyncSettings extends AccountPreferenceBase {
|
|||||||
final boolean oneTimeSyncMode = !masterSyncAutomatically || !backgroundDataEnabled;
|
final boolean oneTimeSyncMode = !masterSyncAutomatically || !backgroundDataEnabled;
|
||||||
syncPref.setOneTimeSyncMode(oneTimeSyncMode);
|
syncPref.setOneTimeSyncMode(oneTimeSyncMode);
|
||||||
syncPref.setChecked(oneTimeSyncMode || syncEnabled);
|
syncPref.setChecked(oneTimeSyncMode || syncEnabled);
|
||||||
|
} else {
|
||||||
|
syncPref.setChecked(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mErrorInfoView.setVisibility(syncIsFailing ? View.VISIBLE : View.GONE);
|
mErrorInfoView.setVisibility(syncIsFailing ? View.VISIBLE : View.GONE);
|
||||||
getActivity().invalidateOptionsMenu();
|
getActivity().invalidateOptionsMenu();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
package com.android.settings.accounts;
|
package com.android.settings.accounts;
|
||||||
|
|
||||||
|
import android.accounts.Account;
|
||||||
|
import android.content.ContentResolver;
|
||||||
|
import android.preference.Preference;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.ContentResolver;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
@@ -27,6 +27,8 @@ public class AccountSyncSettingsInAddAccount extends AccountSyncSettings
|
|||||||
mFinishArea.setVisibility(View.VISIBLE);
|
mFinishArea.setVisibility(View.VISIBLE);
|
||||||
mFinishButton = (View) rootView.findViewById(R.id.finish_button);
|
mFinishButton = (View) rootView.findViewById(R.id.finish_button);
|
||||||
mFinishButton.setOnClickListener(this);
|
mFinishButton.setOnClickListener(this);
|
||||||
|
|
||||||
|
mUseSyncManagerFeedsState = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -37,6 +39,22 @@ public class AccountSyncSettingsInAddAccount extends AccountSyncSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
applySyncSettingsToSyncManager();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void applySyncSettingsToSyncManager() {
|
||||||
|
for (int i = 0, count = getPreferenceScreen().getPreferenceCount(); i < count; i++) {
|
||||||
|
Preference pref = getPreferenceScreen().getPreference(i);
|
||||||
|
if (! (pref instanceof SyncStateCheckBoxPreference)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SyncStateCheckBoxPreference syncPref = (SyncStateCheckBoxPreference) pref;
|
||||||
|
|
||||||
|
String authority = syncPref.getAuthority();
|
||||||
|
Account account = syncPref.getAccount();
|
||||||
|
|
||||||
|
ContentResolver.setSyncAutomatically(account, authority, syncPref.isChecked());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,6 +231,8 @@ public class ManageAccountsSettings extends AccountPreferenceBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void onSyncStateUpdated() {
|
protected void onSyncStateUpdated() {
|
||||||
|
// Catch any delayed delivery of update messages
|
||||||
|
if (getActivity() == null) return;
|
||||||
// Set background connection state
|
// Set background connection state
|
||||||
final ConnectivityManager connManager = (ConnectivityManager)
|
final ConnectivityManager connManager = (ConnectivityManager)
|
||||||
getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
|
getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
|||||||
@@ -51,11 +51,9 @@ import android.os.StatFs;
|
|||||||
import android.os.storage.IMountService;
|
import android.os.storage.IMountService;
|
||||||
import android.os.storage.StorageEventListener;
|
import android.os.storage.StorageEventListener;
|
||||||
import android.os.storage.StorageManager;
|
import android.os.storage.StorageManager;
|
||||||
import android.preference.CheckBoxPreference;
|
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.preference.PreferenceGroup;
|
import android.preference.PreferenceGroup;
|
||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.text.format.Formatter;
|
import android.text.format.Formatter;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@@ -78,8 +76,6 @@ public class Memory extends SettingsPreferenceFragment implements OnCancelListen
|
|||||||
|
|
||||||
private static final String MEMORY_SD_GROUP = "memory_sd";
|
private static final String MEMORY_SD_GROUP = "memory_sd";
|
||||||
|
|
||||||
private static final String PTP_MODE_TOGGLE = "ptp_mode_toggle";
|
|
||||||
|
|
||||||
private static final String MEMORY_INTERNAL_SIZE = "memory_internal_size";
|
private static final String MEMORY_INTERNAL_SIZE = "memory_internal_size";
|
||||||
|
|
||||||
private static final String MEMORY_INTERNAL_AVAIL = "memory_internal_avail";
|
private static final String MEMORY_INTERNAL_AVAIL = "memory_internal_avail";
|
||||||
@@ -123,8 +119,6 @@ public class Memory extends SettingsPreferenceFragment implements OnCancelListen
|
|||||||
|
|
||||||
boolean mSdMountToggleAdded = true;
|
boolean mSdMountToggleAdded = true;
|
||||||
|
|
||||||
private CheckBoxPreference mPtpModeToggle;
|
|
||||||
|
|
||||||
// Access using getMountService()
|
// Access using getMountService()
|
||||||
private IMountService mMountService = null;
|
private IMountService mMountService = null;
|
||||||
|
|
||||||
@@ -391,16 +385,6 @@ public class Memory extends SettingsPreferenceFragment implements OnCancelListen
|
|||||||
mSdMountPreferenceGroup.removePreference(mSdMountToggle);
|
mSdMountPreferenceGroup.removePreference(mSdMountToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
mPtpModeToggle = (CheckBoxPreference)findPreference(PTP_MODE_TOGGLE);
|
|
||||||
if (UsbManager.isFunctionSupported(UsbManager.USB_FUNCTION_MTP)) {
|
|
||||||
mPtpModeToggle.setChecked(Settings.System.getInt(
|
|
||||||
getContentResolver(),
|
|
||||||
Settings.System.USE_PTP_INTERFACE, 0) != 0);
|
|
||||||
} else {
|
|
||||||
// hide the PTP mode toggle checkbox if MTP is not supported
|
|
||||||
getPreferenceScreen().removePreference(mPtpModeToggle);
|
|
||||||
}
|
|
||||||
|
|
||||||
mInternalSize = findPreference(MEMORY_INTERNAL_SIZE);
|
mInternalSize = findPreference(MEMORY_INTERNAL_SIZE);
|
||||||
mInternalAvail = findPreference(MEMORY_INTERNAL_AVAIL);
|
mInternalAvail = findPreference(MEMORY_INTERNAL_AVAIL);
|
||||||
mInternalMediaUsage = findPreference(MEMORY_INTERNAL_MEDIA);
|
mInternalMediaUsage = findPreference(MEMORY_INTERNAL_MEDIA);
|
||||||
@@ -485,11 +469,6 @@ public class Memory extends SettingsPreferenceFragment implements OnCancelListen
|
|||||||
intent.setClass(getActivity(), com.android.settings.MediaFormat.class);
|
intent.setClass(getActivity(), com.android.settings.MediaFormat.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
} else if (preference == mPtpModeToggle) {
|
|
||||||
Settings.System.putInt(getContentResolver(),
|
|
||||||
Settings.System.USE_PTP_INTERFACE,
|
|
||||||
mPtpModeToggle.isChecked() ? 1 : 0);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user