2 * Copyright (C) 2007-2011 OpenIntents.org
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 package org.openintents.filemanager;
\r
20 import org.openintents.util.VersionUtils;
\r
22 import android.os.Bundle;
\r
23 import android.view.View;
\r
26 * Displays the recent changes, reading them from a raw resource.
\r
31 public class NewVersionActivity extends EulaActivity {
\r
33 /** Called when the activity is first created. */
\r
35 public void onCreate(Bundle icicle) {
\r
36 super.onCreate(icicle);
\r
38 // Modifications to convert EulaActivity into
\r
39 // NewVersionActivity:
\r
40 String version = VersionUtils.getVersionNumber(this);
\r
41 String title = getString(R.string.oi_distribution_name_and_version,
\r
43 String message = getString(R.string.oi_distribution_newversion_message,
\r
45 message += "\n\n" + getString(R.string.oi_distribution_newversion_recent_changes);
\r
47 mText1.setText(title);
\r
48 mText2.setText(message);
\r
49 mText.setText(readTextFromRawResource(R.raw.recent_changes, true));
\r
51 mAgree.setText(R.string.oi_distribution_newversion_continue);
\r
52 mDisagree.setVisibility(View.GONE);
\r
53 View v = findViewById(R.id.space);
\r
54 v.setVisibility(View.GONE);
\r
59 * Accept EULA and proceed with main application.
\r
62 EulaOrNewVersion.storeCurrentVersionCode(this);
\r
64 startOriginalActivity();
\r