Skip to content

Commit

Permalink
Update launcher, update UI, update network_security_config
Browse files Browse the repository at this point in the history
  • Loading branch information
andDevW committed Mar 15, 2017
1 parent fb16045 commit d01888c
Show file tree
Hide file tree
Showing 21 changed files with 96 additions and 167 deletions.
6 changes: 6 additions & 0 deletions .idea/copyright/andDevW_Andrew_Wright_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ android {
defaultConfig {
applicationId "com.anddevw.getchromium"
minSdkVersion 19
targetSdkVersion 25
versionCode 20161103
versionName "3.2"
targetSdkVersion 23
versionCode 20170314
versionName "3.5"
}
buildTypes {
release {
Expand Down Expand Up @@ -38,5 +38,5 @@ dependencies {
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:support-v4:25.0.0'
// ONLY FOR f-droid VARIANT!!
//compile 'com.mcxiaoke.volley:library:1.0.19'
//compile 'com.mcxiaoke.volley:library:1.0.19'
}
5 changes: 1 addition & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
<!-- Network State Permissions -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Wake-Lock Permissions -->
<!-- <uses-permission android:name="android.permission.WAKE_LOCK" /> -->
<!-- Vibrate Permissions -->
<!-- <uses-permission android:name="android.permission.VIBRATE"/> -->
<application
android:networkSecurityConfig="@xml/network_security_config"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
Binary file removed app/src/main/ic_launcher-web.png
Binary file not shown.
Binary file added app/src/main/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 9 additions & 20 deletions app/src/main/java/com/anddevw/getchromium/GetChromium.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.ShareActionProvider;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
Expand Down Expand Up @@ -40,7 +41,13 @@

import static com.anddevw.getchromium.R.id.fabA;


// Created by andDevW(Andrew Wright) ©2015-2017.
// [email protected]


public class GetChromium extends AppCompatActivity {
private ShareActionProvider mShareActionProvider;
private static final String PREFS_NAME = "prefs";
private static final String PREF_DARK_THEME = "dark_theme";
public static final String WIDGET_BUTTON = "com.anddevw.getchromium.WIDGET_BUTTON";
Expand All @@ -65,15 +72,13 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
// Vibrate
// final Vibrator signalInstall = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE) ;


FloatingActionButton fab = (FloatingActionButton) findViewById(fabA);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Vibrate
// signalInstall.vibrate(300);

//Enable experimental features in Chromium:
Snackbar.make(view, "ENABLE EXPERIMENTAL FEATURES\nIn Chromium, navigate to chrome://flags", 6000)
.setAction("Action", null).show();
Expand Down Expand Up @@ -298,22 +303,6 @@ protected void onStop () {
super.onStop();
if (mRequestQueue != null) {
mRequestQueue.cancelAll(TAG);

// WORKING, NEEDS TO BE BETTER
//
// private void checkPermissions() throws Settings.SettingNotFoundException {
// boolean isNonPlayAppAllowed = Settings.Secure.getInt(getContentResolver(),
// Settings.Secure.INSTALL_NON_MARKET_APPS) == 1;
// if (!isNonPlayAppAllowed) {
// launchSecuritySettings();
// runSetup();
// downloadLatest();
// } else {
// runSetup();
// downloadLatest();
// }
// }

}
}
}
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
android:title=""
app:showAsAction="never" />
</menu>
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/src/main/res/values-v14/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- w14/API level 14/Android 4.0 -->
<string name="progress_title">please wait.</string>
<string name="progress_detail">downloading Chromium APK...</string>
<string name="build_revision_button">Build Revision :</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-v21/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- w21/API level 21/Android 5.0 -->
<string name="build_revision">Build Revision:</string>
<string name="progress_title">please wait.</string>
<string name="progress_detail">downloading Chromium APK...</string>
Expand Down Expand Up @@ -38,8 +39,6 @@
<string name="dialog_check_settings">check settings</string>
<string name="check">View Settings</string>
<string name="skip">Skip</string>
<string name="unknown_apps_dlg_title">Install blocked</string>
<string name="unknown_apps_dlg_text">For security, your phone is set\\nto block installation of apps obtained \\nfrom unknown sources.</string>
<string name="cancel">CANCEL</string>
<string name="settings">SETTINGS</string>
<string name="ok">OK</string>
Expand Down
160 changes: 28 additions & 132 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,146 +1,42 @@
<resources xmlns:http="http://schemas.android.com/tools">
<string name="app_name">getChromium</string>
<string name="action_settings">Settings</string>
<string name="build_revision">Build Revision:</string>
<string name="progress_title">please wait.</string>
<string name="progress_detail">downloading Chromium APK...</string>
<string name="action_sync">Sync</string>
<string name="download_not_found">Download not found</string>
<string name="download_failed">Download failed</string>
<string name="download_paused">dawnload paused</string>
<string name="download_pending">download pending</string>
<string name="download_in_progress">download in progress</string>
<string name="download_complete">download complete</string>
<string name="download_is_nowhere_in_sight">no download</string>
<string name="hi">hi</string>
<string name="title_progress">getChromium</string>
<string name="title_activity_settings">Settings</string>

<!-- Strings related to Settings -->

<!-- Example General preferences -->
<string name="pref_header_general">General</string>
<string name="pref_title_latest_build">Latest</string>

<string name="pref_title_social_recommendations">Enable social recommendations</string>
<string name="pref_description_social_recommendations">Recommendations for people to contact
based on your message history
</string>

<string name="pref_title_display_name">Display name</string>
<string name="pref_default_display_name">President Bernie Sanders</string>

<string name="pref_title_add_friends_to_messages">Add friends to messages</string>
<string-array name="pref_example_list_titles">
<item>Always</item>
<item>When possible</item>
<item>Never</item>
</string-array>
<string-array name="pref_example_list_values">
<item>1</item>
<item>0</item>
<item>-1</item>
</string-array>

<!-- Example preferences for Data & Sync -->
<string name="pref_header_data_sync">Data &amp; sync</string>

<string name="pref_title_sync_frequency">Sync frequency</string>
<string-array name="pref_sync_frequency_titles">
<item>15 minutes</item>
<item>30 minutes</item>
<item>1 hour</item>
<item>3 hours</item>
<item>6 hours</item>
<item>Never</item>
</string-array>
<string-array name="pref_sync_frequency_values">
<item>15</item>
<item>30</item>
<item>60</item>
<item>180</item>
<item>360</item>
<item>-1</item>
</string-array>
<!-- Developer andDevW preferences -->
<string name="pref_default_display_message">Bernie Sanders for President in 2020!</string>
<string name="pref_default_url_message">https://ourrevolution.com/</string>

<string name="pref_title_system_sync_settings">System sync settings</string>
<!-- Strings related to Layout -->
<string name="chromium_description_01">This installs the latest build of Chromium.</string>
<string name="chromium_description_02">Chromium builds don\'t auto-update.</string>
<string name="chromium_description_03">To update just install Chromium again.</string>
<string name="chromium_description_04">// Chromium may be tremendously buggy.</string>
<string name="chromium_description_05">APK courtesy of the Chromium team</string>

<!-- Example preferences for Notifications -->
<string name="pref_header_notifications">Advanced</string>
<string name="chromium_description_06"></string>

<string name="pref_title_new_message_notifications">New message notifications</string>
<string name="chromium_description_07">https://www.chromium.org</string>

<string name="pref_title_ringtone">Ringtone</string>
<string name="pref_ringtone_silent">Silent</string>
<!-- Strings related to Instructions -->
<string name="chromium_description_08">How to Safely Install Chromium:</string>
<string name="chromium_description_09">1.Allow Unknown sources.</string>
<string name="chromium_description_10">2.Install Chromium</string>
<string name="chromium_description_11">3.Turn off Unknown sources</string>
<string name="chromium_description_12">It is unsafe to leave your device with \'Unknown sources\' enabled.</string>
<string name="chromium_description_13">To minimize your attack surface follow these simple steps.</string>
<string name="chromium_description_15">getChromium is designed to install Chromium the in the safest possible way.</string>
<string name="chromium_description_16">Leaving your Settings with \'Unknown sources\' enabled means your device is in a vulnerable state 24/7.</string>
<string name="chromium_description_18">The only safe way to install or update Chromium without Google\'s help is manually.</string>
<string name="chromium_description_19">The Chromium team releases Chromium APK constantly.</string>
<string name="chromium_description_20">To keep your Chromium browser up to date simply install Chromium again.</string>
<string name="chromium_description_21">All of your bookmarks and settings will be exactly as they were in the previous version.</string>

<string name="pref_title_vibrate">Vibrate</string>
<string name="pref_header_advanced">Advanced</string>
<string name="title_first_section">Build Type:</string>
<string name="title_latest_build">Latest</string>
<string name="title_good_build">Last Known Good Revision</string>
<string name="pref_title_good_build_preference">Last Known Good Revision</string>
<string name="title_intent_preference">Learn about chromium</string>
<string name="title_second_section">Learn more</string>

<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="chromium_address">https://www.chromium.org</string>
<string name="chromium_flags_address">run-chromium-with-flags</string>
<string name="Chromium">Chromium</string>
<string name="Advanced">Advanced</string>
<string name="Learn">Learn</string>
<string name="summary_intent_preference">Intent Preference</string>
<string name="launch_preferences">Launch Preferences</string>
<string name="preference_attributes">Preference Attributes</string>
<string name="inline_preferences">Inline Preferences</string>
<string name="title_checkbox_preference">Checkbox Preferences</string>
<string name="summary_checkbox_preference">summary chekbox preferences</string>
<string name="dialog_based_preferences">Dialog Based Preferences</string>
<string name="summary_edittext_preference">Summary editText</string>
<string name="dialog_title_edittext_preference">Title</string>
<string name="title_list_preference">List Preference</string>
<string name="summary_list_preference">summary</string>
<string name="dialog_title_list_preference">dialog title list preferences</string>
<string name="title_child_preference">title child preferences</string>
<string name="summary_child_preference">summary child preferences</string>
<string name="title_parent_preference">title parent preferences</string>
<string name="summary_parent_preference">summary parent preferences</string>
<string name="title_screen_preference">title screen preferences</string>
<string name="summary_screen_preference">summary screen preferences</string>
<string name="title_next_screen_toggle_preference">screen toggle pref</string>
<string name="summary_next_screen_toggle_preference">summary next screen toggle</string>
<string name="title_activity_preferences">PreferencesActivity</string>
<string name="settings_header">Settings</string>

<string name="chromium_description_01">Installs the latest build of Chromium.</string>
<string name="chromium_description_02">Chromium builds don\'t auto-update.</string>
<string name="chromium_description_03">Install again to update Chromium.</string>
<string name="chromium_description_04">// It may be tremendously buggy.</string>
<string name="chromium_description_05">APK courtesy of Chromium team</string>
<string name="chromium_description_06"></string>
<string name="chromium_description_07">https://www.chromium.org</string>

<string name="chromium_button_01"> getting involved </string>
<string name="chromium_button_01"></string>
<string name="chromium_button_02">get involved</string>
<string name="chromium_button_03"></string>

<string name="latest_title">Latest</string>
<string name="get_cr">getChromium</string>
<string name="title_get_cr">getChromium</string>
<string name="appwidget_text">EXAMPLE</string>
<string name="configure">Configure</string>
<string name="add_widget">Add widget</string>
<string name="build_revision_button">Build Revision :</string>
<string name="downloading">downloading...</string>
<string name="inprogress">in progress</string>
<string name="dialog_check_settings">check settings</string>
<string name="check">View Settings</string>
<string name="skip">Skip</string>
<string name="unknown_apps_dlg_title">Install blocked</string>
<string name="unknown_apps_dlg_text">For security, your phone is set\\nto block installation of apps obtained \\nfrom unknown sources.</string>
<string name="cancel">CANCEL</string>
<string name="settings">SETTINGS</string>
<string name="ok">OK</string>
<string name="more_information_build_info">MORE INFORMATION/BUILD INFO</string>
<string name="progress_detail2">Unzipping...</string>
<string name="progress_title">please wait.</string>
<string name="progress_detail">downloading Chromium APK...</string>

</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/xml/file_paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="chromium_apk" path="Android/data/com.anddevw.getchromium/files/getChromium/apks"/>
</paths>
6 changes: 6 additions & 0 deletions app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">commondatastorage.googleapis.com</domain>
</domain-config>
</network-security-config>
9 changes: 9 additions & 0 deletions app/src/main/res/xml/provider_paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<provider android:name="android.support.v4.content.FileProvider"
android:authorities="com.anddevw.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Sep 15 18:09:19 PDT 2016
#Mon Mar 06 17:13:02 PST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

0 comments on commit d01888c

Please sign in to comment.