Commit f3f19141 authored by Alexander Ivanov's avatar Alexander Ivanov

Update min SDK version, target SDK version and build target. Close #147.

parent 8c937d5f
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
<receiver android:name="com.xabber.android.receiver.GoXaReceiver" /> <receiver android:name="com.xabber.android.receiver.GoXaReceiver" />
<receiver android:name="com.xabber.android.receiver.ComposingPausedReceiver" /> <receiver android:name="com.xabber.android.receiver.ComposingPausedReceiver" />
</application> </application>
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="9" /> <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false" /> <uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" /> <uses-feature android:name="android.hardware.location.gps" android:required="false" />
......
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
# Indicates whether an apk should be generated for each density. # Indicates whether an apk should be generated for each density.
split.density=false split.density=false
# Project target. # Project target.
target=android-9 target=android-14
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:padding="4dip" android:padding="4dip"
> >
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center"> android:gravity="center">
<ImageView <ImageView
......
...@@ -15,17 +15,17 @@ ...@@ -15,17 +15,17 @@
<ScrollView <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent"> android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView android:text="@string/account_type" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="@string/account_type" android:layout_width="match_parent" android:layout_height="wrap_content" />
<Spinner <Spinner
android:id="@+id/account_type" android:id="@+id/account_type"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="4dip" android:paddingTop="4dip"
android:paddingBottom="8dip" android:paddingBottom="8dip"
...@@ -34,15 +34,15 @@ ...@@ -34,15 +34,15 @@
<LinearLayout <LinearLayout
android:id="@+id/auth_panel" android:id="@+id/auth_panel"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
> >
<TextView android:text="@string/account_user_name" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="@string/account_user_name" android:layout_width="match_parent" android:layout_height="wrap_content" />
<EditText <EditText
android:id="@+id/account_user_name" android:id="@+id/account_user_name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:singleLine="true" android:singleLine="true"
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
android:hint="" android:hint=""
/> />
<TextView android:text="@string/account_password" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="@string/account_password" android:layout_width="match_parent" android:layout_height="wrap_content" />
<EditText <EditText
android:id="@+id/account_password" android:id="@+id/account_password"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:password="true" android:password="true"
android:singleLine="true" android:singleLine="true"
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<CheckBox <CheckBox
android:id="@+id/store_password" android:id="@+id/store_password"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="true" android:checked="true"
android:text="@string/account_store_password" /> android:text="@string/account_store_password" />
...@@ -71,27 +71,27 @@ ...@@ -71,27 +71,27 @@
<CheckBox <CheckBox
android:id="@+id/syncable" android:id="@+id/syncable"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="true" android:checked="true"
android:text="@string/account_syncable" /> android:text="@string/account_syncable" />
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<Button <Button
android:text="@string/account_add" android:text="@string/account_add"
android:id="@+id/ok" android:id="@+id/ok"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/account_help" android:id="@+id/account_help"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:autoLink="all" android:autoLink="all"
/> />
</LinearLayout> </LinearLayout>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="4dip"> android:padding="4dip">
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_marginLeft="6dip" android:layout_marginLeft="6dip"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="4dip"> android:padding="4dip">
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_marginLeft="6dip" android:layout_marginLeft="6dip"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_list_item_height" android:layout_height="@dimen/contact_list_item_height"
android:paddingTop="@dimen/contact_list_item_padding_top" android:paddingTop="@dimen/contact_list_item_padding_top"
android:paddingBottom="@dimen/contact_list_item_padding_bottom" android:paddingBottom="@dimen/contact_list_item_padding_bottom"
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:paddingLeft="4dip" android:paddingLeft="4dip"
android:paddingRight="4dip" android:paddingRight="4dip"
> >
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<TextView <TextView
android:id="@+id/status" android:id="@+id/status"
android:text="@android:string/cancel" android:text="@android:string/cancel"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="4dip"> android:padding="4dip">
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_marginLeft="6dip" android:layout_marginLeft="6dip"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="2dip"> android:padding="2dip">
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_marginLeft="6dip" android:layout_marginLeft="6dip"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="4dip"> android:padding="4dip">
<TextView <TextView
android:id="@android:id/message" android:id="@android:id/message"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="48dp"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_list_item_height" android:layout_height="@dimen/contact_list_item_height"
android:paddingTop="@dimen/contact_list_item_padding_top" android:paddingTop="@dimen/contact_list_item_padding_top"
android:paddingBottom="@dimen/contact_list_item_padding_bottom" android:paddingBottom="@dimen/contact_list_item_padding_bottom"
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<include layout="@layout/base_contact_avatar" /> <include layout="@layout/base_contact_avatar" />
<RelativeLayout <RelativeLayout
android:id="@+id/panel" android:id="@+id/panel"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:paddingLeft="@dimen/active_chat_padding_left" android:paddingLeft="@dimen/active_chat_padding_left"
android:paddingTop="@dimen/active_chat_padding_top" android:paddingTop="@dimen/active_chat_padding_top"
android:paddingRight="@dimen/active_chat_padding_right" android:paddingRight="@dimen/active_chat_padding_right"
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/> />
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_name_height_show_status" android:layout_height="@dimen/contact_name_height_show_status"
android:layout_marginRight="@dimen/status_icon_width" android:layout_marginRight="@dimen/status_icon_width"
android:gravity="bottom" android:gravity="bottom"
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
/> />
<TextView <TextView
android:id="@+id/status" android:id="@+id/status"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_name_height_show_status" android:layout_height="@dimen/contact_name_height_show_status"
android:layout_marginRight="@dimen/status_icon_width" android:layout_marginRight="@dimen/status_icon_width"
android:gravity="top" android:gravity="top"
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</RelativeLayout> </RelativeLayout>
<ImageView <ImageView
android:id="@+id/shadow" android:id="@+id/shadow"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_list_item_height" android:layout_height="@dimen/contact_list_item_height"
android:background="@drawable/shadow" android:background="@drawable/shadow"
/> />
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/expander_height" android:layout_height="@dimen/expander_height"
android:gravity="center_vertical|left" android:gravity="center_vertical|left"
android:background="@drawable/expander_background_dark" android:background="@drawable/expander_background_dark"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
/> />
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/expander_height" android:layout_height="@dimen/expander_height"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_marginRight="@dimen/expander_text_margin_right" android:layout_marginRight="@dimen/expander_text_margin_right"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="6dip" android:paddingLeft="6dip"
android:paddingTop="4dip" android:paddingTop="4dip"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<include layout="@layout/base_contact_avatar" /> <include layout="@layout/base_contact_avatar" />
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="8dip" android:layout_marginLeft="8dip"
android:orientation="vertical" android:orientation="vertical"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="3dp"> android:padding="3dp">
<ImageView <ImageView
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<com.xabber.android.ui.widget.PageSwitcher <com.xabber.android.ui.widget.PageSwitcher
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:id="@+id/switcher" android:id="@+id/switcher"
/> />
\ No newline at end of file
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
/> />
\ No newline at end of file
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/info" android:id="@+id/info"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="4dip" android:padding="4dip"
android:textAppearance="@style/ChatInfo.Warning" android:textAppearance="@style/ChatInfo.Warning"
......
...@@ -15,19 +15,19 @@ ...@@ -15,19 +15,19 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<include layout="@layout/contact_title" /> <include layout="@layout/contact_title" />
<RelativeLayout <RelativeLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
> >
<ListView <ListView
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:padding="4dip" android:padding="4dip"
android:stackFromBottom="true" android:stackFromBottom="true"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
/> />
<TextView <TextView
android:id="@+id/chat_page" android:id="@+id/chat_page"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="4dip" android:padding="4dip"
android:textSize="12sp" android:textSize="12sp"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="4dip"> android:paddingTop="4dip">
<EditText <EditText
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
android:cursorVisible="true" android:cursorVisible="true"
android:hint="@string/chat_input_hint" android:hint="@string/chat_input_hint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:maxLines="5" android:maxLines="5"
android:scrollbars="vertical" android:scrollbars="vertical"
android:fadingEdge="vertical" android:fadingEdge="vertical"
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
android:text="@string/chat_send" android:text="@string/chat_send"
android:id="@+id/chat_send" android:id="@+id/chat_send"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
/> />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/background" android:id="@+id/background"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="4dip" android:paddingRight="4dip"
android:paddingBottom="4dip" android:paddingBottom="4dip"
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
<ListView <ListView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:padding="4dip" /> android:padding="4dip" />
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:paddingRight="4dip" android:paddingRight="4dip"
> >
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
/> />
<com.xabber.android.ui.widget.NoDefaultSpinner <com.xabber.android.ui.widget.NoDefaultSpinner
android:id="@+id/contact_account" android:id="@+id/contact_account"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:prompt="@string/choose_account" android:prompt="@string/choose_account"
/> />
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<EditText <EditText
android:text="" android:text=""
android:id="@+id/contact_user" android:id="@+id/contact_user"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="user@domain.name" android:hint="user@domain.name"
android:singleLine="true" android:singleLine="true"
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<EditText <EditText
android:text="" android:text=""
android:id="@+id/contact_name" android:id="@+id/contact_name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
/> />
...@@ -63,13 +63,13 @@ ...@@ -63,13 +63,13 @@
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center_horizontal|bottom" android:gravity="center_horizontal|bottom"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<Button <Button
android:text="@string/contact_add" android:text="@string/contact_add"
android:id="@+id/ok" android:id="@+id/ok"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</LinearLayout> </LinearLayout>
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<include layout="@layout/contact_title" /> <include layout="@layout/contact_title" />
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<EditText <EditText
android:id="@+id/contact_name" android:id="@+id/contact_name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<ListView <ListView
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:paddingLeft="6dip" android:paddingLeft="6dip"
......
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<RelativeLayout <RelativeLayout
android:id="@android:id/title" android:id="@android:id/title"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/title_height" android:layout_height="@dimen/title_height"
android:background="@drawable/title_main_background_dark" android:background="@drawable/title_main_background_dark"
> >
...@@ -29,13 +29,13 @@ ...@@ -29,13 +29,13 @@
android:id="@+id/back_button" android:id="@+id/back_button"
android:background="@drawable/title_logo" android:background="@drawable/title_logo"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
/> />
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_marginRight="@dimen/contact_list_status_mode_width" android:layout_marginRight="@dimen/contact_list_status_mode_width"
android:layout_toRightOf="@id/back_button" android:layout_toRightOf="@id/back_button"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -102,8 +102,8 @@ ...@@ -102,8 +102,8 @@
</HorizontalScrollView> </HorizontalScrollView>
<TextView <TextView
android:id="@+id/common_status_text" android:id="@+id/common_status_text"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_marginLeft="-72dip" android:layout_marginLeft="-72dip"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:text="online" android:text="online"
...@@ -120,20 +120,20 @@ ...@@ -120,20 +120,20 @@
android:paddingRight="@dimen/active_chat_padding_right" android:paddingRight="@dimen/active_chat_padding_right"
android:background="@drawable/btn_status_mode" android:background="@drawable/btn_status_mode"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
/> />
</RelativeLayout> </RelativeLayout>
<ListView <ListView
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textFilterEnabled="true" android:textFilterEnabled="true"
/> />
<RelativeLayout <RelativeLayout
android:id="@+id/info" android:id="@+id/info"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center_vertical" android:gravity="center_vertical"
> >
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/title" android:id="@+id/title"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/title_height" android:layout_height="@dimen/title_height"
android:background="@drawable/title_account_background_light" android:background="@drawable/title_account_background_light"
> >
<LinearLayout <LinearLayout
android:id="@+id/title_color" android:id="@+id/title_color"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
> >
<ImageButton <ImageButton
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
android:src="@drawable/btn_title_back" android:src="@drawable/btn_title_back"
android:background="@drawable/title_logo" android:background="@drawable/title_logo"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
/> />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -45,13 +45,13 @@ ...@@ -45,13 +45,13 @@
android:src="@drawable/ic_security" android:src="@drawable/ic_security"
android:paddingLeft="6dip" android:paddingLeft="6dip"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:visibility="gone" android:visibility="gone"
/> />
<LinearLayout <LinearLayout
android:id="@+id/name_holder" android:id="@+id/name_holder"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:layout_weight="1" android:layout_weight="1"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
> >
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:gravity="bottom" android:gravity="bottom"
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
/> />
<TextView <TextView
android:id="@+id/status_text" android:id="@+id/status_text"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:gravity="top" android:gravity="top"
...@@ -88,13 +88,13 @@ ...@@ -88,13 +88,13 @@
android:paddingRight="@dimen/active_chat_padding_right" android:paddingRight="@dimen/active_chat_padding_right"
android:background="@drawable/btn_status_mode" android:background="@drawable/btn_status_mode"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
/> />
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:id="@+id/shadow" android:id="@+id/shadow"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:background="@drawable/shadow" android:background="@drawable/shadow"
/> />
</RelativeLayout> </RelativeLayout>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
along with this program. If not, see http://www.gnu.org/licenses/. along with this program. If not, see http://www.gnu.org/licenses/.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="9dip" android:paddingTop="9dip"
android:paddingBottom="3dip" android:paddingBottom="3dip"
...@@ -23,14 +23,14 @@ ...@@ -23,14 +23,14 @@
> >
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="54dip" android:minHeight="54dip"
android:orientation="vertical" android:orientation="vertical"
> >
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center_vertical" android:gravity="center_vertical"
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
style="?android:attr/textAppearanceLarge" style="?android:attr/textAppearanceLarge"
android:singleLine="true" android:singleLine="true"
android:ellipsize="end" android:ellipsize="end"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="1dip" android:layout_height="1dip"
android:visibility="gone" android:visibility="gone"
android:scaleType="fitXY" android:scaleType="fitXY"
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<ScrollView <ScrollView
android:id="@+id/container" android:id="@+id/container"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:paddingTop="2dip" android:paddingTop="2dip"
...@@ -84,14 +84,14 @@ ...@@ -84,14 +84,14 @@
> >
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:orientation="vertical" > android:orientation="vertical" >
<TextView <TextView
android:id="@android:id/message" android:id="@android:id/message"
style="?android:attr/textAppearanceMedium" style="?android:attr/textAppearanceMedium"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="5dip" android:padding="5dip"
/> />
...@@ -101,14 +101,14 @@ ...@@ -101,14 +101,14 @@
</ScrollView> </ScrollView>
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
> >
<FrameLayout <FrameLayout
android:id="@android:id/custom" android:id="@android:id/custom"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="5dip" android:paddingTop="5dip"
android:paddingBottom="5dip" android:paddingBottom="5dip"
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<LinearLayout <LinearLayout
style="@android:style/ButtonBar" style="@android:style/ButtonBar"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingTop="4dip" android:paddingTop="4dip"
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:padding="4dp" android:padding="4dp"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<EditText <EditText
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<CheckBox <CheckBox
android:id="@+id/send" android:id="@+id/send"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimaryInverse" android:textColor="?android:attr/textColorPrimaryInverse"
android:text="@string/export_chat_send" android:text="@string/export_chat_send"
......
...@@ -15,21 +15,21 @@ ...@@ -15,21 +15,21 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<include layout="@layout/contact_title" /> <include layout="@layout/contact_title" />
<ScrollView <ScrollView
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:paddingTop="8dip" android:paddingTop="8dip"
android:paddingBottom="4dip" android:paddingBottom="4dip"
android:paddingLeft="2dip" android:paddingLeft="2dip"
...@@ -38,20 +38,20 @@ ...@@ -38,20 +38,20 @@
<TextView <TextView
android:text="@string/otr_fingerprint_description" android:text="@string/otr_fingerprint_description"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="8dip" android:paddingBottom="8dip"
/> />
<TextView <TextView
android:text="@string/otr_remote_fingerprint" android:text="@string/otr_remote_fingerprint"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<TextView <TextView
android:id="@+id/otr_remote_fingerprint" android:id="@+id/otr_remote_fingerprint"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@android:style/TextAppearance.Large" style="@android:style/TextAppearance.Large"
android:text="12:34:56" android:text="12:34:56"
...@@ -59,33 +59,33 @@ ...@@ -59,33 +59,33 @@
<CheckBox <CheckBox
android:id="@+id/verified" android:id="@+id/verified"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/otr_is_verified" android:text="@string/otr_is_verified"
/> />
<Button <Button
android:id="@+id/scan" android:id="@+id/scan"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/otr_scan_fingerprint" android:text="@string/otr_scan_fingerprint"
/> />
<ImageView <ImageView
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:drawable/divider_horizontal_dark" android:background="@android:drawable/divider_horizontal_dark"
/> />
<TextView <TextView
android:text="@string/otr_local_fingerprint" android:text="@string/otr_local_fingerprint"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<TextView <TextView
android:id="@+id/otr_local_fingerprint" android:id="@+id/otr_local_fingerprint"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@android:style/TextAppearance.Large" style="@android:style/TextAppearance.Large"
android:text="12:34:56" android:text="12:34:56"
...@@ -93,14 +93,14 @@ ...@@ -93,14 +93,14 @@
<Button <Button
android:id="@+id/show" android:id="@+id/show"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/otr_show_fingerprint" android:text="@string/otr_show_fingerprint"
/> />
<Button <Button
android:id="@+id/copy" android:id="@+id/copy"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/otr_copy_fingerprint" android:text="@string/otr_copy_fingerprint"
/> />
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:padding="4dp" android:padding="4dp"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<EditText <EditText
android:id="@+id/group_name" android:id="@+id/group_name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Preference is able to place a specific widget for its particular Preference is able to place a specific widget for its particular
type in the "widget_frame" layout. --> type in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight" android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical" android:gravity="center_vertical"
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!-- Preference should place its actual preference widget here. --> <!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+android:id/widget_frame" <LinearLayout android:id="@+android:id/widget_frame"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" /> android:orientation="vertical" />
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
<ListView <ListView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
/> />
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
--> -->
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center_vertical" android:gravity="center_vertical"
> >
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
<ScrollView <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<TextView <TextView
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
/> />
<com.xabber.android.ui.widget.NoDefaultSpinner <com.xabber.android.ui.widget.NoDefaultSpinner
android:id="@+id/contact_account" android:id="@+id/contact_account"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:prompt="@string/choose_account" android:prompt="@string/choose_account"
/> />
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
/> />
<EditText <EditText
android:id="@+id/muc_server" android:id="@+id/muc_server"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/muc_server_hint" android:hint="@string/muc_server_hint"
android:singleLine="true" android:singleLine="true"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
/> />
<EditText <EditText
android:id="@+id/muc_room" android:id="@+id/muc_room"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
/> />
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
/> />
<EditText <EditText
android:id="@+id/muc_nick" android:id="@+id/muc_nick"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true" android:singleLine="true"
android:hint="@string/muc_nick_hint" android:hint="@string/muc_nick_hint"
...@@ -78,12 +78,12 @@ ...@@ -78,12 +78,12 @@
<TextView <TextView
android:text="@string/muc_password" android:text="@string/muc_password"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<EditText <EditText
android:id="@+id/muc_password" android:id="@+id/muc_password"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:password="true" android:password="true"
android:singleLine="true" android:singleLine="true"
...@@ -94,21 +94,21 @@ ...@@ -94,21 +94,21 @@
android:id="@+id/muc_join" android:id="@+id/muc_join"
android:checked="true" android:checked="true"
android:text="@string/muc_join" android:text="@string/muc_join"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center_horizontal|bottom" android:gravity="center_horizontal|bottom"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<Button <Button
android:text="@string/muc_save" android:text="@string/muc_save"
android:id="@+id/ok" android:id="@+id/ok"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/> />
<WebView <WebView
android:id="@+id/webview" android:id="@+id/webview"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
/> />
</FrameLayout> </FrameLayout>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_list_item_height" android:layout_height="@dimen/contact_list_item_height"
android:paddingLeft="6dip" android:paddingLeft="6dip"
android:paddingRight="6dip" android:paddingRight="6dip"
...@@ -42,13 +42,13 @@ ...@@ -42,13 +42,13 @@
/> />
<RelativeLayout <RelativeLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="8dip" android:layout_marginLeft="8dip"
> >
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_name_height_show_status" android:layout_height="@dimen/contact_name_height_show_status"
android:layout_marginRight="@dimen/status_icon_width" android:layout_marginRight="@dimen/status_icon_width"
android:gravity="bottom" android:gravity="bottom"
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
/> />
<TextView <TextView
android:id="@+id/status" android:id="@+id/status"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="@dimen/contact_name_height_show_status" android:layout_height="@dimen/contact_name_height_show_status"
android:layout_marginRight="@dimen/status_icon_width" android:layout_marginRight="@dimen/status_icon_width"
android:gravity="top" android:gravity="top"
......
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:text="@string/account_password" android:text="@string/account_password"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<EditText <EditText
android:id="@+id/account_password" android:id="@+id/account_password"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:password="true" android:password="true"
android:singleLine="true" android:singleLine="true"
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<CheckBox <CheckBox
android:id="@+id/store_password" android:id="@+id/store_password"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="false" android:checked="false"
android:text="@string/account_store_password" android:text="@string/account_store_password"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Preference is able to place a specific widget for its particular Preference is able to place a specific widget for its particular
type in the "widget_frame" layout. --> type in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeight" android:minHeight="?android:attr/listPreferredItemHeight"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<!-- Preference should place its actual preference widget here. --> <!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+android:id/widget_frame" <LinearLayout android:id="@+android:id/widget_frame"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" /> android:orientation="vertical" />
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Preference is able to place a specific widget for its particular Preference is able to place a specific widget for its particular
type in the "widget_frame" layout. --> type in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeight" android:minHeight="?android:attr/listPreferredItemHeight"
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:minHeight="10dip" android:minHeight="10dip"
android:maxHeight="10dip" android:maxHeight="10dip"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@android:id/title" android:layout_below="@android:id/title"
android:layout_alignLeft="@android:id/title" android:layout_alignLeft="@android:id/title"
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<!-- Preference should place its actual preference widget here. --> <!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+android:id/widget_frame" <LinearLayout android:id="@+android:id/widget_frame"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" /> android:orientation="vertical" />
......
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<include layout="@layout/contact_title" /> <include layout="@layout/contact_title" />
<ScrollView <ScrollView
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:paddingTop="8dip" android:paddingTop="8dip"
android:paddingBottom="4dip" android:paddingBottom="4dip"
android:paddingLeft="2dip" android:paddingLeft="2dip"
...@@ -33,50 +33,50 @@ ...@@ -33,50 +33,50 @@
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<TextView <TextView
android:text="@string/otr_question_description" android:text="@string/otr_question_description"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="8dip" android:paddingBottom="8dip"
/> />
<TextView <TextView
android:text="@string/otr_question" android:text="@string/otr_question"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<EditText <EditText
android:id="@+id/question" android:id="@+id/question"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<TextView <TextView
android:text="@string/otr_answer" android:text="@string/otr_answer"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<EditText <EditText
android:id="@+id/answer" android:id="@+id/answer"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<Button <Button
android:id="@+id/send" android:id="@+id/send"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/chat_send" android:text="@string/chat_send"
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<Button <Button
android:id="@+id/cancel" android:id="@+id/cancel"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@android:string/cancel" android:text="@android:string/cancel"
......
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<include layout="@layout/contact_title" /> <include layout="@layout/contact_title" />
<ScrollView <ScrollView
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:paddingTop="8dip" android:paddingTop="8dip"
android:paddingBottom="4dip" android:paddingBottom="4dip"
android:paddingLeft="2dip" android:paddingLeft="2dip"
...@@ -33,38 +33,38 @@ ...@@ -33,38 +33,38 @@
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<TextView <TextView
android:text="@string/otr_secret_description" android:text="@string/otr_secret_description"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="8dip" android:paddingBottom="8dip"
/> />
<TextView <TextView
android:text="@string/otr_secret" android:text="@string/otr_secret"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<EditText <EditText
android:id="@+id/answer" android:id="@+id/answer"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
> >
<Button <Button
android:id="@+id/send" android:id="@+id/send"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/chat_send" android:text="@string/chat_send"
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<Button <Button
android:id="@+id/cancel" android:id="@+id/cancel"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@android:string/cancel" android:text="@android:string/cancel"
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
<ListView <ListView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:padding="4dip" /> android:padding="4dip" />
...@@ -15,23 +15,23 @@ ...@@ -15,23 +15,23 @@
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<Spinner <Spinner
android:id="@+id/status_mode" android:id="@+id/status_mode"
android:prompt="@string/status_editor" android:prompt="@string/status_editor"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<EditText <EditText
android:id="@+id/status_text" android:id="@+id/status_text"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/status_text_hint" android:hint="@string/status_text_hint"
/> />
<Button <Button
android:id="@+id/ok" android:id="@+id/ok"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/status_editor" android:text="@string/status_editor"
/> />
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="4dip"> android:padding="4dip">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:src="@drawable/ic_status" /> android:src="@drawable/ic_status" />
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="42dip" android:layout_height="42dip"
android:layout_marginLeft="6dip" android:layout_marginLeft="6dip"
android:singleLine="true" android:singleLine="true"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="4dip"> android:padding="4dip">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="42dip" android:layout_height="42dip"
android:layout_marginLeft="6dip" android:layout_marginLeft="6dip"
android:singleLine="true" android:singleLine="true"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
--> -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="4dip"> android:padding="4dip">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="6dip" android:layout_marginLeft="6dip"
android:singleLine="true" android:singleLine="true"
......
...@@ -29,7 +29,6 @@ import java.util.concurrent.ThreadFactory; ...@@ -29,7 +29,6 @@ import java.util.concurrent.ThreadFactory;
import android.app.Activity; import android.app.Activity;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.res.TypedArray; import android.content.res.TypedArray;
import android.os.Build;
import android.os.Handler; import android.os.Handler;
import com.xabber.android.service.XabberService; import com.xabber.android.service.XabberService;
...@@ -42,8 +41,6 @@ import com.xabber.androiddev.R; ...@@ -42,8 +41,6 @@ import com.xabber.androiddev.R;
*/ */
public class Application extends android.app.Application { public class Application extends android.app.Application {
public static final int SDK_INT = Integer.valueOf(Build.VERSION.SDK);
private static Application instance; private static Application instance;
public static Application getInstance() { public static Application getInstance() {
...@@ -254,8 +251,7 @@ public class Application extends android.app.Application { ...@@ -254,8 +251,7 @@ public class Application extends android.app.Application {
* @return * @return
*/ */
public boolean isContactsSupported() { public boolean isContactsSupported() {
return SDK_INT >= 5 return checkCallingOrSelfPermission("android.permission.READ_CONTACTS") == PackageManager.PERMISSION_GRANTED;
&& checkCallingOrSelfPermission("android.permission.READ_CONTACTS") == PackageManager.PERMISSION_GRANTED;
} }
@Override @Override
......
...@@ -16,15 +16,11 @@ package com.xabber.android.data; ...@@ -16,15 +16,11 @@ package com.xabber.android.data;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.jivesoftware.smack.Connection; import org.jivesoftware.smack.Connection;
import org.xbill.DNS.Options; import org.xbill.DNS.Options;
import android.content.Context;
import android.content.pm.ApplicationInfo; import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.util.Log; import android.util.Log;
/** /**
...@@ -37,54 +33,12 @@ public class LogManager implements OnLoadListener { ...@@ -37,54 +33,12 @@ public class LogManager implements OnLoadListener {
private static final boolean log; private static final boolean log;
private static final boolean debugable; private static final boolean debugable;
private static Method _getApplicationInfo;
static { static {
initCompatibility(); debugable = (Application.getInstance().getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
debugable = (getApplicationInfo(Application.getInstance()).flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
log = debugable && SettingsManager.debugLog(); log = debugable && SettingsManager.debugLog();
}; };
private static void initCompatibility() {
try {
_getApplicationInfo = Context.class.getMethod("getApplicationInfo",
new Class[] {});
} catch (NoSuchMethodException nsme) {
}
}
public static ApplicationInfo getApplicationInfo(Context context) {
ApplicationInfo applicationInfo;
if (_getApplicationInfo != null) {
try {
applicationInfo = (ApplicationInfo) _getApplicationInfo
.invoke(context);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else if (cause instanceof Error) {
throw (Error) cause;
} else {
throw new RuntimeException(e);
}
} catch (IllegalAccessException ie) {
throw new RuntimeException(ie);
}
} else {
try {
applicationInfo = context.getPackageManager()
.getApplicationInfo(context.getPackageName(), 0);
} catch (NameNotFoundException e) {
Log.e("LogManager",
"I can`t find my package in the system. Debug will be disabled.");
applicationInfo = new ApplicationInfo();
applicationInfo.flags = 0;
}
}
return applicationInfo;
}
private final static LogManager instance; private final static LogManager instance;
static { static {
......
...@@ -28,6 +28,7 @@ import org.jivesoftware.smack.util.StringUtils; ...@@ -28,6 +28,7 @@ import org.jivesoftware.smack.util.StringUtils;
import android.content.res.TypedArray; import android.content.res.TypedArray;
import android.database.Cursor; import android.database.Cursor;
import android.os.Build;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.NetworkException; import com.xabber.android.data.NetworkException;
...@@ -133,7 +134,7 @@ public class AccountManager implements OnLoadListener, OnWipeListener { ...@@ -133,7 +134,7 @@ public class AccountManager implements OnLoadListener, OnWipeListener {
TypedArray values = application.getResources().obtainTypedArray(id); TypedArray values = application.getResources().obtainTypedArray(id);
AccountProtocol protocol = AccountProtocol.valueOf(values AccountProtocol protocol = AccountProtocol.valueOf(values
.getString(0)); .getString(0));
if (Application.SDK_INT < 8 && protocol == AccountProtocol.wlm) { if (Build.VERSION.SDK_INT < 8 && protocol == AccountProtocol.wlm) {
values.recycle(); values.recycle();
continue; continue;
} }
......
...@@ -32,6 +32,8 @@ import org.jivesoftware.smack.packet.Packet; ...@@ -32,6 +32,8 @@ import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.StreamError; import org.jivesoftware.smack.packet.StreamError;
import org.xbill.DNS.Record; import org.xbill.DNS.Record;
import android.os.Build;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.LogManager; import com.xabber.android.data.LogManager;
import com.xabber.android.data.NetworkException; import com.xabber.android.data.NetworkException;
...@@ -264,7 +266,7 @@ public class ConnectionThread implements ...@@ -264,7 +266,7 @@ public class ConnectionThread implements
LogManager.i(this, "Use " + address); LogManager.i(this, "Use " + address);
ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration( ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration(
address.getHostAddress(), port, serverName); address.getHostAddress(), port, serverName);
if (Application.SDK_INT >= 14) { if (Build.VERSION.SDK_INT >= 14) {
connectionConfiguration.setTruststoreType("AndroidCAStore"); connectionConfiguration.setTruststoreType("AndroidCAStore");
connectionConfiguration.setTruststorePassword(null); connectionConfiguration.setTruststorePassword(null);
connectionConfiguration.setTruststorePath(null); connectionConfiguration.setTruststorePath(null);
......
...@@ -27,6 +27,7 @@ import android.graphics.Bitmap; ...@@ -27,6 +27,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Build;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.OnLoadListener; import com.xabber.android.data.OnLoadListener;
...@@ -479,9 +480,9 @@ public class AvatarManager implements OnLoadListener, OnLowMemoryListener, ...@@ -479,9 +480,9 @@ public class AvatarManager implements OnLoadListener, OnLowMemoryListener,
} }
private int getLauncherLargeIconSize() { private int getLauncherLargeIconSize() {
if (Application.SDK_INT < 9) if (Build.VERSION.SDK_INT < 9)
return BaseShortcutHelper.getLauncherLargeIconSize(); return BaseShortcutHelper.getLauncherLargeIconSize();
else if (Application.SDK_INT < 11) else if (Build.VERSION.SDK_INT < 11)
return GingerbreadShortcutHelper.getLauncherLargeIconSize(); return GingerbreadShortcutHelper.getLauncherLargeIconSize();
else else
return HoneycombShortcutHelper.getLauncherLargeIconSize(); return HoneycombShortcutHelper.getLauncherLargeIconSize();
......
...@@ -27,6 +27,7 @@ import android.content.Intent; ...@@ -27,6 +27,7 @@ import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.media.AudioManager; import android.media.AudioManager;
import android.net.Uri; import android.net.Uri;
import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.os.Vibrator; import android.os.Vibrator;
import android.widget.RemoteViews; import android.widget.RemoteViews;
...@@ -391,7 +392,8 @@ public class NotificationManager implements OnInitializedListener, ...@@ -391,7 +392,8 @@ public class NotificationManager implements OnInitializedListener,
chatViews.setTextViewText(R.id.text, status); chatViews.setTextViewText(R.id.text, status);
Notification notification = new Notification(); Notification notification = new Notification();
if (Application.SDK_INT >= 14 && SettingsManager.eventsPersistent()) { if (Build.VERSION.SDK_INT >= 14
&& SettingsManager.eventsPersistent()) {
// Ongoing icons are in the left side, so hide this one. // Ongoing icons are in the left side, so hide this one.
notification.icon = R.drawable.ic_placeholder; notification.icon = R.drawable.ic_placeholder;
notification.when = 0; notification.when = 0;
...@@ -429,7 +431,7 @@ public class NotificationManager implements OnInitializedListener, ...@@ -429,7 +431,7 @@ public class NotificationManager implements OnInitializedListener,
persistentNotification.defaults = 0; persistentNotification.defaults = 0;
persistentNotification.sound = null; persistentNotification.sound = null;
persistentNotification.tickerText = null; persistentNotification.tickerText = null;
if (Application.SDK_INT >= 14 && SettingsManager.eventsPersistent()) { if (Build.VERSION.SDK_INT >= 14 && SettingsManager.eventsPersistent()) {
// Ongoing icons are in the left side, so always use it. // Ongoing icons are in the left side, so always use it.
persistentNotification.when = startTime; persistentNotification.when = startTime;
if (messageNotifications.isEmpty()) { if (messageNotifications.isEmpty()) {
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
*/ */
package com.xabber.android.service; package com.xabber.android.service;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.app.Notification;
import android.app.Service; import android.app.Service;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
...@@ -36,9 +32,6 @@ import com.xabber.android.data.notification.NotificationManager; ...@@ -36,9 +32,6 @@ import com.xabber.android.data.notification.NotificationManager;
*/ */
public class XabberService extends Service { public class XabberService extends Service {
private Method startForeground;
private Method stopForeground;
private static XabberService instance; private static XabberService instance;
public static XabberService getInstance() { public static XabberService getInstance() {
...@@ -50,27 +43,17 @@ public class XabberService extends Service { ...@@ -50,27 +43,17 @@ public class XabberService extends Service {
super.onCreate(); super.onCreate();
instance = this; instance = this;
LogManager.i(this, "onCreate"); LogManager.i(this, "onCreate");
// Try to get methods supported in API Level 5+
try {
startForeground = getClass().getMethod("startForeground",
new Class[] { int.class, Notification.class });
stopForeground = getClass().getMethod("stopForeground",
new Class[] { boolean.class });
} catch (NoSuchMethodException e) {
startForeground = stopForeground = null;
}
changeForeground(); changeForeground();
} }
public void changeForeground() { public void changeForeground() {
if (SettingsManager.eventsPersistent() if (SettingsManager.eventsPersistent()
&& Application.getInstance().isInitialized()) && Application.getInstance().isInitialized())
startForegroundWrapper(NotificationManager.getInstance() startForeground(NotificationManager.PERSISTENT_NOTIFICATION_ID,
NotificationManager.getInstance()
.getPersistentNotification()); .getPersistentNotification());
else else
stopForegroundWrapper(); stopForeground(true);
} }
@Override @Override
...@@ -83,7 +66,7 @@ public class XabberService extends Service { ...@@ -83,7 +66,7 @@ public class XabberService extends Service {
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
LogManager.i(this, "onDestroy"); LogManager.i(this, "onDestroy");
stopForegroundWrapper(); stopForeground(true);
Application.getInstance().onServiceDestroy(); Application.getInstance().onServiceDestroy();
} }
...@@ -92,56 +75,6 @@ public class XabberService extends Service { ...@@ -92,56 +75,6 @@ public class XabberService extends Service {
return null; return null;
} }
/**
* This is a wrapper around the new startForeground method, using the older
* APIs if it is not available.
*/
void startForegroundWrapper(Notification notification) {
if (startForeground != null) {
Object[] startForegroundArgs = new Object[] {
Integer.valueOf(NotificationManager.PERSISTENT_NOTIFICATION_ID),
notification };
try {
startForeground.invoke(this, startForegroundArgs);
} catch (InvocationTargetException e) {
// Should not happen.
LogManager.w(this, "Unable to invoke startForeground" + e);
} catch (IllegalAccessException e) {
// Should not happen.
LogManager.w(this, "Unable to invoke startForeground" + e);
}
} else {
setForeground(true);
try {
((android.app.NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE))
.notify(NotificationManager.PERSISTENT_NOTIFICATION_ID,
notification);
} catch (SecurityException e) {
}
}
}
/**
* This is a wrapper around the new stopForeground method, using the older
* APIs if it is not available.
*/
void stopForegroundWrapper() {
if (stopForeground != null) {
try {
stopForeground.invoke(this, new Object[] { Boolean.TRUE });
// We don't want to clear notification bar.
} catch (InvocationTargetException e) {
// Should not happen.
LogManager.w(this, "Unable to invoke stopForeground" + e);
} catch (IllegalAccessException e) {
// Should not happen.
LogManager.w(this, "Unable to invoke stopForeground" + e);
}
} else {
setForeground(false);
}
}
public static Intent createIntent(Context context) { public static Intent createIntent(Context context) {
return new Intent(context, XabberService.class); return new Intent(context, XabberService.class);
} }
......
...@@ -209,4 +209,9 @@ public class DummyCursor implements Cursor { ...@@ -209,4 +209,9 @@ public class DummyCursor implements Cursor {
return null; return null;
} }
@Override
public int getType(int arg0) {
return 0;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment