<commit_before>/* Copyright 1995-2014 Esri
 *
 * 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.
 *
 * For additional information, contact:
 * Environmental Systems Research Institute, Inc.
 * Attn: Contracts Dept
 * 380 New York Street
 * Redlands, California, USA 92373
 *
 * email: <EMAIL>
 *
 */

package com.esri.android.mapsapp;

import java.util.ArrayList;
import java.util.List;

import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.esri.android.mapsapp.account.AccountManager;
import com.esri.android.mapsapp.account.SignInActivity;

/**
 * Entry point into the Maps App.
 */
public class MapsAppActivity extends Activity {

  private static final String TAG = MapsAppActivity.class.getSimpleName();

  DrawerLayout mDrawerLayout;

  ContentBrowserFragment mBrowseFragment;

  /**
   * The FrameLayout that hosts the main content of the activity, such as the MapView
   */
  FrameLayout mContentFrame;

  /**
   * The list of menu items in the navigation drawer
   */
  private ListView mDrawerList;

  private final List<DrawerItem> mDrawerItems = new ArrayList<DrawerItem>();

  /**
   * Helper component that ties the action bar to the navigation drawer.
   */
  private ActionBarDrawerToggle mDrawerToggle;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    /**
     * Unlock basic license level by setting your client id here. The client id can be obtained on
     * https://developers.arcgis.com
     */
    // ArcGISRuntime.setClientId("paste your client id here");

    setContentView(R.layout.maps_app_activity);
    setupDrawer();

    setView();
  }

  @Override
  protected void onResume() {
    super.onResume();

    updateDrawer();
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    // first check if the drawer toggle button was selected
    boolean handled = mDrawerToggle.onOptionsItemSelected(item);
    if (!handled) {
      handled = super.onOptionsItemSelected(item);<commit_msg>set client id from app settings resources<commit_after>/* Copyright 1995-2014 Esri
 *
 * 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.
 *
 * For additional information, contact:
 * Environmental Systems Research Institute, Inc.
 * Attn: Contracts Dept
 * 380 New York Street
 * Redlands, California, USA 92373
 *
 * email: <EMAIL>
 *
 */

package com.esri.android.mapsapp;

import java.util.ArrayList;
import java.util.List;

import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.esri.android.mapsapp.account.AccountManager;
import com.esri.android.mapsapp.account.SignInActivity;

/**
 * Entry point into the Maps App.
 */
public class MapsAppActivity extends Activity {

  private static final String TAG = MapsAppActivity.class.getSimpleName();

  DrawerLayout mDrawerLayout;

  ContentBrowserFragment mBrowseFragment;

  /**
   * The FrameLayout that hosts the main content of the activity, such as the MapView
   */
  FrameLayout mContentFrame;

  /**
   * The list of menu items in the navigation drawer
   */
  private ListView mDrawerList;

  private final List<DrawerItem> mDrawerItems = new ArrayList<DrawerItem>();

  /**
   * Helper component that ties the action bar to the navigation drawer.
   */
  private ActionBarDrawerToggle mDrawerToggle;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    /**
     * Unlock basic license level by setting your client id here. The client id can be obtained on
     * https://developers.arcgis.com
     */
    // ArcGISRuntime.setClientId(getString(R.string.client_id));

    setContentView(R.layout.maps_app_activity);
    setupDrawer();

    setView();
  }

  @Override
  protected void onResume() {
    super.onResume();

    updateDrawer();
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    // first check if the drawer toggle button was selected
    boolean handled = mDrawerToggle.onOptionsItemSelected(item);
    if (!handled) {
      handled = super.onOptionsItemSelected(item);
{'fraction_non_alphanumeric': 0.08579599618684461, 'fraction_numerical': 0.0073085478233238, 'mean_word_length': 4.224066390041494, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6437417', 'n_tokens_mistral': 1784, 'n_tokens_neox': 1708, 'n_words': 561}