Remove LegalInfoActivity

Change-Id: I1e924cbad05f7cc44bb0593c659e8f3890bf27bd
This commit is contained in:
Stephen McDonald 2017-08-08 09:41:44 +10:00
parent dc35a25258
commit f942335062
5 changed files with 0 additions and 89 deletions

View File

@ -57,9 +57,6 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".LegalInfoActivity"
android:label="@string/legal_info"/>
<activity
android:name=".BasicMapDemoActivity"
android:label="@string/basic_map_demo_label"/>

View File

@ -1,45 +0,0 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.mapdemo;
import com.google.android.gms.common.GooglePlayServicesUtil;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
/**
* Activity to show legal information.
*/
public class LegalInfoActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.legal_info);
TextView legalInfoTextView = (TextView) findViewById(R.id.legal_info);
String openSourceSoftwareLicenseInfo =
GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(this);
if (openSourceSoftwareLicenseInfo != null) {
legalInfoTextView.setText(openSourceSoftwareLicenseInfo);
} else {
legalInfoTextView.setText(R.string.play_services_not_installed);
}
}
}

View File

@ -21,8 +21,6 @@ import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
@ -87,23 +85,6 @@ public final class MainActivity extends AppCompatActivity
list.setEmptyView(findViewById(R.id.empty));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
if (item.getItemId() == R.id.menu_legal) {
startActivity(new Intent(this, LegalInfoActivity.class));
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
DemoDetails demo = (DemoDetails) parent.getAdapter().getItem(position);

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_legal"
android:showAsAction="never"
android:title="@string/legal_info" />
</menu>

View File

@ -15,7 +15,6 @@
-->
<resources>
<string name="demo_title">Google Maps API Demos</string>
<string name="legal_info">Legal Info</string>
<string name="no_demos">No demos</string>
<string name="play_services_not_installed">Google Play services is not installed on this device.</string>