author | Ting Li <ting.li@amlogic.com> | 2014-07-04 06:52:44 (GMT) |
---|---|---|
committer | Sandy lUo <sandy.luo@amlogic.com> | 2014-07-04 06:52:44 (GMT) |
commit | c4dc1842152b5d5f20befd81c02ab1749f90d974 (patch) | |
tree | dfef7916c312be4326d98442d32dc0fe6dcc668f | |
parent | e2641b4afc447dd798e1993ae7b7279045373417 (diff) | |
download | OTAUpgrade2-c4dc1842152b5d5f20befd81c02ab1749f90d974.zip OTAUpgrade2-c4dc1842152b5d5f20befd81c02ab1749f90d974.tar.gz OTAUpgrade2-c4dc1842152b5d5f20befd81c02ab1749f90d974.tar.bz2 |
PD#93165 fix bug of update without sdcard
Squashed commit of the following:
commit 01a9570438b036bddfb39ed57745afed9eb870f4
Author: Ting Li <ting.li@amlogic.com>
Date: Tue Jul 1 19:37:32 2014 +0800
pd#93165 modify which is error update for bug93165
commit 2c05b8a321239c4c954edfdc319406e463239735
Author: Ting Li <ting.li@amlogic.com>
Date: Fri Jun 13 17:33:25 2014 +0800
pd#93165 fix bug of update without sdcard
-rwxr-xr-x | AndroidManifest.xml | 6 | ||||
-rwxr-xr-x | res/layout/mid.xml | 26 | ||||
-rwxr-xr-x | src/com/amlapp/update/otaupgrade/UpdateActivity.java | 3 |
3 files changed, 17 insertions, 18 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 948f8cd..136e48c 100755 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -53,17 +53,17 @@ <activity android:name="com.amlapp.update.otaupgrade.BadMovedSDcard" android:screenOrientation="landscape" - android:theme="@android:style/Theme.Holo.DialogWhenLarge" > + android:theme="@android:style/Theme.Holo.Dialog" > </activity> <activity android:name="com.amlapp.update.otaupgrade.MainActivity" android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="landscape" > - <intent-filter> + <intent-filter> <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> + <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> diff --git a/res/layout/mid.xml b/res/layout/mid.xml index aa0d7d6..2b9e88e 100755 --- a/res/layout/mid.xml +++ b/res/layout/mid.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical" >
- <RelativeLayout
+ <!--<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="30dip"
@@ -24,31 +24,29 @@ android:layout_centerInParent="true"
android:layout_marginLeft="10dip"
android:layout_toRightOf="@id/dialog_title_image"
- android:text="@string/warnning_title"
- android:textColor="#000000"
- android:textSize="30sp" />
- </RelativeLayout>
+ android:text="@string/warnning_title"/>
+ </RelativeLayout>-->
<View
android:layout_width="match_parent"
- android:layout_height="2dp"
+ android:layout_height="20dp"
android:layout_marginLeft="6dp"
- android:layout_marginRight="6dp"
- android:background="#0099CC" />
+ android:layout_marginRight="6dp"/>
<TextView
android:id="@+id/info"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dip"
+ android:layout_marginRight="30dip"
+ android:textSize="22sp"
android:layout_marginTop="10dip"
- android:textSize="24sp"
- android:text="@string/warnning"
- android:textColor="#000000" />
+ android:text="@string/warnning"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:paddingTop="40dp"
android:gravity="bottom|center_horizontal">
<Button
@@ -58,6 +56,7 @@ android:layout_alignParentLeft="true"
android:paddingBottom="10dip"
android:paddingLeft="30dp"
+ android:textSize="24sp"
android:paddingRight="30dp"
android:paddingTop="10dip"
android:layout_marginLeft="30dp"
@@ -70,6 +69,7 @@ android:paddingBottom="10dip"
android:paddingLeft="30dp"
android:paddingRight="30dp"
+ android:textSize="24sp"
android:paddingTop="10dip"
android:layout_alignBaseline="@id/sdcard_cancel"
android:layout_alignParentRight="true"
diff --git a/src/com/amlapp/update/otaupgrade/UpdateActivity.java b/src/com/amlapp/update/otaupgrade/UpdateActivity.java index e800f1b..b30ff56 100755 --- a/src/com/amlapp/update/otaupgrade/UpdateActivity.java +++ b/src/com/amlapp/update/otaupgrade/UpdateActivity.java @@ -209,8 +209,7 @@ public class UpdateActivity extends Activity { boolean isScriptAsk = mPreference.getScriptAsk();
if (isScriptAsk) {
String Mounted = Environment.getExternalStorage2State();
- if (!Environment.isExternalStorageBeSdcard()
- || Mounted.equals(Environment.MEDIA_MOUNTED)) {
+ if (Mounted.equals(Environment.MEDIA_MOUNTED)) {
StatFs statFs = new StatFs(Environment
.getExternalStorage2Directory().getPath());
int blockSize = statFs.getBlockSize();
|