Merge lp:~humpolec-team/humpolec/add-updateservice into lp:humpolec

Proposed by Michał Karnicki
Status: Work in progress
Proposed branch: lp:~humpolec-team/humpolec/add-updateservice
Merge into: lp:humpolec
Diff against target: 490 lines (+277/-28)
14 files modified
AndroidManifest.xml (+29/-16)
project.properties (+1/-1)
res/layout/activity_update.xml (+7/-0)
res/layout/fragment_update.xml (+13/-0)
res/menu/update.xml (+11/-0)
res/values-w820dp/dimens.xml (+10/-0)
res/values/ids.xml (+23/-0)
res/values/strings.xml (+5/-4)
src/com/canonical/dualboot/service/UpdateService.java (+109/-0)
src/com/canonical/ubuntu/installer/NumberPickerDialog.java (+0/-5)
src/com/canonical/ubuntu/installer/TextPickerDialog.java (+0/-1)
src/com/canonical/ubuntu/installer/UbuntuInstallService.java (+5/-0)
src/com/canonical/ubuntu/installer/UpdateActivity.java (+64/-0)
src/com/canonical/ubuntu/installer/Utils.java (+0/-1)
To merge this branch: bzr merge lp:~humpolec-team/humpolec/add-updateservice
Reviewer Review Type Date Requested Status
The Humpolec team Pending
Review via email: mp+211965@code.launchpad.net

Commit message

Add UpdateService stub.

Description of the change

Add UpdateService stub.
Minor clean-up (sorry about some noise, Eclipse being smart).

To post a comment you must log in.

Unmerged revisions

61. By Michał Karnicki

Add UpdateService stub. Minor clean-up.

60. By Ondrej Kubik

Bumping up version for release

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'AndroidManifest.xml'
--- AndroidManifest.xml 2014-03-05 15:35:14 +0000
+++ AndroidManifest.xml 2014-03-20 15:01:59 +0000
@@ -7,13 +7,14 @@
7 <uses-sdk7 <uses-sdk
8 android:minSdkVersion="17"8 android:minSdkVersion="17"
9 android:targetSdkVersion="18" />9 android:targetSdkVersion="18" />
10
10 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />11 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
11 <uses-permission android:name="android.permission.GET_ACCOUNTS"/>12 <uses-permission android:name="android.permission.GET_ACCOUNTS" />
12 <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>13 <uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
13 <uses-permission android:name="android.permission.WRITE_SETTINGS"/>14 <uses-permission android:name="android.permission.WRITE_SETTINGS" />
14 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />15 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
15 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>16 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
16 <uses-permission android:name="android.permission.READ_PHONE_STATE"/>17 <uses-permission android:name="android.permission.READ_PHONE_STATE" />
17 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />18 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
18 <uses-permission android:name="android.permission.BLUETOOTH" />19 <uses-permission android:name="android.permission.BLUETOOTH" />
19 <uses-permission android:name="android.permission.INTERNET" />20 <uses-permission android:name="android.permission.INTERNET" />
@@ -21,8 +22,8 @@
21 <uses-permission android:name="android.permission.RECORD_AUDIO" />22 <uses-permission android:name="android.permission.RECORD_AUDIO" />
22 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />23 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
23 <uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />24 <uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
24 <uses-permission android:name="android.permission.REBOOT"/>25 <uses-permission android:name="android.permission.REBOOT" />
25 <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>26 <uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
2627
27 <application28 <application
28 android:allowBackup="true"29 android:allowBackup="true"
@@ -31,9 +32,9 @@
31 android:screenOrientation="portrait"32 android:screenOrientation="portrait"
32 android:theme="@android:style/Theme.Holo" >33 android:theme="@android:style/Theme.Holo" >
33 <activity34 <activity
34 android:name=".InstallActivity"35 android:name="com.canonical.ubuntu.installer.InstallActivity"
35 android:screenOrientation="portrait"36 android:label="@string/app_name"
36 android:label="@string/app_name" >37 android:screenOrientation="portrait" >
37 <intent-filter>38 <intent-filter>
38 <action android:name="android.intent.action.MAIN" />39 <action android:name="android.intent.action.MAIN" />
3940
@@ -41,12 +42,23 @@
41 </intent-filter>42 </intent-filter>
42 </activity>43 </activity>
43 <activity44 <activity
44 android:name=".LaunchActivity"45 android:name="com.canonical.ubuntu.installer.LaunchActivity"
45 android:screenOrientation="portrait"46 android:label="@string/app_name"
46 android:label="@string/app_name">47 android:screenOrientation="portrait" >
47 </activity>48 </activity>
48 49
49 <service android:name="com.canonical.ubuntu.installer.UbuntuInstallService">50 <activity
51 android:name="com.canonical.ubuntu.installer.UpdateActivity"
52 android:label="@string/title_activity_update" >
53 </activity>
54
55 <service android:name="com.canonical.ubuntu.installer.UbuntuInstallService" >
56 <intent-filter>
57 <action android:name="com.canonical.dualboot.ACTION_CHECK_UPDATE" />
58 </intent-filter>
59 </service>
60
61 <service android:name="com.canonical.ubuntu.installer.UbuntuInstallService" >
50 <intent-filter>62 <intent-filter>
51 <action android:name="com.canonical.ubuntuinstaller.UbuntuInstallService.GET_CHANNEL_LIST" />63 <action android:name="com.canonical.ubuntuinstaller.UbuntuInstallService.GET_CHANNEL_LIST" />
52 <action android:name="com.canonical.ubuntuinstaller.UbuntuInstallService.DOWNLOAD_RELEASE" />64 <action android:name="com.canonical.ubuntuinstaller.UbuntuInstallService.DOWNLOAD_RELEASE" />
@@ -65,6 +77,7 @@
65 <action android:name="com.canonical.ubuntuinstaller.UbuntuInstallService.IS_UBUNTU_UPGRADABLE" />77 <action android:name="com.canonical.ubuntuinstaller.UbuntuInstallService.IS_UBUNTU_UPGRADABLE" />
66 </intent-filter>78 </intent-filter>
67 </service>79 </service>
80
68 </application>81 </application>
6982
70</manifest>83</manifest>
7184
=== modified file 'project.properties'
--- project.properties 2013-12-12 02:02:35 +0000
+++ project.properties 2014-03-20 15:01:59 +0000
@@ -11,4 +11,4 @@
11#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt11#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212
13# Project target.13# Project target.
14target=Google Inc.:Google APIs:1914target=android-19
1515
=== added directory 'res/drawable-ldpi'
=== added file 'res/drawable-xhdpi/ic_stat_notify_ubuntu.png'
16Binary files res/drawable-xhdpi/ic_stat_notify_ubuntu.png 1970-01-01 00:00:00 +0000 and res/drawable-xhdpi/ic_stat_notify_ubuntu.png 2014-03-20 15:01:59 +0000 differ16Binary files res/drawable-xhdpi/ic_stat_notify_ubuntu.png 1970-01-01 00:00:00 +0000 and res/drawable-xhdpi/ic_stat_notify_ubuntu.png 2014-03-20 15:01:59 +0000 differ
=== added file 'res/layout/activity_update.xml'
--- res/layout/activity_update.xml 1970-01-01 00:00:00 +0000
+++ res/layout/activity_update.xml 2014-03-20 15:01:59 +0000
@@ -0,0 +1,7 @@
1<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
2 xmlns:tools="http://schemas.android.com/tools"
3 android:id="@+id/container"
4 android:layout_width="match_parent"
5 android:layout_height="match_parent"
6 tools:context="com.canonical.ubuntu.installer.UpdateActivity"
7 tools:ignore="MergeRootFrame" />
08
=== added file 'res/layout/fragment_update.xml'
--- res/layout/fragment_update.xml 1970-01-01 00:00:00 +0000
+++ res/layout/fragment_update.xml 2014-03-20 15:01:59 +0000
@@ -0,0 +1,13 @@
1<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2 xmlns:tools="http://schemas.android.com/tools"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:paddingBottom="@dimen/activity_vertical_margin"
6 android:paddingLeft="@dimen/activity_horizontal_margin"
7 android:paddingRight="@dimen/activity_horizontal_margin"
8 android:paddingTop="@dimen/activity_vertical_margin"
9 tools:context="com.canonical.ubuntu.installer.UpdateActivity$PlaceholderFragment" >
10
11 <!-- TODO -->
12
13</RelativeLayout>
014
=== added file 'res/menu/update.xml'
--- res/menu/update.xml 1970-01-01 00:00:00 +0000
+++ res/menu/update.xml 2014-03-20 15:01:59 +0000
@@ -0,0 +1,11 @@
1<menu xmlns:android="http://schemas.android.com/apk/res/android"
2 xmlns:tools="http://schemas.android.com/tools"
3 tools:context="com.canonical.ubuntu.installer.UpdateActivity" >
4
5 <item
6 android:id="@+id/action_settings"
7 android:orderInCategory="100"
8 android:showAsAction="never"
9 android:title="@string/action_settings"/>
10
11</menu>
012
=== added directory 'res/values-w820dp'
=== added file 'res/values-w820dp/dimens.xml'
--- res/values-w820dp/dimens.xml 1970-01-01 00:00:00 +0000
+++ res/values-w820dp/dimens.xml 2014-03-20 15:01:59 +0000
@@ -0,0 +1,10 @@
1<resources>
2
3 <!--
4 Example customization of dimensions originally defined in res/values/dimens.xml
5 (such as screen margins) for screens with more than 820dp of available width. This
6 would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
7 -->
8 <dimen name="activity_horizontal_margin">64dp</dimen>
9
10</resources>
011
=== added file 'res/values/ids.xml'
--- res/values/ids.xml 1970-01-01 00:00:00 +0000
+++ res/values/ids.xml 2014-03-20 15:01:59 +0000
@@ -0,0 +1,23 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4 * This file is part of Humpolec - Ubuntu dual boot for Android.
5 * Copyright 2014 Canonical Ltd.
6 *
7 * Ubuntu for Android is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation.
10 *
11 * Ubuntu for Android is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Ubuntu for Android. If not, see <http://www.gnu.org/licenses/>.
18 */
19-->
20
21<resources>
22 <item type="id" name="ubuntu_update_notification" />
23</resources>
0\ No newline at end of file24\ No newline at end of file
125
=== modified file 'res/values/strings.xml'
--- res/values/strings.xml 2014-01-09 08:54:46 +0000
+++ res/values/strings.xml 2014-03-20 15:01:59 +0000
@@ -1,10 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<resources>2<resources>
3
3 <string name="yes">Yes</string>4 <string name="yes">Yes</string>
4 <string name="no">No</string>5 <string name="no">No</string>
5 <string name="ok">OK</string>6 <string name="ok">OK</string>
67
7 <!-- string for InstallActivity -->8 <!-- string for InstallActivity -->
8 <string name="app_name">Ubuntu Dual Boot</string>9 <string name="app_name">Ubuntu Dual Boot</string>
9 <string name="action_settings">Settings</string>10 <string name="action_settings">Settings</string>
10 <string name="action_detele_download">Delete download</string>11 <string name="action_detele_download">Delete download</string>
@@ -39,10 +40,8 @@
39 <string name="terminal_dump_succ">Dump Terminal successfully to file on sdcard</string>40 <string name="terminal_dump_succ">Dump Terminal successfully to file on sdcard</string>
40 <string name="terminal_dump_fail">Dump Terminal failed to file on sdcard</string>41 <string name="terminal_dump_fail">Dump Terminal failed to file on sdcard</string>
41 <string name="external_storage_unavailable">External Storage is not available</string>42 <string name="external_storage_unavailable">External Storage is not available</string>
42
43 <string name="not_supported_title">Not supported</string>43 <string name="not_supported_title">Not supported</string>
44 <string name="not_supported_message_fmt">It appears that your device (%s) is not on the supported list of Ubuntu for Phone dual boot installer. Visit <a href="https://wiki.ubuntu.com/Touch/DualBootInstallation">https://wiki.ubuntu.com/Touch/DualBootInstallation</a> to see phones that is supported.</string>44 <string name="not_supported_message_fmt">It appears that your device (%s) is not on the supported list of Ubuntu for Phone dual boot installer. Visit <a href="https://wiki.ubuntu.com/Touch/DualBootInstallation">https://wiki.ubuntu.com/Touch/DualBootInstallation</a> to see phones that is supported.</string>
45
46 <string name="no_network_dialog_title">Network not available</string>45 <string name="no_network_dialog_title">Network not available</string>
47 <string name="enable_network">Enable WiFi</string>46 <string name="enable_network">Enable WiFi</string>
4847
@@ -56,5 +55,7 @@
56 <string-array name="uninstall_options">55 <string-array name="uninstall_options">
57 <item>Delete user data</item>56 <item>Delete user data</item>
58 </string-array>57 </string-array>
58
59 <string name="title_activity_update">UpdateActivity</string>
60
59</resources>61</resources>
60
6162
=== added directory 'src/com/canonical/dualboot'
=== added directory 'src/com/canonical/dualboot/service'
=== added file 'src/com/canonical/dualboot/service/UpdateService.java'
--- src/com/canonical/dualboot/service/UpdateService.java 1970-01-01 00:00:00 +0000
+++ src/com/canonical/dualboot/service/UpdateService.java 2014-03-20 15:01:59 +0000
@@ -0,0 +1,109 @@
1/*
2 * This file is part of Humpolec - Ubuntu dual boot for Android.
3 * Copyright 2014 Canonical Ltd.
4 *
5 * Ubuntu for Android is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation.
8 *
9 * Ubuntu for Android is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Ubuntu for Android. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18package com.canonical.dualboot.service;
19
20import android.app.IntentService;
21import android.app.Notification;
22import android.app.NotificationManager;
23import android.app.PendingIntent;
24import android.content.Intent;
25
26import com.canonical.ubuntu.installer.R;
27import com.canonical.ubuntu.installer.UpdateActivity;
28
29public class UpdateService extends IntentService {
30 public static final String ACTION_CHECK_UPDATE =
31 "com.canonical.dualboot.ACTION_CHECK_UPDATE";
32
33 private PendingIntent mDownloadUbuntuIntent;
34 //private PendingIntent mInstallUbuntuIntent;
35 //private PendingIntent mAndroidUpdateIntent;
36
37 private Notification mUbuntuUpdateNotification;
38 //private Notification mAndroidUpdateNotification;
39
40 public UpdateService() {
41 super(UpdateService.class.getName());
42
43
44 Intent updateActivity = new Intent(this, UpdateActivity.class);
45 updateActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
46 mDownloadUbuntuIntent = PendingIntent.getActivity(
47 this, 0, updateActivity, PendingIntent.FLAG_UPDATE_CURRENT);
48 }
49
50 @Override
51 protected void onHandleIntent(Intent intent) {
52 final String action = intent.getAction();
53 // TODO This should be launched from an alarm.
54 if (ACTION_CHECK_UPDATE.equals(action)) {
55 checkForUpdate();
56 }
57 }
58
59 private void checkForUpdate() {
60 // TODO Determine available updates based on PreferenceManager.getDefaultSharedPreferences(this);
61 boolean ubuntuUpdateAvailable = true;
62 boolean androidUpdateReady = true;
63
64 if (ubuntuUpdateAvailable) {
65 boolean isDownloaded = false;
66 if (!isDownloaded) {
67 showDownloadUbuntuUpdateNotification();
68 } else {
69 showInstallUbuntuUpdateNotification();
70 }
71 }
72
73 if (androidUpdateReady) {
74 showPrepareForAndroidUpdateNotification();
75 }
76 }
77
78 private void showDownloadUbuntuUpdateNotification() {
79 // TODO Extract strings.
80 Notification notification = new Notification.Builder(this)
81 .setAutoCancel(true)
82 .setSmallIcon(R.drawable.ic_stat_notify_ubuntu)
83 .setContentTitle("Ubuntu")
84 .setContentText("Ubuntu update available")
85 .setTicker("Ubuntu update available")
86 .setContentIntent(mDownloadUbuntuIntent)
87 .build();
88
89 NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
90 nm.notify(R.id.ubuntu_update_notification, notification);
91 }
92
93 private void showInstallUbuntuUpdateNotification() {
94 // TODO Add show install Ubuntu update notification.
95 }
96
97 private void showPrepareForAndroidUpdateNotification() {
98 // TODO Add show prepare for Android update notification.
99 }
100
101 @SuppressWarnings("unused")
102 private synchronized void hideUbuntuNotification() {
103 if (mUbuntuUpdateNotification != null) {
104 NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
105 nm.cancel(R.id.ubuntu_update_notification);
106 }
107 mUbuntuUpdateNotification = null;
108 }
109}
0\ No newline at end of file110\ No newline at end of file
1111
=== modified file 'src/com/canonical/ubuntu/installer/NumberPickerDialog.java'
--- src/com/canonical/ubuntu/installer/NumberPickerDialog.java 2013-12-13 01:06:14 +0000
+++ src/com/canonical/ubuntu/installer/NumberPickerDialog.java 2014-03-20 15:01:59 +0000
@@ -1,19 +1,14 @@
1package com.canonical.ubuntu.installer;1package com.canonical.ubuntu.installer;
22
3import com.canonical.ubuntu.installer.R;
4
5import android.app.AlertDialog;3import android.app.AlertDialog;
6import android.content.Context;4import android.content.Context;
7import android.content.DialogInterface;5import android.content.DialogInterface;
8import android.content.SharedPreferences;
9import android.content.DialogInterface.OnClickListener;6import android.content.DialogInterface.OnClickListener;
10import android.content.res.Resources;7import android.content.res.Resources;
11import android.os.Bundle;8import android.os.Bundle;
12import android.view.LayoutInflater;9import android.view.LayoutInflater;
13import android.view.View;10import android.view.View;
14import android.widget.CheckBox;
15import android.widget.NumberPicker;11import android.widget.NumberPicker;
16import android.widget.TextView;
1712
18/**13/**
19 * A text picker dialog that prompts the user for to select one of the text options14 * A text picker dialog that prompts the user for to select one of the text options
2015
=== modified file 'src/com/canonical/ubuntu/installer/TextPickerDialog.java'
--- src/com/canonical/ubuntu/installer/TextPickerDialog.java 2013-12-13 01:06:14 +0000
+++ src/com/canonical/ubuntu/installer/TextPickerDialog.java 2014-03-20 15:01:59 +0000
@@ -13,7 +13,6 @@
13import android.view.View;13import android.view.View;
14import android.widget.CheckBox;14import android.widget.CheckBox;
15import android.widget.NumberPicker;15import android.widget.NumberPicker;
16import android.widget.TextView;
1716
18/**17/**
19 * A text picker dialog that prompts the user for to select one of the text options18 * A text picker dialog that prompts the user for to select one of the text options
2019
=== modified file 'src/com/canonical/ubuntu/installer/UbuntuInstallService.java'
--- src/com/canonical/ubuntu/installer/UbuntuInstallService.java 2014-01-06 15:07:12 +0000
+++ src/com/canonical/ubuntu/installer/UbuntuInstallService.java 2014-03-20 15:01:59 +0000
@@ -199,6 +199,7 @@
199 };199 };
200 200
201 class ECancelException extends Exception {201 class ECancelException extends Exception {
202 private static final long serialVersionUID = 747982425589853525L;
202 long mDownloadedSize;203 long mDownloadedSize;
203 204
204 public ECancelException(long downloadedSize){205 public ECancelException(long downloadedSize){
@@ -208,6 +209,8 @@
208 };209 };
209210
210 class ESumNotMatchException extends Exception {211 class ESumNotMatchException extends Exception {
212 private static final long serialVersionUID = -1356096284689475876L;
213
211 public ESumNotMatchException(){214 public ESumNotMatchException(){
212 super();215 super();
213 }216 }
@@ -218,6 +221,8 @@
218 };221 };
219222
220 class EShellExecException extends Exception {223 class EShellExecException extends Exception {
224 private static final long serialVersionUID = -9010009907016301558L;
225
221 public EShellExecException(){226 public EShellExecException(){
222 super();227 super();
223 }228 }
224229
=== added file 'src/com/canonical/ubuntu/installer/UpdateActivity.java'
--- src/com/canonical/ubuntu/installer/UpdateActivity.java 1970-01-01 00:00:00 +0000
+++ src/com/canonical/ubuntu/installer/UpdateActivity.java 2014-03-20 15:01:59 +0000
@@ -0,0 +1,64 @@
1package com.canonical.ubuntu.installer;
2
3import android.app.Activity;
4import android.app.ActionBar;
5import android.app.Fragment;
6import android.os.Bundle;
7import android.view.LayoutInflater;
8import android.view.Menu;
9import android.view.MenuItem;
10import android.view.View;
11import android.view.ViewGroup;
12import android.os.Build;
13
14public class UpdateActivity extends Activity {
15
16 @Override
17 protected void onCreate(Bundle savedInstanceState) {
18 super.onCreate(savedInstanceState);
19 setContentView(R.layout.activity_update);
20
21 if (savedInstanceState == null) {
22 getFragmentManager().beginTransaction()
23 .add(R.id.container, new PlaceholderFragment()).commit();
24 }
25 }
26
27 @Override
28 public boolean onCreateOptionsMenu(Menu menu) {
29
30 // Inflate the menu; this adds items to the action bar if it is present.
31 getMenuInflater().inflate(R.menu.update, menu);
32 return true;
33 }
34
35 @Override
36 public boolean onOptionsItemSelected(MenuItem item) {
37 // Handle action bar item clicks here. The action bar will
38 // automatically handle clicks on the Home/Up button, so long
39 // as you specify a parent activity in AndroidManifest.xml.
40 int id = item.getItemId();
41 if (id == R.id.action_settings) {
42 return true;
43 }
44 return super.onOptionsItemSelected(item);
45 }
46
47 /**
48 * A placeholder fragment containing a simple view.
49 */
50 public static class PlaceholderFragment extends Fragment {
51
52 public PlaceholderFragment() {
53 }
54
55 @Override
56 public View onCreateView(LayoutInflater inflater, ViewGroup container,
57 Bundle savedInstanceState) {
58 View rootView = inflater.inflate(R.layout.fragment_update,
59 container, false);
60 return rootView;
61 }
62 }
63
64}
065
=== modified file 'src/com/canonical/ubuntu/installer/Utils.java'
--- src/com/canonical/ubuntu/installer/Utils.java 2014-01-09 08:54:46 +0000
+++ src/com/canonical/ubuntu/installer/Utils.java 2014-03-20 15:01:59 +0000
@@ -180,7 +180,6 @@
180 return size;180 return size;
181 }181 }
182182
183 @SuppressWarnings("deprecation")
184 public static long getFreeSpaceInBytes(String fsPath) {183 public static long getFreeSpaceInBytes(String fsPath) {
185 StatFs stats = new StatFs(fsPath);184 StatFs stats = new StatFs(fsPath);
186 // not using getAvailableBytes() for it's not available in android 4.2185 // not using getAvailableBytes() for it's not available in android 4.2

Subscribers

People subscribed via source and target branches

to all changes: